icestorm: use passthru attribute

This commit is contained in:
Emily
2020-02-08 23:00:07 -06:00
committed by Austin Seipp
parent a14a32fd75
commit c2fd1a9418
+7 -5
View File
@@ -13,8 +13,10 @@ stdenv.mkDerivation rec {
pname = "icestorm"; pname = "icestorm";
version = "2019.09.13"; version = "2019.09.13";
pythonPkg = if usePyPy then pypy3 else python3; passthru = rec {
pythonInterp = pythonPkg.interpreter; pythonPkg = if usePyPy then pypy3 else python3;
pythonInterp = pythonPkg.interpreter;
};
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cliffordwolf"; owner = "cliffordwolf";
@@ -24,7 +26,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ pythonPkg libftdi1 ]; buildInputs = [ passthru.pythonPkg libftdi1 ];
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
enableParallelBuilding = true; enableParallelBuilding = true;
@@ -39,12 +41,12 @@ stdenv.mkDerivation rec {
--replace /usr/local/share "$out/share" --replace /usr/local/share "$out/share"
for x in icefuzz/Makefile icebox/Makefile icetime/Makefile; do for x in icefuzz/Makefile icebox/Makefile icetime/Makefile; do
substituteInPlace "$x" --replace python3 "${pythonInterp}" substituteInPlace "$x" --replace python3 "${passthru.pythonInterp}"
done done
for x in $(find . -type f -iname '*.py'); do for x in $(find . -type f -iname '*.py'); do
substituteInPlace "$x" \ substituteInPlace "$x" \
--replace '/usr/bin/env python3' '${pythonInterp}' --replace '/usr/bin/env python3' '${passthru.pythonInterp}'
done done
''; '';