forked from nix-community/pip2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease-shell.nix
34 lines (28 loc) · 932 Bytes
/
release-shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python36Packages"
}:
with pkgs.lib;
let
basePythonPackages = with builtins; if isAttrs pythonPackages
then pythonPackages
else getAttr pythonPackages pkgs;
# Works with the new python-packages, still can fallback to the old
# variant.
basePythonPackagesUnfix = basePythonPackages.__unfix__ or (
self: basePythonPackages.override (a: { inherit self; }));
pythonPackagesLocalOverrides = self: super: {
setuptools = basePythonPackages.setuptools;
};
pythonPackagesGenerated = import ./release-python-packages.nix {
inherit pkgs;
inherit (pkgs) fetchurl fetchgit fetchhg;
};
myPythonPackages =
(fix
(extends pythonPackagesLocalOverrides
(extends pythonPackagesGenerated
basePythonPackagesUnfix)));
in pkgs.stdenv.mkDerivation {
name = "release";
buildInputs = with myPythonPackages; [ twine bumpversion ];
}