Fix nmigen dependencies
authorLas Safin <me@las.rs>
Mon, 13 Sep 2021 19:16:47 +0000 (19:16 +0000)
committerLas Safin <me@las.rs>
Mon, 13 Sep 2021 19:16:47 +0000 (19:16 +0000)
flake.lock
flake.nix
nix/verilog.nix

index df14d0ad822d5551e05be6422ad0cc133425d1e3..874e06e08b770f8036b67704e06bcb9fe5a25146 100644 (file)
         "type": "github"
       }
     },
+    "nmigen": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1618220900,
+        "narHash": "sha256-Ol2SMZLUTikZWDLmK7F5lZuKBfGO71WmisATPNMTpHQ=",
+        "ref": "master",
+        "rev": "d824795c2c7cb43dcbc8ed8fac6d309d77284913",
+        "revCount": 1056,
+        "type": "git",
+        "url": "https://git.libre-soc.org/git/nmigen.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "https://git.libre-soc.org/git/nmigen.git"
+      }
+    },
+    "nmigen-soc": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1601572554,
+        "narHash": "sha256-v9SH+KuIPydXCr363RUsMg9/tabuu+GjKPJOKq2Jze0=",
+        "ref": "master",
+        "rev": "692017c7eaf21ff37302790c4422db6bd08667be",
+        "revCount": 48,
+        "type": "git",
+        "url": "https://git.libre-soc.org/git/nmigen-soc.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "https://git.libre-soc.org/git/nmigen-soc.git"
+      }
+    },
     "root": {
       "inputs": {
         "c4m-jtag": "c4m-jtag",
-        "nixpkgs": "nixpkgs"
+        "nixpkgs": "nixpkgs",
+        "nmigen": "nmigen",
+        "nmigen-soc": "nmigen-soc"
       }
     }
   },
index 591b34e2f82d28dc9b98483994b44a338c65921e..2d50aa3ff4a90e1dbf6a056a3741d8dacf5a7873 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -6,8 +6,12 @@
   inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
   inputs.c4m-jtag.url = "git+https://git.libre-soc.org/git/c4m-jtag.git";
   inputs.c4m-jtag.flake = false;
+  inputs.nmigen.url = "git+https://git.libre-soc.org/git/nmigen.git";
+  inputs.nmigen.flake = false;
+  inputs.nmigen-soc.url = "git+https://git.libre-soc.org/git/nmigen-soc.git";
+  inputs.nmigen-soc.flake = false;
 
-  outputs = { self, nixpkgs, c4m-jtag }:
+  outputs = { self, nixpkgs, c4m-jtag, nmigen, nmigen-soc }:
     let
       supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
 
             bigfloat = pfinal.callPackage ./nix/bigfloat.nix {};
             modgrammar = pfinal.callPackage ./nix/modgrammar.nix {};
             libresoc-nmutil = pfinal.callPackage ./nix/nmutil.nix {};
+
+            nmigen-soc = pprev.nmigen-soc.overrideAttrs (_: {
+              doCheck = false;
+              src = nmigen-soc;
+              setuptoolsCheckPhase = "true";
+            });
+
+            nmigen = pprev.nmigen.overrideAttrs (_: {
+              src = nmigen;
+            });
           };
         };
 
index ce5167c1682afb29c0a1eeebf84f0f8d31e383cb..41b092ac4ac0d1940fc19b8bee82bd390ae8b011 100644 (file)
@@ -1,6 +1,6 @@
 { version }:
 
-{ stdenv, python3Packages, python2 }:
+{ stdenv, python3Packages, python2, yosys }:
 
 stdenv.mkDerivation {
   pname = "libresoc.v";
@@ -10,9 +10,9 @@ stdenv.mkDerivation {
 
   strictDeps = true;
 
-  nativeBuildInputs = with python3Packages; [
+  nativeBuildInputs = (with python3Packages; [
     c4m-jtag nmigen-soc python libresoc-ieee754fpu libresoc-openpower-isa
-  ];
+  ]) ++ [ yosys ];
 
   configurePhase = "true";