1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 19:45:54 +00:00
nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix

62 lines
1.7 KiB
Nix
Raw Normal View History

{ 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";
version = "0.6.1";
pname = "sat-${version}";
src = fetchurl {
url = "ftp://ftp.goffi.org/sat/${pname}.tar.bz2";
sha256 = "0kn9403n8fpzl0hsb9kkzicsmzq2fjl627l31yykbqzc4nsr780d";
};
buildInputs = with python27Packages;
2012-09-13 11:14:49 +01:00
[
python twisted urwid wxPython pygobject2
dbus-python wrapPython setuptools file
pycrypto pyxdg
] ++ (with requirements; [
pyfeed
wokkel
]);
2012-09-13 11:14:49 +01:00
configurePhase = ''
sed -i "/use_setuptools/d" setup.py
sed -e "s@sys.prefix@'$out'@g" -i setup.py
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
2012-09-13 11:14:49 +01:00
echo 'import wokkel.muc' | python
'';
2012-09-13 11:14:49 +01:00
buildPhase = ''
${python.interpreter} setup.py build
'';
2012-09-13 11:14:49 +01:00
installPhase = ''
${python.interpreter} setup.py install --prefix="$out"
2012-09-13 11:46:45 +01:00
for i in "$out/bin"/*; do
2012-09-13 11:46:45 +01:00
head -n 1 "$i" | grep -E '[/ ]python( |$)' && {
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH:$out/${python.sitePackages}"
} || true
done
'';
meta = with stdenv.lib; {
homepage = http://sat.goffi.org/;
description = "A multi-frontend XMPP client";
platforms = platforms.linux;
maintainers = [ maintainers.raskin ];
license = licenses.gpl3Plus;
};
}