tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python: add python.withPackages function
Fixes #15801
Benno Fünfstück
9 years ago
c3ed3914
41fa1335
+14
-2
6 changed files
expand all
collapse all
unified
split
pkgs
development
interpreters
python
2.6
default.nix
2.7
default.nix
3.3
default.nix
3.4
default.nix
3.5
default.nix
with-packages.nix
+3
-1
pkgs/development/interpreters/python/2.6/default.nix
···
1
1
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, includeModules ? false
2
2
-
, sqlite, tcl, tk, xlibsWrapper, openssl, readline, db, ncurses, gdbm, self, callPackage }:
2
2
+
, sqlite, tcl, tk, xlibsWrapper, openssl, readline, db, ncurses, gdbm, self, callPackage
3
3
+
, python26Packages }:
3
4
4
5
assert zlibSupport -> zlib != null;
5
6
···
97
98
isPy2 = true;
98
99
isPy26 = true;
99
100
buildEnv = callPackage ../wrapper.nix { python = self; };
101
101
+
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python26Packages; };
100
102
libPrefix = "python${majorVersion}";
101
103
executable = libPrefix;
102
104
sitePackages = "lib/${libPrefix}/site-packages";
+2
-1
pkgs/development/interpreters/python/2.7/default.nix
···
1
1
-
{ stdenv, fetchurl, self, callPackage
1
1
+
{ stdenv, fetchurl, self, callPackage, python27Packages
2
2
, bzip2, openssl, gettext
3
3
4
4
, includeModules ? false
···
151
151
isPy2 = true;
152
152
isPy27 = true;
153
153
buildEnv = callPackage ../wrapper.nix { python = self; };
154
154
+
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python27Packages; };
154
155
libPrefix = "python${majorVersion}";
155
156
executable = libPrefix;
156
157
sitePackages = "lib/${libPrefix}/site-packages";
+2
pkgs/development/interpreters/python/3.3/default.nix
···
12
12
, zlib
13
13
, callPackage
14
14
, self
15
15
+
, python33Packages
15
16
}:
16
17
17
18
assert readline != null -> ncurses != null;
···
81
82
libPrefix = "python${majorVersion}";
82
83
executable = "python3.3m";
83
84
buildEnv = callPackage ../wrapper.nix { python = self; };
85
85
+
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; };
84
86
isPy3 = true;
85
87
isPy33 = true;
86
88
is_py3k = true; # deprecated
+2
pkgs/development/interpreters/python/3.4/default.nix
···
12
12
, zlib
13
13
, callPackage
14
14
, self
15
15
+
, python34Packages
15
16
16
17
, CF, configd
17
18
}:
···
104
105
libPrefix = "python${majorVersion}";
105
106
executable = "python3.4m";
106
107
buildEnv = callPackage ../wrapper.nix { python = self; };
108
108
+
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; };
107
109
isPy3 = true;
108
110
isPy34 = true;
109
111
is_py3k = true; # deprecated
+2
pkgs/development/interpreters/python/3.5/default.nix
···
12
12
, zlib
13
13
, callPackage
14
14
, self
15
15
+
, python35Packages
15
16
16
17
, CF, configd
17
18
}:
···
104
105
libPrefix = "python${majorVersion}";
105
106
executable = "python${majorVersion}m";
106
107
buildEnv = callPackage ../wrapper.nix { python = self; };
108
108
+
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; };
107
109
isPy3 = true;
108
110
isPy35 = true;
109
111
is_py3k = true; # deprecated
+3
pkgs/development/interpreters/python/with-packages.nix
···
1
1
+
{ buildEnv, pythonPackages }:
2
2
+
3
3
+
f: let packages = f pythonPackages; in buildEnv.override { extraLibs = packages; }