-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
99 lines (95 loc) · 2.94 KB
/
Copy pathflake.nix
File metadata and controls
99 lines (95 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
inputs = {
librelane.url = "github:librelane/librelane";
nl2bench = {
url = "github:donn/nl2bench";
inputs.nix-eda.follows = "librelane/nix-eda";
};
};
outputs = {
self,
librelane,
nl2bench,
...
}: let
nix-eda = librelane.inputs.nix-eda;
nixpkgs = nix-eda.inputs.nixpkgs;
lib = nixpkgs.lib;
in {
overlays = {
default = lib.composeManyExtensions [
nl2bench.overlays.default
(pkgs': pkgs: let
callPackage = lib.callPackageWith pkgs';
in {
openroad = pkgs.openroad.overrideAttrs(attrs': attrs: {
patches = [./nix/ord-scan_opt.patch];
});
yosys-difetto = callPackage ./yosys-plugin/default.nix {
src = "${self}/yosys-plugin";
};
})
(nix-eda.composePythonOverlay (pkgs': pkgs: pypkgs': pypkgs: let
callPythonPackage = lib.callPackageWith (pkgs' // pypkgs');
in {
librelane-plugin-difetto = callPythonPackage ./default.nix {
src = self;
};
nl2bench = pypkgs.nl2bench.overridePythonAttrs (attrs: {
# i die of old age every time i wait for openjdk just to run antlr
format = "wheel";
src = pkgs'.fetchPypi {
pname = "nl2bench";
inherit (attrs) version;
format = "wheel";
dist = "py3";
python = "py3";
sha256 = "sha256-bgYpW3e8qQKiyci6Z8eIHsKiz/de951t4fL31Y574wI=";
};
doCheck = false;
preBuild = "";
nativeBuildInputs = with pypkgs'; [ poetry-core pythonRelaxDepsHook ];
pythonRelaxDeps = [ "pyosys" ];
});
cocotb = pypkgs.cocotb.overridePythonAttrs {
doCheck = false;
meta.broken = false;
};
}))
];
};
legacyPackages = nix-eda.forAllSystems (
system:
import nix-eda.inputs.nixpkgs {
inherit system;
overlays = [nix-eda.overlays.default librelane.inputs.devshell.overlays.default librelane.overlays.default self.overlays.default];
}
);
packages = nix-eda.forAllSystems (
system: let
pkgs = self.legacyPackages."${system}";
in {
inherit (pkgs) yosys-difetto;
}
);
devShells = nix-eda.forAllSystems (
system: let
pkgs = self.legacyPackages."${system}";
in {
default = pkgs.librelane-shell.override({
extra-packages = with pkgs; [quaigh python3.pkgs.nl2bench];
extra-python-packages = ps: with ps; [
# for testing/benchmarking
xlsxwriter
];
librelane-extra-python-interpreter-packages = ps: with ps; [bitarray marshmallow-dataclass
# for testing/benchmarking
matplotlib
pyqt6
];
librelane-plugins = ps: with ps; [librelane-plugin-difetto];
});
}
);
};
}