##// END OF EJS Templates
nix: generate shell fix env flags.
marcink -
r971:339e78cd python3
parent child Browse files
Show More
@@ -1,63 +1,59 b''
1 1 { pkgs ? (import <nixpkgs> {})
2 2 , pythonPackages ? "python27Packages"
3 3 }:
4 4
5 5 with pkgs.lib;
6 6
7 7 let
8 8 _pythonPackages = pythonPackages;
9 9
10 10 in
11 11
12 12 let
13 13 pythonPackages = getAttr _pythonPackages pkgs;
14 14
15 15 pip2nix = import ./nix-common/pip2nix.nix {
16 16 inherit
17 17 pkgs
18 18 pythonPackages;
19 19 };
20 20
21 21 in
22 22
23 23 pkgs.stdenv.mkDerivation {
24 24 name = "pip2nix-generated";
25 25
26 26 buildInputs = [
27 27 # Allows to generate python packages
28 28 pip2nix.pip2nix
29 29 pythonPackages.pip-tools
30 30 # compile using ffi
31 31 pkgs.libffi
32 32
33 33 pkgs.apr
34 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 37 shellHook = ''
44 38 runHook preShellHook
45 39 echo "Setting SVN_* variables"
46 40 export SVN_LIBRARY_PATH=${pkgs.subversion}/lib
47 41 export SVN_HEADER_PATH=${pkgs.subversion.dev}/include
48 42 runHook postShellHook
49 43 '';
50 44
51 45 preShellHook = ''
52 46 echo "Starting Generate Shell"
53 47 # set unpack source date to 1980 to fix ZIP problems that does not support <1980
54 48 export SOURCE_DATE_EPOCH=315532800
55 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 53 # Custom prompt to distinguish from other dev envs.
58 54 export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] "
59 55
60 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