From 1aaf23663907170b584910d64ccabdde89c3eb42 Mon Sep 17 00:00:00 2001 From: Las Safin Date: Mon, 13 Sep 2021 19:16:47 +0000 Subject: [PATCH] Fix nmigen dependencies --- flake.lock | 36 +++++++++++++++++++++++++++++++++++- flake.nix | 16 +++++++++++++++- nix/verilog.nix | 6 +++--- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index df14d0ad..874e06e0 100644 --- a/flake.lock +++ b/flake.lock @@ -32,10 +32,44 @@ "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" } } }, diff --git a/flake.nix b/flake.nix index 591b34e2..2d50aa3f 100644 --- 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" ]; @@ -25,6 +29,16 @@ 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; + }); }; }; diff --git a/nix/verilog.nix b/nix/verilog.nix index ce5167c1..41b092ac 100644 --- a/nix/verilog.nix +++ b/nix/verilog.nix @@ -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"; -- 2.30.2