2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, python27Packages, file }:
|
2016-08-16 21:51:21 +01:00
|
|
|
|
|
|
|
let
|
2017-03-18 00:34:28 +00:00
|
|
|
inherit (python27Packages) python;
|
2017-10-28 12:21:26 +01:00
|
|
|
requirements = (import ./requirements.nix {
|
2021-01-14 16:32:14 +00:00
|
|
|
inherit lib fetchurl;
|
2017-10-28 12:21:26 +01:00
|
|
|
pythonPackages = python27Packages;
|
|
|
|
});
|
|
|
|
|
2017-03-18 00:34:28 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2018-11-04 23:37:04 +00:00
|
|
|
pname = "salut-a-toi";
|
2017-03-18 00:34:28 +00:00
|
|
|
version = "0.6.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-11-04 23:37:04 +00:00
|
|
|
url = "ftp://ftp.goffi.org/sat/sat-${version}.tar.bz2";
|
2017-03-18 00:34:28 +00:00
|
|
|
sha256 = "0kn9403n8fpzl0hsb9kkzicsmzq2fjl627l31yykbqzc4nsr780d";
|
|
|
|
};
|
|
|
|
|
2017-10-28 12:21:26 +01:00
|
|
|
buildInputs = with python27Packages;
|
2012-09-13 11:14:49 +01:00
|
|
|
[
|
2017-05-01 05:47:47 +01:00
|
|
|
python twisted urwid wxPython pygobject2
|
2017-10-28 12:21:26 +01:00
|
|
|
dbus-python wrapPython setuptools file
|
2017-03-18 00:34:28 +00:00
|
|
|
pycrypto pyxdg
|
2017-10-28 12:21:26 +01:00
|
|
|
] ++ (with requirements; [
|
|
|
|
pyfeed
|
|
|
|
wokkel
|
|
|
|
]);
|
2012-09-13 11:14:49 +01:00
|
|
|
|
2017-03-18 00:34:28 +00: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
|
|
|
|
2017-10-28 12:21:26 +01:00
|
|
|
echo 'import wokkel.muc' | python
|
2017-03-18 00:34:28 +00:00
|
|
|
'';
|
2012-09-13 11:14:49 +01:00
|
|
|
|
2017-03-18 00:34:28 +00:00
|
|
|
buildPhase = ''
|
|
|
|
${python.interpreter} setup.py build
|
|
|
|
'';
|
2012-09-13 11:14:49 +01:00
|
|
|
|
2017-03-18 00:34:28 +00:00
|
|
|
installPhase = ''
|
|
|
|
${python.interpreter} setup.py install --prefix="$out"
|
2012-09-13 11:46:45 +01:00
|
|
|
|
2017-03-18 00:34:28 +00:00
|
|
|
for i in "$out/bin"/*; do
|
2012-09-13 11:46:45 +01:00
|
|
|
head -n 1 "$i" | grep -E '[/ ]python( |$)' && {
|
2016-08-16 21:51:21 +01:00
|
|
|
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH:$out/${python.sitePackages}"
|
2017-10-28 12:21:26 +01:00
|
|
|
} || true
|
2017-03-18 00:34:28 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://sat.goffi.org/";
|
2017-03-18 00:34:28 +00:00
|
|
|
description = "A multi-frontend XMPP client";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
}
|