sby: cleanup (#422446)
This commit is contained in:
@@ -17,28 +17,17 @@ let
|
||||
pythonEnv = python3.withPackages (ps: with ps; [ click ]);
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sby";
|
||||
version = "0.56";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "YosysHQ";
|
||||
repo = "sby";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-uKndGUoLbG7SBhsOSYyM/v9g33pq7zFFajzvTUYa7NY=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3
|
||||
python3.pkgs.xmlschema
|
||||
yosys
|
||||
boolector
|
||||
yices
|
||||
z3
|
||||
aiger
|
||||
btor2tools
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build \
|
||||
docs/source/conf.py \
|
||||
@@ -54,9 +43,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Fix various executable references
|
||||
substituteInPlace sbysrc/sby_core.py \
|
||||
--replace-fail '"/usr/bin/env", "bash"' '"${bash}/bin/bash"' \
|
||||
--replace-fail ', "btormc"' ', "${boolector}/bin/btormc"' \
|
||||
--replace-fail ', "aigbmc"' ', "${aiger}/bin/aigbmc"'
|
||||
--replace-fail '"/usr/bin/env", "bash"' '"${lib.getExe bash}"' \
|
||||
--replace-fail ', "btormc"' ', "${lib.getExe' boolector "btormc"}"' \
|
||||
--replace-fail ', "aigbmc"' ', "${lib.getExe' aiger "aigbmc"}"'
|
||||
|
||||
substituteInPlace sbysrc/sby_core.py \
|
||||
--replace-fail '##yosys-program-prefix##' '"${yosys}/bin/"'
|
||||
@@ -64,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace sbysrc/sby.py \
|
||||
--replace-fail '/usr/bin/env python3' '${pythonEnv}/bin/python'
|
||||
substituteInPlace sbysrc/sby_autotune.py \
|
||||
--replace-fail '["btorsim", "--vcd"]' '["${btor2tools}/bin/btorsim", "--vcd"]'
|
||||
--replace-fail '["btorsim", "--vcd"]' '["${lib.getExe' btor2tools "btorsim"}", "--vcd"]'
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
@@ -80,6 +69,17 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3
|
||||
python3.pkgs.xmlschema
|
||||
yosys
|
||||
boolector
|
||||
yices
|
||||
z3
|
||||
aiger
|
||||
btor2tools
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
@@ -100,4 +100,4 @@ stdenv.mkDerivation rec {
|
||||
mainProgram = "sby";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user