Merge pull request #19925 from FRidh/dup

duplicity: use buildPythonApplication
This commit is contained in:
Frederik Rietdijk 2016-11-07 11:41:32 +01:00 committed by GitHub
commit bb35828d97

View file

@ -3,8 +3,7 @@
let let
version = "0.7.07.1"; version = "0.7.07.1";
inherit (python2Packages) boto cffi cryptography ecdsa enum idna ipaddress lockfile paramiko pyasn1 pycrypto python setuptools six; in python2Packages.buildPythonApplication {
in stdenv.mkDerivation {
name = "duplicity-${version}"; name = "duplicity-${version}";
src = fetchurl { src = fetchurl {
@ -12,16 +11,21 @@ in stdenv.mkDerivation {
sha256 = "594c6d0e723e56f8a7114d57811c613622d535cafdef4a3643a4d4c89c1904f8"; sha256 = "594c6d0e723e56f8a7114d57811c613622d535cafdef4a3643a4d4c89c1904f8";
}; };
installPhase = '' postInstall = ''
python setup.py install --prefix=$out
wrapProgram $out/bin/duplicity \ wrapProgram $out/bin/duplicity \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${idna}):$(toPythonPath ${cffi}):$(toPythonPath ${ipaddress}):$(toPythonPath ${pyasn1}):$(toPythonPath ${six}):$(toPythonPath ${enum}):$(toPythonPath ${setuptools}):$(toPythonPath ${cryptography}):$(toPythonPath ${pycrypto}):$(toPythonPath ${ecdsa}):$(toPythonPath ${paramiko}):$(toPythonPath ${boto}):$(toPythonPath ${lockfile})" \
--prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}" --prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"
wrapProgram $out/bin/rdiffdir \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${idna}):$(toPythonPath ${cffi}):$(toPythonPath ${ipaddress}):$(toPythonPath ${pyasn1}):$(toPythonPath ${six}):$(toPythonPath ${enum}):$(toPythonPath ${setuptools}):$(toPythonPath ${cryptography}):$(toPythonPath ${pycrypto}):$(toPythonPath ${ecdsa}):$(toPythonPath ${paramiko}):$(toPythonPath ${boto}):$(toPythonPath ${lockfile})"
''; '';
buildInputs = [ python librsync makeWrapper setuptools ]; buildInputs = [ librsync makeWrapper ];
# Inputs for tests. These are added to buildInputs when doCheck = true
checkInputs = with python2Packages; [ lockfile mock pexpect ];
# Many problematic tests
doCheck = false;
propagatedBuildInputs = with python2Packages; [ boto cffi cryptography ecdsa enum idna
ipaddress lockfile paramiko pyasn1 pycrypto six ];
meta = { meta = {
description = "Encrypted bandwidth-efficient backup using the rsync algorithm"; description = "Encrypted bandwidth-efficient backup using the rsync algorithm";