@@ -3,21 +3,17 @@
33
44let
55 deps = import ./deps.nix { inherit fetchurl; };
6− version = "1.3.0";
6+ version = "1.4.0";
77 src = fetchurl {
88 url = "https://github.com/garbas/pypi2nix/archive/v${version}.tar.gz";
9− sha256 = "0mk9v4s51jdrrcs78v3cm131pz3fdhjkd4cmmfn1kkcfcpqzw6j8";
9+ sha256 = "0pkm93lg7i2chcw59bm5yv09qwcq3wifk8hgr6i3dvv20mifbndr";
1010
1111 };
1212in stdenv.mkDerivation rec {
1313 name = "pypi2nix-${version}";
1414 srcs = with deps; [
1515 src
16− pip
1716 click
18− setuptools
19− zcbuildout
20− zcrecipeegg
2117 requests
2218 ]; # six attrs effect ];
2319 buildInputs = [ python zip makeWrapper ];
@@ -26,17 +22,13 @@ in stdenv.mkDerivation rec {
2622 postUnpack = ''
2723 mkdir -p $out/pkgs
2824
29− mv pip-*/pip $out/pkgs/pip
3025 mv click-*/click $out/pkgs/click
31− mv setuptools-*/setuptools $out/pkgs/setuptools
32− mv zc.buildout-*/src/zc $out/pkgs/zc
33− mv zc.recipe.egg-*/src/zc/recipe $out/pkgs/zc/recipe
3426 # mv six-*/six.py $out/pkgs/
3527 # mv attrs-*/src/attr $out/pkgs/attrs
3628 # mv effect-*/effect $out/pkgs/effect
3729 mv requests-*/requests $out/pkgs/
3830
39− if [ -z "$IN_NIX_SHELL" ]; then
31+ if [ "$IN_NIX_SHELL" != "1" ]; then
4032 if [ -e git-export ]; then
4133 mv git-export/src/pypi2nix $out/pkgs/pypi2nix
4234 else
@@ -48,9 +40,9 @@ in stdenv.mkDerivation rec {
4840 commonPhase = ''
4941 mkdir -p $out/bin
5042
51− echo "#!${python}/bin/python3" > $out/bin/pypi2nix
52− echo "import pypi2nix.cli" >> $out/bin/pypi2nix
53− echo "pypi2nix.cli.main()" >> $out/bin/pypi2nix
43+ echo "#!${python.interpreter}" > $out/bin/pypi2nix
44+ echo "import pypi2nix.cli" >> $out/bin/pypi2nix
45+ echo "pypi2nix.cli.main()" >> $out/bin/pypi2nix
5446
5547 chmod +x $out/bin/pypi2nix
5648
@@ -81,6 +73,5 @@ in stdenv.mkDerivation rec {
8173 homepage = https://github.com/garbas/pypi2nix;
8274 description = "A tool that generates nix expressions for your python packages, so you don't have to.";
8375 maintainers = with stdenv.lib.maintainers; [ garbas ];
84− platforms = with stdenv.lib.platforms; unix;
8576 };
8677}