diff options
author | Luflosi <luflosi@luflosi.de> | 2023-11-08 14:39:42 +0100 |
---|---|---|
committer | Luflosi <luflosi@luflosi.de> | 2023-11-08 15:21:34 +0100 |
commit | e947b23190f5793c06f42b59865638a68b170552 (patch) | |
tree | 4983ebfba128c4679ccae3976ae79029008cba74 | |
parent | 9882bdee1eab1fc5d78eb357c4e4858fdf8a4996 (diff) |
yosys: use finalAttrs
-rw-r--r-- | pkgs/development/compilers/yosys/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/compilers/yosys/default.nix b/pkgs/development/compilers/yosys/default.nix index 73fbb209b1ba9..3761090c3e43c 100644 --- a/pkgs/development/compilers/yosys/default.nix +++ b/pkgs/development/compilers/yosys/default.nix @@ -69,14 +69,14 @@ let } // (yosys-symbiflow); -in stdenv.mkDerivation rec { +in stdenv.mkDerivation (finalAttrs: { pname = "yosys"; version = "0.34"; src = fetchFromGitHub { owner = "YosysHQ"; repo = "yosys"; - rev = "refs/tags/${pname}-${version}"; + rev = "refs/tags/${finalAttrs.pname}-${finalAttrs.version}"; hash = "sha256-GHDsMBj7DRb9ffESgzd1HzDAA6Cyft5PomidvIMzn9g="; }; @@ -101,7 +101,7 @@ in stdenv.mkDerivation rec { postPatch = '' substituteInPlace ./Makefile \ - --replace 'echo UNKNOWN' 'echo ${builtins.substring 0 10 src.rev}' + --replace 'echo UNKNOWN' 'echo ${builtins.substring 0 10 finalAttrs.src.rev}' chmod +x ./misc/yosys-config.in patchShebangs tests ./misc/yosys-config.in @@ -120,7 +120,7 @@ in stdenv.mkDerivation rec { fi if ! grep -q "YOSYS_VER := $version" Makefile; then - echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (allegedly ${version}), failing." + echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (allegedly ${finalAttrs.version}), failing." exit 1 fi ''; @@ -152,4 +152,4 @@ in stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ shell thoughtpolice emily Luflosi ]; }; -} +}) |