Python dependencies
[soc.git] / flake.nix
1 # The license for this file is included in the `nix` directory next to this file.
2
3 {
4 description = "FOSS CPU/GPU/VPU/SoC all in one, see https://libre-soc.org/";
5
6 inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
7
8 outputs = { self, nixpkgs }:
9 let
10 version = builtins.substring 0 8 self.lastModifiedDate;
11
12 supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
13
14 forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
15
16 nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
17 in
18 {
19 overlay = self: super: {
20 python3Packages = super.python3Packages.override {
21 overrides = pself: psuper: {
22 libresoc-ieee754fpu = pself.callPackage ./nix/ieee754fpu.nix {};
23 libresoc-openpower-isa = pself.callPackage ./nix/openpower-isa.nix {};
24 bigfloat = pself.callPackage ./nix/bigfloat.nix {};
25 libresoc-nmutil = pself.callPackage ./nix/nmutil.nix {};
26 };
27 };
28
29 libresoc-verilog = self.callPackage (import ./nix/verilog.nix { inherit version; }) {};
30 };
31
32 packages = forAllSystems (system: {
33 verilog = nixpkgsFor.${system}.libresoc-verilog;
34 });
35
36 defaultPackage = forAllSystems (system: self.packages.${system}.verilog);
37 };
38 }