Show More
@@ -1,63 +1,59 b'' | |||||
1 | { pkgs ? (import <nixpkgs> {}) |
|
1 | { pkgs ? (import <nixpkgs> {}) | |
2 | , pythonPackages ? "python27Packages" |
|
2 | , pythonPackages ? "python27Packages" | |
3 | }: |
|
3 | }: | |
4 |
|
4 | |||
5 | with pkgs.lib; |
|
5 | with pkgs.lib; | |
6 |
|
6 | |||
7 | let |
|
7 | let | |
8 | _pythonPackages = pythonPackages; |
|
8 | _pythonPackages = pythonPackages; | |
9 |
|
9 | |||
10 | in |
|
10 | in | |
11 |
|
11 | |||
12 | let |
|
12 | let | |
13 | pythonPackages = getAttr _pythonPackages pkgs; |
|
13 | pythonPackages = getAttr _pythonPackages pkgs; | |
14 |
|
14 | |||
15 | pip2nix = import ./nix-common/pip2nix.nix { |
|
15 | pip2nix = import ./nix-common/pip2nix.nix { | |
16 | inherit |
|
16 | inherit | |
17 | pkgs |
|
17 | pkgs | |
18 | pythonPackages; |
|
18 | pythonPackages; | |
19 | }; |
|
19 | }; | |
20 |
|
20 | |||
21 | in |
|
21 | in | |
22 |
|
22 | |||
23 | pkgs.stdenv.mkDerivation { |
|
23 | pkgs.stdenv.mkDerivation { | |
24 | name = "pip2nix-generated"; |
|
24 | name = "pip2nix-generated"; | |
25 |
|
25 | |||
26 | buildInputs = [ |
|
26 | buildInputs = [ | |
27 | # Allows to generate python packages |
|
27 | # Allows to generate python packages | |
28 | pip2nix.pip2nix |
|
28 | pip2nix.pip2nix | |
29 | pythonPackages.pip-tools |
|
29 | pythonPackages.pip-tools | |
30 | # compile using ffi |
|
30 | # compile using ffi | |
31 | pkgs.libffi |
|
31 | pkgs.libffi | |
32 |
|
32 | |||
33 | pkgs.apr |
|
33 | pkgs.apr | |
34 | pkgs.aprutil |
|
34 | pkgs.aprutil | |
35 | ]; |
|
35 | ]; | |
36 |
|
36 | |||
37 | LC_ALL = "en_US.UTF-8"; |
|
|||
38 | LOCALE_ARCHIVE = |
|
|||
39 | if pkgs.stdenv.isLinux |
|
|||
40 | then "${pkgs.glibcLocales}/lib/locale/locale-archive" |
|
|||
41 | else ""; |
|
|||
42 |
|
||||
43 | shellHook = '' |
|
37 | shellHook = '' | |
44 | runHook preShellHook |
|
38 | runHook preShellHook | |
45 | echo "Setting SVN_* variables" |
|
39 | echo "Setting SVN_* variables" | |
46 | export SVN_LIBRARY_PATH=${pkgs.subversion}/lib |
|
40 | export SVN_LIBRARY_PATH=${pkgs.subversion}/lib | |
47 | export SVN_HEADER_PATH=${pkgs.subversion.dev}/include |
|
41 | export SVN_HEADER_PATH=${pkgs.subversion.dev}/include | |
48 | runHook postShellHook |
|
42 | runHook postShellHook | |
49 | ''; |
|
43 | ''; | |
50 |
|
44 | |||
51 | preShellHook = '' |
|
45 | preShellHook = '' | |
52 | echo "Starting Generate Shell" |
|
46 | echo "Starting Generate Shell" | |
53 | # set unpack source date to 1980 to fix ZIP problems that does not support <1980 |
|
47 | # set unpack source date to 1980 to fix ZIP problems that does not support <1980 | |
54 | export SOURCE_DATE_EPOCH=315532800 |
|
48 | export SOURCE_DATE_EPOCH=315532800 | |
55 | export TMPDIR=/tmp |
|
49 | export TMPDIR=/tmp | |
|
50 | export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive" | |||
|
51 | export LC_ALL="en_US.UTF-8" | |||
56 |
|
52 | |||
57 | # Custom prompt to distinguish from other dev envs. |
|
53 | # Custom prompt to distinguish from other dev envs. | |
58 | export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] " |
|
54 | export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] " | |
59 |
|
55 | |||
60 | export PYCURL_SSL_LIBRARY=openssl |
|
56 | export PYCURL_SSL_LIBRARY=openssl | |
61 |
|
57 | |||
62 | ''; |
|
58 | ''; | |
63 | } |
|
59 | } |
General Comments 0
You need to be logged in to leave comments.
Login now