diff options
author | Robin Gloster <mail@glob.in> | 2016-01-24 15:50:54 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-01-30 20:31:02 +0000 |
commit | 96350a9ec943640c8567224d5aa000d1affe7a59 (patch) | |
tree | 8ac110374bece0ce20b0e3fea748dba7019b483e | |
parent | 63e6cca2a9982218179eeda0047362931b75f34a (diff) |
pyMAILt: use mkDerivation
-rw-r--r-- | pkgs/servers/xmpp/pyMAILt/default.nix | 36 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 18 insertions, 20 deletions
diff --git a/pkgs/servers/xmpp/pyMAILt/default.nix b/pkgs/servers/xmpp/pyMAILt/default.nix index eb4f55f7aebd1..f5a91b28633f5 100644 --- a/pkgs/servers/xmpp/pyMAILt/default.nix +++ b/pkgs/servers/xmpp/pyMAILt/default.nix @@ -1,39 +1,37 @@ -a @ { xmpppy, python, makeWrapper, fetchcvs, ... } : -let - fetchurl = a.fetchurl; +{ stdenv, python, xmpppy, pythonPackages, fetchcvs } : - buildInputs = with a; [ - xmpppy python makeWrapper - ]; -in -rec { - src = a.fetchcvs { +stdenv.mkDerivation rec { + name = "pyMAILt-${version}"; + version = "20090101"; + + src = fetchcvs { cvsRoot = ":pserver:anonymous@xmpppy.cvs.sourceforge.net:/cvsroot/xmpppy"; module = "xmpppy/mail-transport"; date = "2009-01-01"; sha256 = "15301252e52b4ccb2156baefed8982a2a0cce3ae8eae3caf3cc28dfa615c8d6e"; }; - inherit buildInputs; - configureFlags = []; + pythonPath = [ xmpppy ]; + buildInputs = [ pythonPackages.wrapPython ]; /* doConfigure should be removed if not needed */ - phaseNames = ["deploy" (a.makeManyWrappers "$out/share/${name}/mail.py" a.pythonWrapperArguments)]; - deploy = a.fullDepEntry ('' + installPhase = '' cd mail-transport mkdir -p $out/bin $out/share/${name} - sed -e 's@/usr/bin/@${a.python}/bin/@' -i mail.py + sed -e 's@/usr/bin/@${python}/bin/@' -i mail.py sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.pyMAILt.xml"]' -i config.py sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.python-mail-transport.xml"]' -i config.py sed -e '/configFiles/iimport os' -i config.py cp * $out/share/$name - echo "#! /bin/sh" > $out/bin/pyMAILt - echo "cd $out/share/${name}" >> $out/bin/pyMAILt - echo "./mail.py \"$@\"" >> $out/bin/pyMAILt + cat > $out/bin/pyMAILt <<EOF + #! /bin/sh + cd $out/share/${name} + ./mail.py \"$@\" + EOF chmod a+rx $out/bin/pyMAILt $out/share/${name}/mail.py - '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; + wrapPythonPrograms + ''; - name = "pyMAILt-20090101"; meta = { description = "Email transport module for XMPP"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ca43d9502aa23..26d8f61e4fdcb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9573,7 +9573,7 @@ let pyIRCt = callPackage ../servers/xmpp/pyIRCt {}; - pyMAILt = builderDefsPackage (callPackage ../servers/xmpp/pyMAILt) {}; + pyMAILt = callPackage ../servers/xmpp/pyMAILt {}; qpid-cpp = callPackage ../servers/amqp/qpid-cpp { boost = boost155; |