From db558b31b9af9db59a8000c85c21057c88efcc25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Sch=C3=BCtz?=
 <robert.schuetz@stud.uni-heidelberg.de>
Date: Tue, 18 Dec 2018 14:44:37 +0100
Subject: [PATCH] python3.pkgs.git-annex-adapter: 0.2.0 -> 0.2.1

---
 .../git-annex-adapter/default.nix             | 38 ++-----------------
 .../not-a-git-repo-testcase.patch             | 13 -------
 2 files changed, 3 insertions(+), 48 deletions(-)
 delete mode 100644 pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch

diff --git a/pkgs/development/python-modules/git-annex-adapter/default.nix b/pkgs/development/python-modules/git-annex-adapter/default.nix
index f4d690eedc30..d8fc12b1c422 100644
--- a/pkgs/development/python-modules/git-annex-adapter/default.nix
+++ b/pkgs/development/python-modules/git-annex-adapter/default.nix
@@ -4,16 +4,16 @@
 
 buildPythonPackage rec {
   pname = "git-annex-adapter";
-  version = "0.2.0";
+  version = "0.2.1";
 
   disabled = !isPy3k;
 
-  # There is only a wheel on PyPI - build from source instead
+  # No tests in PyPI tarball
   src = fetchFromGitHub {
     owner = "alpernebbi";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1sbgp4ivgw4m8nngrlb1f78xdnssh639c1khv4z98753w3sdsxdz";
+    sha256 = "146q1jhcfc7f96ajkhjffskkljk2xzivs5ih5clb8qx0sh7mj097";
   };
 
   prePatch = ''
@@ -22,38 +22,6 @@ buildPythonPackage rec {
       --replace "'git-annex'" "'${git-annex}/bin/git-annex'"
   '';
 
-  patches = [
-    # fixes the "not-a-git-repo" testcase where recent git versions expect a slightly different error.
-    ./not-a-git-repo-testcase.patch
-
-    # fixes the testcase which parses the output of `git-annex info` where several
-    # new lines are displayed that broke the test.
-    (fetchpatch {
-      url = "https://github.com/Ma27/git-annex-adapter/commit/39cb6da69c1aec3d57ea9f68c2dea5113ae1b764.patch";
-      sha256 = "0wyy2icqan3jpiw7dm50arfq3mgq4b5s3g91k82srap763r9hg5m";
-    })
-
-    # fixes the testcase which runs "git status" and complies with the
-    # slightly altered output.
-    (fetchpatch {
-      url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch";
-      sha256 = "0yh66gial6bx7kbl7s7lkzljnkpgvgr8yahqqcq9z76d0w752dir";
-    })
-
-    # fix test broken due to renaming of repository version 6 to 7
-    (fetchpatch {
-      url = https://github.com/alpernebbi/git-annex-adapter/commit/a72efea02ec9b2ed9c7aad0b222056d72eb0c143.patch;
-      sha256 = "0nv9ms01jnwp3qzwsla4w8pcpakq5lh7c77xdbhiidbrx0n1p4q7";
-    })
-  ] ++ stdenv.lib.optionals stdenv.isDarwin [
-    # `rev` is part of utillinux on NixOS which is not available on `nixpks` for darwin:
-    # https://logs.nix.ci/?key=nixos/nixpkgs.45061&attempt_id=271763ba-2ae7-4098-b469-b82b1d8edb9b
-    (fetchpatch {
-      url = "https://github.com/alpernebbi/git-annex-adapter/commit/0b60b4577528b309f6ac9d47b55a00dbda9850ea.patch";
-      sha256 = "0z608hpmyzv1mm01dxr7d6bi1hc77h4yafghkynmv99ijgnm1qk7";
-    })
-  ];
-
   checkInputs = [
     utillinux # `rev` is needed in tests/test_process.py
   ];
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
deleted file mode 100644
index 2a386ee3f2f9..000000000000
--- a/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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,
-         )
-