tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
z3: use python2
Frederik Rietdijk
9 years ago
8963dae3
6b724f06
+18
-14
2 changed files
expand all
collapse all
unified
split
pkgs
applications
science
logic
z3
default.nix
z3_opt
default.nix
+9
-7
pkgs/applications/science/logic/z3/default.nix
···
1
1
-
{ stdenv, fetchFromGitHub, python }:
1
1
+
{ stdenv, fetchFromGitHub, python2 }:
2
2
3
3
-
stdenv.mkDerivation rec {
3
3
+
let
4
4
+
python = python2;
5
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
17
-
configurePhase = "python scripts/mk_make.py --prefix=$out && cd build";
19
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
24
-
mkdir -p $out/bin $out/lib/${python.libPrefix}/site-packages $out/include
26
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
29
-
cp libz3${soext} $out/lib/${python.libPrefix}/site-packages
30
30
-
cp z3*.pyc $out/lib/${python.libPrefix}/site-packages
31
31
-
cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages
31
31
+
cp libz3${soext} $out/${python.sitePackages}
32
32
+
cp z3*.pyc $out/${python.sitePackages}
33
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
1
-
{ stdenv, fetchFromGitHub, python }:
1
1
+
{ stdenv, fetchFromGitHub, python2 }:
2
2
3
3
# Copied shamelessly from the normal z3 .nix
4
4
5
5
-
stdenv.mkDerivation rec {
5
5
+
let
6
6
+
python = python2;
7
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
19
-
configurePhase = "python scripts/mk_make.py --prefix=$out && cd build";
21
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
26
-
mkdir -p $out/bin $out/lib/${python.libPrefix}/site-packages $out/include
28
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
31
-
cp libz3${soext} $out/lib/${python.libPrefix}/site-packages
32
32
-
cp z3*.pyc $out/lib/${python.libPrefix}/site-packages
33
33
-
cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages
33
33
+
cp libz3${soext} $out/${python.sitePackages}
34
34
+
cp z3*.pyc $out/${python.sitePackages}
35
35
+
cp ../src/api/python/*.py $out/${python.sitePackages}
34
36
'';
35
37
36
38
meta = {