summary refs log tree commit diff
path: root/pkgs/development/python-modules/git-annex-adapter
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-06-21 23:14:02 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2018-06-22 10:18:46 +0200
commit47558d9e04b84784ed6d6651b496f83f88687d0c (patch)
tree4ad9ebc7387438e77ad8fa7396a58fde52ccc387 /pkgs/development/python-modules/git-annex-adapter
parent3813d5dcec27eeb85fd300a18e5342a7e4bf7af3 (diff)
downloadnixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.tar
nixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.tar.gz
nixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.tar.bz2
nixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.tar.lz
nixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.tar.xz
nixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.tar.zst
nixlib-47558d9e04b84784ed6d6651b496f83f88687d0c.zip
python3Packages.git-annex-adapter: fix build
The exception message is broken becuase of some uppercase vs. lowercase
issues that have been patched accordingly.

Additionally use `fetchpatch` rather than `fetchurl` to apply patches
into the build.
Diffstat (limited to 'pkgs/development/python-modules/git-annex-adapter')
-rw-r--r--pkgs/development/python-modules/git-annex-adapter/default.nix18
-rw-r--r--pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch13
2 files changed, 24 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/git-annex-adapter/default.nix b/pkgs/development/python-modules/git-annex-adapter/default.nix
index 04fae0db1b7a..6cb6e626f279 100644
--- a/pkgs/development/python-modules/git-annex-adapter/default.nix
+++ b/pkgs/development/python-modules/git-annex-adapter/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchurl
-, utillinux, pygit2, gitMinimal, git-annex }:
+{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchpatch
+, utillinux, pygit2, gitMinimal, git-annex
+}:
 
 buildPythonPackage rec {
   pname = "git-annex-adapter";
@@ -22,10 +23,13 @@ buildPythonPackage rec {
   '';
 
   # TODO: Remove for next version
-  patches = fetchurl {
-    url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch";
-    sha256 = "1hbw8651amjskakvs1wv2msd1wryrq0vpryvbispg5267rs8q7hp";
-  };
+  patches = [
+    ./not-a-git-repo-testcase.patch
+    (fetchpatch {
+      url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch";
+      sha256 = "0yh66gial6bx7kbl7s7lkzljnkpgvgr8yahqqcq9z76d0w752dir";
+    })
+  ];
 
   checkInputs = [
     utillinux # `rev` is needed in tests/test_process.py
@@ -43,6 +47,6 @@ buildPythonPackage rec {
     homepage = https://github.com/alpernebbi/git-annex-adapter;
     description = "Call git-annex commands from Python";
     license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ dotlambda ];
+    maintainers = with maintainers; [ dotlambda ma27 ];
   };
 }
diff --git a/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch b/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch
new file mode 100644
index 000000000000..2a386ee3f2f9
--- /dev/null
+++ b/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/test_process.py b/tests/test_process.py
+index 493fc8f..feb1833 100644
+--- a/tests/test_process.py
++++ b/tests/test_process.py
+@@ -126,7 +126,7 @@ class TestProcessOnEmptyDir(TempDirTestCase):
+         with self.assertRaises(subprocess.CalledProcessError) as cm:
+             runner('status', '-sb')
+         self.assertIn(
+-            "fatal: Not a git repository",
++            "fatal: not a git repository",
+             cm.exception.stderr,
+         )
+