git.iko.soy/typeable/nixpkgs
on master help sign in
duplicity: use buildPythonApplication
commitcbc25e55068eb61644deacdd4f9ff883140f064c authorFrederik Rietdijk <fridh@fridh.nl> dateThu 27 Oct 2016, 17:15 (10 years ago) parent84268a5
1 file changed+12−8
pkgs/tools/backup/duplicity/default.nix+12−8
pkgs/tools/backup/duplicity/default.nix+12−8
@@ -3,8 +3,7 @@
33
44let
55 version = "0.7.07.1";
6− inherit (python2Packages) boto cffi cryptography ecdsa enum idna ipaddress lockfile paramiko pyasn1 pycrypto python setuptools six;
7−in stdenv.mkDerivation {
6+in python2Packages.buildPythonApplication {
87 name = "duplicity-${version}";
98
109 src = fetchurl {
@@ -12,16 +11,21 @@ in stdenv.mkDerivation {
1211 sha256 = "594c6d0e723e56f8a7114d57811c613622d535cafdef4a3643a4d4c89c1904f8";
1312 };
1413
15− installPhase = ''
16− python setup.py install --prefix=$out
14+ postInstall = ''
1715 wrapProgram $out/bin/duplicity \
18− --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})" \
1916 --prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"
20− wrapProgram $out/bin/rdiffdir \
21− --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})"
2217 '';
2318
24− buildInputs = [ python librsync makeWrapper setuptools ];
19+ buildInputs = [ librsync makeWrapper ];
20+
21+ # Inputs for tests. These are added to buildInputs when doCheck = true
22+ checkInputs = with python2Packages; [ lockfile mock pexpect ];
23+
24+ # Many problematic tests
25+ doCheck = false;
26+
27+ propagatedBuildInputs = with python2Packages; [ boto cffi cryptography ecdsa enum idna
28+ ipaddress lockfile paramiko pyasn1 pycrypto six ];
2529
2630 meta = {
2731 description = "Encrypted bandwidth-efficient backup using the rsync algorithm";