Get further building for versa ecp5
authorLas Safin <me@las.rs>
Sat, 25 Sep 2021 11:57:13 +0000 (11:57 +0000)
committerLas Safin <me@las.rs>
Sat, 25 Sep 2021 11:57:13 +0000 (11:57 +0000)
flake.lock
flake.nix

index b88daca0b8ccfdd446eab52242ab2a0bebd64032..c69ffb0b01cdaaf2b053abeac69c923f63e016c9 100644 (file)
         "url": "https://git.libre-soc.org/git/c4m-jtag.git"
       }
     },
+    "migen": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1631614362,
+        "narHash": "sha256-BgYf4e7O/rbS5P1ZpDlcgCEUh2h2vK3FyHADdzyaMg0=",
+        "owner": "m-labs",
+        "repo": "migen",
+        "rev": "7bc4eb1387b39159a74c1dbd1b820728e0bfbbaa",
+        "type": "github"
+      },
+      "original": {
+        "owner": "m-labs",
+        "repo": "migen",
+        "type": "github"
+      }
+    },
     "nix-litex": {
       "flake": false,
       "locked": {
     "root": {
       "inputs": {
         "c4m-jtag": "c4m-jtag",
+        "migen": "migen",
         "nix-litex": "nix-litex",
         "nixpkgs": "nixpkgs",
         "nmigen": "nmigen",
index 22e6470553916845f8d703518e50c53ba4b133cf..54ddb1a8ed74628b2e9cd439a337fb48f69173cd 100644 (file)
--- a/flake.nix
+++ b/flake.nix
   inputs.nmigen.flake = false;
   inputs.nmigen-soc.url = "git+https://git.libre-soc.org/git/nmigen-soc.git";
   inputs.nmigen-soc.flake = false;
+  inputs.migen.url = "github:m-labs/migen";
+  inputs.migen.flake = false;
   inputs.nix-litex.url = "git+https://git.sr.ht/~lschuermann/nix-litex?ref=main";
   inputs.nix-litex.flake = false;
 
-  outputs = { self, nixpkgs, c4m-jtag, nmigen, nmigen-soc, nix-litex }:
+  outputs = { self, nixpkgs, c4m-jtag, nmigen, nmigen-soc, nix-litex, migen }:
     let
       getv = x: builtins.substring 0 8 x.lastModifiedDate;
 
@@ -33,7 +35,7 @@
     in
     {
       overlay = final: prev: {
-        python3Packages = prev.python3Packages.override {
+        python37Packages = prev.python37Packages.override {
           overrides = lib.composeExtensions (litex final).pythonOverlay (pfinal: pprev: {
             libresoc-ieee754fpu = pfinal.callPackage ./nix/ieee754fpu.nix {};
             libresoc-openpower-isa = pfinal.callPackage ./nix/openpower-isa.nix {};
             nmigen = pprev.nmigen.overrideAttrs (_: {
               src = nmigen;
             });
+
+            migen = pprev.migen.overrideAttrs (_: {
+              src = migen;
+            });
           });
         };
 
-        libresoc-pre-litex = final.callPackage (import ./nix/pre-litex.nix { version = getv self; }) {};
-        libresoc-ls180 = final.callPackage (import ./nix/ls180.nix { version = getv self; }) {};
-        libresoc-ecp5 = final.callPackage (import ./nix/ecp5.nix { version = getv self; }) {};
+        libresoc-pre-litex = final.callPackage (import ./nix/pre-litex.nix { version = getv self; }) { python3Packages = final.python37Packages; };
+        libresoc-ls180 = final.callPackage (import ./nix/ls180.nix { version = getv self; }) { python3Packages = final.python37Packages; };
+        libresoc-ecp5 = final.callPackage (import ./nix/ecp5.nix { version = getv self; }) { python3Packages = final.python37Packages; };
         libresoc-pinmux = final.callPackage (import ./nix/pinmux.nix { version = getv self; }) {};
       };
 
       packages = forAllSystems (system: {
-        soc = nixpkgsFor.${system}.python3Packages.libresoc-soc;
+        soc = nixpkgsFor.${system}.python37Packages.libresoc-soc;
         pre-litex = nixpkgsFor.${system}.libresoc-pre-litex;
         pinmux = nixpkgsFor.${system}.libresoc-pinmux;
         ls180 = nixpkgsFor.${system}.libresoc-ls180;
         ecp5 = nixpkgsFor.${system}.libresoc-ecp5;
-        openpower-isa = nixpkgsFor.${system}.python3Packages.libresoc-openpower-isa;
+        openpower-isa = nixpkgsFor.${system}.python37Packages.libresoc-openpower-isa;
         debugNixpkgs = nixpkgsFor.${system};
       });