z3: use python2

+18 -14
+9 -7
pkgs/applications/science/logic/z3/default.nix
··· 1 - { stdenv, fetchFromGitHub, python }: 1 + { stdenv, fetchFromGitHub, python2 }: 2 2 3 - stdenv.mkDerivation rec { 3 + let 4 + python = python2; 5 + in stdenv.mkDerivation rec { 4 6 name = "z3-${version}"; 5 7 version = "4.4.1"; 6 8 ··· 14 16 buildInputs = [ python ]; 15 17 enableParallelBuilding = true; 16 18 17 - configurePhase = "python scripts/mk_make.py --prefix=$out && cd build"; 19 + configurePhase = "${python.interpreter} scripts/mk_make.py --prefix=$out && cd build"; 18 20 19 21 # z3's install phase is stupid because it tries to calculate the 20 22 # python package store location itself, meaning it'll attempt to 21 23 # write files into the nix store, and fail. 22 24 soext = if stdenv.system == "x86_64-darwin" then ".dylib" else ".so"; 23 25 installPhase = '' 24 - mkdir -p $out/bin $out/lib/${python.libPrefix}/site-packages $out/include 26 + mkdir -p $out/bin $out/${python.sitePackages} $out/include 25 27 cp ../src/api/z3*.h $out/include 26 28 cp ../src/api/c++/z3*.h $out/include 27 29 cp z3 $out/bin 28 30 cp libz3${soext} $out/lib 29 - cp libz3${soext} $out/lib/${python.libPrefix}/site-packages 30 - cp z3*.pyc $out/lib/${python.libPrefix}/site-packages 31 - cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages 31 + cp libz3${soext} $out/${python.sitePackages} 32 + cp z3*.pyc $out/${python.sitePackages} 33 + cp ../src/api/python/*.py $out/${python.sitePackages} 32 34 ''; 33 35 34 36 meta = {
+9 -7
pkgs/applications/science/logic/z3_opt/default.nix
··· 1 - { stdenv, fetchFromGitHub, python }: 1 + { stdenv, fetchFromGitHub, python2 }: 2 2 3 3 # Copied shamelessly from the normal z3 .nix 4 4 5 - stdenv.mkDerivation rec { 5 + let 6 + python = python2; 7 + in stdenv.mkDerivation rec { 6 8 name = "z3_opt-${version}"; 7 9 version = "4.3.2"; 8 10 ··· 16 18 buildInputs = [ python ]; 17 19 enableParallelBuilding = true; 18 20 19 - configurePhase = "python scripts/mk_make.py --prefix=$out && cd build"; 21 + configurePhase = "${python.interpreter} scripts/mk_make.py --prefix=$out && cd build"; 20 22 21 23 # z3's install phase is stupid because it tries to calculate the 22 24 # python package store location itself, meaning it'll attempt to 23 25 # write files into the nix store, and fail. 24 26 soext = if stdenv.system == "x86_64-darwin" then ".dylib" else ".so"; 25 27 installPhase = '' 26 - mkdir -p $out/bin $out/lib/${python.libPrefix}/site-packages $out/include 28 + mkdir -p $out/bin $out/${python.sitePackages} $out/include 27 29 cp ../src/api/z3*.h $out/include 28 30 cp ../src/api/c++/z3*.h $out/include 29 31 cp z3 $out/bin 30 32 cp libz3${soext} $out/lib 31 - cp libz3${soext} $out/lib/${python.libPrefix}/site-packages 32 - cp z3*.pyc $out/lib/${python.libPrefix}/site-packages 33 - cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages 33 + cp libz3${soext} $out/${python.sitePackages} 34 + cp z3*.pyc $out/${python.sitePackages} 35 + cp ../src/api/python/*.py $out/${python.sitePackages} 34 36 ''; 35 37 36 38 meta = {