Skip to content

Commit

Permalink
Merge pull request #266486 from Luflosi/update/yosys
Browse files Browse the repository at this point in the history
yosys: 0.34 -> 0.35
  • Loading branch information
delroth committed Nov 12, 2023
2 parents 8ee39d8 + 4647816 commit 4098144
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
27 changes: 17 additions & 10 deletions pkgs/applications/science/logic/abc/default.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
{ lib, stdenv, fetchFromGitHub
, readline, cmake
{ lib
, stdenv
, fetchFromGitHub
, readline
, cmake
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "abc-verifier";
version = "unstable-2023-09-13";
version = "unstable-2023-10-13";

src = fetchFromGitHub {
owner = "yosyshq";
repo = "abc";
rev = "daad9ede0137dc58487a0abc126253e671a85b14";
hash = "sha256-5XeFYvdqT08xduFUDC5yK1jEOV1fYzyQD7N9ZmG3mpQ=";
rev = "896e5e7dedf9b9b1459fa019f1fa8aa8101fdf43";
hash = "sha256-ou+E2lvDEOxXRXNygE/TyVi7quqk+CJHRI+HDI0xljE=";
};

nativeBuildInputs = [ cmake ];
buildInputs = [ readline ];

installPhase = "mkdir -p $out/bin && mv abc $out/bin";
installPhase = ''
runHook preInstall
install -Dm755 'abc' "$out/bin/abc"
runHook postInstall
'';

# needed by yosys
passthru.rev = src.rev;
passthru.rev = finalAttrs.src.rev;

meta = with lib; {
description = "A tool for squential logic synthesis and formal verification";
homepage = "https://people.eecs.berkeley.edu/~alanmi/abc";
license = licenses.mit;
maintainers = with maintainers; [ thoughtpolice ];
maintainers = with maintainers; [ thoughtpolice Luflosi ];
mainProgram = "abc";
platforms = platforms.unix;
};
}
})
16 changes: 8 additions & 8 deletions pkgs/development/compilers/yosys/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ let
} // (yosys-symbiflow);


in stdenv.mkDerivation rec {
in stdenv.mkDerivation (finalAttrs: {
pname = "yosys";
version = "0.34";
version = "0.35";

src = fetchFromGitHub {
owner = "YosysHQ";
repo = "yosys";
rev = "refs/tags/${pname}-${version}";
hash = "sha256-GHDsMBj7DRb9ffESgzd1HzDAA6Cyft5PomidvIMzn9g=";
rev = "refs/tags/${finalAttrs.pname}-${finalAttrs.version}";
hash = "sha256-jB8y7XGDX9rVF6c4FSTLOyvsxPhdjU8Taj6MQeoU4KQ=";
};

enableParallelBuilding = true;
Expand All @@ -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
Expand All @@ -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
'';
Expand Down Expand Up @@ -150,6 +150,6 @@ in stdenv.mkDerivation rec {
homepage = "https://yosyshq.net/yosys/";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ shell thoughtpolice emily ];
maintainers = with maintainers; [ shell thoughtpolice emily Luflosi ];
};
}
})

0 comments on commit 4098144

Please sign in to comment.