# HG changeset patch # User Marcin Kuzminski # Date 2018-10-09 07:48:33 # Node ID 5e3115e0e613a776066dda1d943d6ecbb6cfd4fd # Parent 73fe9e1236e12e2c7b2f0dfef3ba1a8ddb24ed49 dependencies: dulwich, backported a patch to handle GIT references that are directories. - present in dulwich 0.19.X diff --git a/pkgs/patches/dulwich/handle-dir-refs.patch b/pkgs/patches/dulwich/handle-dir-refs.patch new file mode 100644 --- /dev/null +++ b/pkgs/patches/dulwich/handle-dir-refs.patch @@ -0,0 +1,15 @@ +This patch allows handling directories inside the refs/heads. This was added in dulwich +0.19.X series + +diff -rup dulwich-0.13.0-orig/dulwich/refs.py dulwich-0.13.0/dulwich/refs.py +--- dulwich-0.13.0-orig/dulwich/refs.py 2018-10-09 09:42:38.182597268 +0200 ++++ dulwich-0.13.0/dulwich/refs.py 2018-10-09 09:43:39.057145566 +0200 +@@ -509,7 +509,7 @@ class DiskRefsContainer(RefsContainer): + # Read only the first 40 bytes + return header + f.read(40 - len(SYMREF)) + except IOError as e: +- if e.errno == errno.ENOENT: ++ if e.errno in (errno.ENOENT, errno.EISDIR): + return None + raise + diff --git a/pkgs/python-packages-overrides.nix b/pkgs/python-packages-overrides.nix --- a/pkgs/python-packages-overrides.nix +++ b/pkgs/python-packages-overrides.nix @@ -46,6 +46,13 @@ self: super: { ]; }); + "dulwich" = super."dulwich".override (attrs: { + patches = [ + ./patches/dulwich/handle-dir-refs.patch + ]; + }); + + # Avoid that base packages screw up the build process inherit (basePythonPackages) setuptools;