From dca801fbb7031699e4405b139781c03c561ae630 Mon Sep 17 00:00:00 2001 From: Russell O'Connor Date: Sat, 15 Jul 2017 22:58:07 -0400 Subject: [PATCH 1/2] tarsnap: 1.0.37 -> 1.0.38 --- pkgs/tools/backup/tarsnap/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/backup/tarsnap/default.nix b/pkgs/tools/backup/tarsnap/default.nix index 0f95a26c9401..9fca48bde1bb 100644 --- a/pkgs/tools/backup/tarsnap/default.nix +++ b/pkgs/tools/backup/tarsnap/default.nix @@ -8,11 +8,11 @@ let in stdenv.mkDerivation rec { name = "tarsnap-${version}"; - version = "1.0.37"; + version = "1.0.38"; src = fetchurl { url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz"; - sha256 = "1ynv323qi6775lzjb6hvifl8ajkv2bizy43sajadjfqvcl9r96gs"; + sha256 = "0nyd722i7q8h81h5mvwxai0f3jmwd93r3ahjkmr12k55p8c0rvkn"; }; preConfigure = '' From f31773b8522cb4b7966b21d526cac86ef3bc1bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 16 Jul 2017 11:10:10 +0100 Subject: [PATCH 2/2] tarsnapper: 0.2.1 -> 0.4 - project is not a python library -> move out of pythonPackages. - also enable tests --- .../python-modules/tarsnapper-path.patch | 20 --------------- pkgs/tools/backup/tarsnapper/default.nix | 25 +++++++++++++++++++ .../backup/tarsnapper/remove-argparse.patch | 10 ++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 20 --------------- 5 files changed, 37 insertions(+), 40 deletions(-) delete mode 100644 pkgs/development/python-modules/tarsnapper-path.patch create mode 100644 pkgs/tools/backup/tarsnapper/default.nix create mode 100644 pkgs/tools/backup/tarsnapper/remove-argparse.patch diff --git a/pkgs/development/python-modules/tarsnapper-path.patch b/pkgs/development/python-modules/tarsnapper-path.patch deleted file mode 100644 index 337ad49f9715..000000000000 --- a/pkgs/development/python-modules/tarsnapper-path.patch +++ /dev/null @@ -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() diff --git a/pkgs/tools/backup/tarsnapper/default.nix b/pkgs/tools/backup/tarsnapper/default.nix new file mode 100644 index 000000000000..54d85343e2da --- /dev/null +++ b/pkgs/tools/backup/tarsnapper/default.nix @@ -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"]; +} diff --git a/pkgs/tools/backup/tarsnapper/remove-argparse.patch b/pkgs/tools/backup/tarsnapper/remove-argparse.patch new file mode 100644 index 000000000000..5fd36b14a133 --- /dev/null +++ b/pkgs/tools/backup/tarsnapper/remove-argparse.patch @@ -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 + ) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8118bd9d98b7..95ff1dc58fc1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4b6d1bf82e38..d79ba6af0e18 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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;