mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
tarsnapper: 0.2.1 -> 0.4
- project is not a python library -> move out of pythonPackages. - also enable tests
This commit is contained in:
parent
dca801fbb7
commit
f31773b852
@ -1,20 +0,0 @@
|
||||
diff --git a/src/tarsnapper/script.py b/src/tarsnapper/script.py
|
||||
index 737ac8d..52cc775 100644
|
||||
--- a/src/tarsnapper/script.py
|
||||
+++ b/src/tarsnapper/script.py
|
||||
@@ -48,7 +48,7 @@ class TarsnapBackend(object):
|
||||
"""
|
||||
``arguments`` is a single list of strings.
|
||||
"""
|
||||
- call_with = ['tarsnap']
|
||||
+ call_with = ['@NIXTARSNAPPATH@']
|
||||
for option in self.options:
|
||||
key = option[0]
|
||||
pre = "-" if len(key) == 1 else "--"
|
||||
@@ -499,4 +499,4 @@ def run():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
- run()
|
||||
\ No newline at end of file
|
||||
+ run()
|
25
pkgs/tools/backup/tarsnapper/default.nix
Normal file
25
pkgs/tools/backup/tarsnapper/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ python3Packages, fetchFromGitHub , tarsnap }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "tarsnapper-${version}";
|
||||
version = "0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "miracle2k";
|
||||
repo = "tarsnapper";
|
||||
rev = version;
|
||||
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
|
||||
};
|
||||
|
||||
buildInputs = with python3Packages; [ nose pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
py.test .
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ pyyaml dateutil pexpect ];
|
||||
|
||||
patches = [ ./remove-argparse.patch ];
|
||||
|
||||
makeWrapperArgs = ["--prefix PATH : ${tarsnap}/bin"];
|
||||
}
|
10
pkgs/tools/backup/tarsnapper/remove-argparse.patch
Normal file
10
pkgs/tools/backup/tarsnapper/remove-argparse.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- tarsnapper-0.4-src.org/setup.py 1980-01-02 00:00:00.000000000 +0000
|
||||
+++ tarsnapper-0.4-src/setup.py 2017-07-16 10:54:36.596499451 +0100
|
||||
@@ -45,6 +45,6 @@
|
||||
url='http://github.com/miracle2k/tarsnapper',
|
||||
license='BSD',
|
||||
packages=['tarsnapper'],
|
||||
- install_requires = ['argparse>=1.1', 'pyyaml>=3.09', 'python-dateutil>=2.4.0', 'pexpect>=3.1'],
|
||||
+ install_requires = ['pyyaml>=3.09', 'python-dateutil>=2.4.0', 'pexpect>=3.1'],
|
||||
**kw
|
||||
)
|
@ -4370,6 +4370,8 @@ with pkgs;
|
||||
|
||||
tarsnap = callPackage ../tools/backup/tarsnap { };
|
||||
|
||||
tarsnapper = callPackage ../tools/backup/tarsnapper { };
|
||||
|
||||
tcpcrypt = callPackage ../tools/security/tcpcrypt { };
|
||||
|
||||
tcptraceroute = callPackage ../tools/networking/tcptraceroute { };
|
||||
|
@ -23664,26 +23664,6 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
tarsnapper = buildPythonPackage rec {
|
||||
name = "tarsnapper-0.2.1";
|
||||
disabled = isPy3k;
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = https://github.com/miracle2k/tarsnapper.git;
|
||||
rev = "620439bca68892f2ffaba1079a34b18496cc6596";
|
||||
sha256 = "1n2k2r9x11r1ph9jcjhlk44hsghfnl1pl3aakbx121qc5dg7b0yn";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ argparse pyyaml ];
|
||||
|
||||
patches = [ ../development/python-modules/tarsnapper-path.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace src/tarsnapper/script.py \
|
||||
--replace '@NIXTARSNAPPATH@' '${pkgs.tarsnap}/bin/tarsnap'
|
||||
'';
|
||||
};
|
||||
|
||||
taskcoach = buildPythonPackage rec {
|
||||
name = "TaskCoach-1.3.22";
|
||||
disabled = isPy3k;
|
||||
|
Loading…
Reference in New Issue
Block a user