nixpkgs/pkgs/development
Rok Garbas 602f7e5aa4 python: collision in names when developing 2 and more python packages with nix
when you run nix-shell 2 times at the same time of project (but different
branches) you get collision in names inside /tmp folder. i solved this by
hashing current path of developing folder and using that as indentifier while
still keeping name at the end.

diff --git a/pkgs/development/python-modules/generic/default.nix
b/pkgs/development/python-modules/generic/default.nix index 4c9c53a..6ec7934
100644 --- a/pkgs/development/python-modules/generic/default.nix +++
b/pkgs/development/python-modules/generic/default.nix @@ -161,11 +161,12 @@ if
disabled then throw "${name} not supported for interpreter ${python.executabl

   shellHook = attrs.shellHook or ''
     if test -e setup.py; then
-       mkdir -p /tmp/$name/lib/${python.libPrefix}/site-packages
+       tmp_path=/tmp/`pwd | md5sum | cut -f 1 -d " "`-$name
+       mkdir -p $tmp_path/lib/${python.libPrefix}/site-packages
        ${preShellHook}
-       export PATH="/tmp/$name/bin:$PATH"
-       export PYTHONPATH="/tmp/$name/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
-       ${python}/bin/${python.executable} setup.py develop --prefix /tmp/$name
+       export PATH="$tmp_path/bin:$PATH"
+       export PYTHONPATH="$tmp_path/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+       ${python}/bin/${python.executable} setup.py develop --prefix $tmp_path
        ${postShellHook}
     fi
   '';
2014-09-19 14:23:45 +02:00
..
arduino ino: set six as dep 2014-08-27 19:02:05 +02:00
compilers rustc: fixed build after 7068828389 2014-09-16 13:51:57 +02:00
eclipse
guile-modules
interpreters erlang/R17: update to 17.3 2014-09-19 09:23:28 +02:00
libraries libav: update all branches, probably with security fixes 2014-09-19 11:51:28 +02:00
lisp-modules Update ASDF 2014-08-31 18:20:06 +04:00
misc
mobile Make emulator script run without tools in path 2014-09-17 20:58:09 +02:00
ocaml-modules More specific Ocsigen license checked by FlorentBecker 2014-09-18 14:42:54 +04:00
perl-modules
pharo/vm pharo-vm: 2014.06.25 -> 2014.08.14 2014-09-13 08:43:45 +02:00
python-modules python: collision in names when developing 2 and more python packages with nix 2014-09-19 14:23:45 +02:00
qtcreator
r-modules Merge pull request #4090 from michelk/r-jsonlite 2014-09-19 12:41:00 +02:00
ruby-modules
tools Leiningen: Bump to 2.5.0. 2014-09-19 00:29:16 +02:00
web grails: new package 2014-09-18 22:57:03 +02:00