salut-a-toi: Move pythonPackages dependencies not required by other packages into salut-a-toi derivation

This commit is contained in:
adisbladis 2017-10-28 19:21:26 +08:00
parent 552922cf53
commit 49a1221562
No known key found for this signature in database
GPG Key ID: ED58F95069B004F5
4 changed files with 81 additions and 68 deletions

@ -1,7 +1,12 @@
{stdenv, fetchurl, python27Packages, file }:
{ stdenv, fetchurl, python27Packages, file }:
let
inherit (python27Packages) python;
requirements = (import ./requirements.nix {
inherit stdenv fetchurl;
pythonPackages = python27Packages;
});
in
stdenv.mkDerivation rec {
name = "salut-a-toi";
@ -13,12 +18,15 @@ in
sha256 = "0kn9403n8fpzl0hsb9kkzicsmzq2fjl627l31yykbqzc4nsr780d";
};
buildInputs = with python27Packages;
buildInputs = with python27Packages;
[
python twisted urwid wxPython pygobject2
wokkel dbus-python pyfeed wrapPython setuptools file
dbus-python wrapPython setuptools file
pycrypto pyxdg
];
] ++ (with requirements; [
pyfeed
wokkel
]);
configurePhase = ''
sed -i "/use_setuptools/d" setup.py
@ -26,7 +34,7 @@ in
sed -e "1aexport PATH=\"\$PATH\":\"$out/bin\":\"${python27Packages.twisted}/bin\"" -i src/sat.sh
sed -e "1aexport PYTHONPATH=\"\$PYTHONPATHPATH\":\"$PYTHONPATH\":"$out/${python.sitePackages}"" -i src/sat.sh
echo 'import wokkel.muc' | python
echo 'import wokkel.muc' | python
'';
buildPhase = ''
@ -39,7 +47,7 @@ in
for i in "$out/bin"/*; do
head -n 1 "$i" | grep -E '[/ ]python( |$)' && {
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH:$out/${python.sitePackages}"
} || true
} || true
done
'';

@ -0,0 +1,67 @@
{ fetchurl
, stdenv
, pythonPackages
}:
let
buildPythonPackage = pythonPackages.buildPythonPackage;
xe = buildPythonPackage rec {
url = "http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz";
name = stdenv.lib.nameFromURL url ".tar";
src = fetchurl {
inherit url;
sha256 = "0v9878cl0y9cczdsr6xjy8v9l139lc23h4m5f86p4kpf2wlnpi42";
};
# error: invalid command 'test'
doCheck = false;
meta = {
homepage = "http://home.blarg.net/~steveha/xe.html";
description = "XML elements";
};
};
in {
pyfeed = (buildPythonPackage rec {
url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz";
name = stdenv.lib.nameFromURL url ".tar";
src = fetchurl {
inherit url;
sha256 = "1h4msq573m7wm46h3cqlx4rsn99f0l11rhdqgf50lv17j8a8vvy1";
};
propagatedBuildInputs = [ xe ];
# error: invalid command 'test'
doCheck = false;
meta = with stdenv.lib; {
homepage = "http://home.blarg.net/~steveha/pyfeed.html";
description = "Tools for syndication feeds";
};
});
wokkel = buildPythonPackage (rec {
url = "http://wokkel.ik.nu/releases/0.7.0/wokkel-0.7.0.tar.gz";
name = stdenv.lib.nameFromURL url ".tar";
src = fetchurl {
inherit url;
sha256 = "0rnshrzw8605x05mpd8ndrx3ri8h6cx713mp8sl4f04f4gcrz8ml";
};
propagatedBuildInputs = with pythonPackages; [twisted dateutil];
meta = with stdenv.lib; {
description = "Some (mainly XMPP-related) additions to twisted";
homepage = "http://wokkel.ik.nu/";
license = licenses.mit;
};
});
}

@ -1,23 +0,0 @@
{ stdenv, buildPythonPackage, fetchurl
, xe }:
buildPythonPackage rec {
url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz";
name = stdenv.lib.nameFromURL url ".tar";
src = fetchurl {
inherit url;
sha256 = "1h4msq573m7wm46h3cqlx4rsn99f0l11rhdqgf50lv17j8a8vvy1";
};
propagatedBuildInputs = [ xe ];
# error: invalid command 'test'
doCheck = false;
meta = with stdenv.lib; {
homepage = "http://home.blarg.net/~steveha/pyfeed.html";
description = "Tools for syndication feeds";
};
}

@ -16258,8 +16258,6 @@ in {
};
};
pyfeed = callPackage ../development/python-modules/pyfeed { };
pyfftw = callPackage ../development/python-modules/pyfftw { };
pyfiglet = callPackage ../development/python-modules/pyfiglet { };
@ -21547,26 +21545,6 @@ EOF
widgetsnbextension = callPackage ../development/python-modules/widgetsnbextension { };
wokkel = buildPythonPackage (rec {
url = "http://wokkel.ik.nu/releases/0.7.0/wokkel-0.7.0.tar.gz";
name = nameFromURL url ".tar";
src = pkgs.fetchurl {
inherit url;
sha256 = "0rnshrzw8605x05mpd8ndrx3ri8h6cx713mp8sl4f04f4gcrz8ml";
};
disabled = isPy3k;
propagatedBuildInputs = with self; [twisted dateutil];
meta = {
description = "Some (mainly XMPP-related) additions to twisted";
homepage = "http://wokkel.ik.nu/";
license = licenses.mit;
};
});
magic-wormhole = callPackage ../development/python-modules/magic-wormhole { };
wsgiproxy2 = buildPythonPackage rec {
@ -21607,23 +21585,6 @@ EOF
propagatedBuildInputs = with self; [ eventlib application ];
};
xe = buildPythonPackage rec {
url = "http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz";
name = stdenv.lib.nameFromURL url ".tar";
src = pkgs.fetchurl {
inherit url;
sha256 = "0v9878cl0y9cczdsr6xjy8v9l139lc23h4m5f86p4kpf2wlnpi42";
};
# error: invalid command 'test'
doCheck = false;
meta = {
homepage = "http://home.blarg.net/~steveha/xe.html";
description = "XML elements";
};
};
xlib = buildPythonPackage (rec {
name = "xlib-${version}";
version = "0.17";