From c2fd1a9418da0327bad0a331036bb64a70bab7b4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 8 Feb 2020 15:31:51 +0000 Subject: [PATCH] icestorm: use passthru attribute --- pkgs/development/tools/icestorm/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/icestorm/default.nix b/pkgs/development/tools/icestorm/default.nix index a7af74a8dc8f..58ccb5d4cef4 100644 --- a/pkgs/development/tools/icestorm/default.nix +++ b/pkgs/development/tools/icestorm/default.nix @@ -13,8 +13,10 @@ stdenv.mkDerivation rec { pname = "icestorm"; version = "2019.09.13"; - pythonPkg = if usePyPy then pypy3 else python3; - pythonInterp = pythonPkg.interpreter; + passthru = rec { + pythonPkg = if usePyPy then pypy3 else python3; + pythonInterp = pythonPkg.interpreter; + }; src = fetchFromGitHub { owner = "cliffordwolf"; @@ -24,7 +26,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ pythonPkg libftdi1 ]; + buildInputs = [ passthru.pythonPkg libftdi1 ]; makeFlags = [ "PREFIX=$(out)" ]; enableParallelBuilding = true; @@ -39,12 +41,12 @@ stdenv.mkDerivation rec { --replace /usr/local/share "$out/share" for x in icefuzz/Makefile icebox/Makefile icetime/Makefile; do - substituteInPlace "$x" --replace python3 "${pythonInterp}" + substituteInPlace "$x" --replace python3 "${passthru.pythonInterp}" done for x in $(find . -type f -iname '*.py'); do substituteInPlace "$x" \ - --replace '/usr/bin/env python3' '${pythonInterp}' + --replace '/usr/bin/env python3' '${passthru.pythonInterp}' done '';