-
Notifications
You must be signed in to change notification settings - Fork 28
/
flake.nix
43 lines (40 loc) · 1.33 KB
/
flake.nix
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
{
inputs = {
nix-eda.url = github:efabless/nix-eda;
nl2bench = {
url = github:donn/nl2bench;
inputs.nix-eda.follows = "nix-eda";
};
quaigh = {
url = github:donn/quaigh/fix_nix_linux;
inputs.nixpkgs.follows = "nix-eda/nixpkgs";
};
};
outputs = {self, nix-eda, quaigh, nl2bench, ...}: {
packages = nix-eda.forAllSystems { current = self; withInputs = [nix-eda quaigh nl2bench]; } (util: with util; rec{
atalanta = callPackage ./nix/atalanta.nix {};
podem = callPackage ./nix/podem.nix {};
fault = callPackage ./default.nix {};
default = fault;
});
devShells = nix-eda.forAllSystems { withInputs = [nix-eda quaigh nl2bench self]; } (util: with util; rec {
mac-testing = pkgs.stdenvNoCC.mkDerivation (with pkgs; let
pyenv = (python3.withPackages(ps: with ps; [pyverilog pyyaml pytest]));
in {
# Use the host's Clang and Swift
name = "shell";
buildInputs = [
yosys
verilog
pkgs.quaigh
pkgs.nl2bench
pyenv
gtkwave
];
PYTHON_LIBRARY="${pyenv}/lib/lib${python3.libPrefix}${stdenvNoCC.hostPlatform.extensions.sharedLibrary}";
PYTHONPATH="${pyenv}/${pyenv.sitePackages}";
FAULT_IVL_BASE="${verilog}/lib/ivl";
});
});
};
}