git.iko.soy/typeable/nixpkgs
on master help sign in
python.pkgs.GitPython: use patch to specify path to git
commite138c1e4e88ffe1058268d5891802447e0b525e0 authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de> dateThu 24 Jan 2019, 10:09 (8 years ago) parentb769611
2 files changed+21−5
pkgs/development/python-modules/GitPython/default.nix+8−5 pkgs/development/python-modules/GitPython/hardcode-git-path.patch+13
pkgs/development/python-modules/GitPython/default.nix+8−5
@@ -1,4 +1,4 @@
1−{ lib, buildPythonPackage, fetchPypi, git, gitdb2, mock, nose, ddt }:
1+{ lib, buildPythonPackage, fetchPypi, substituteAll, git, gitdb2, mock, nose, ddt }:
22
33buildPythonPackage rec {
44 version = "2.1.11";
@@ -9,13 +9,16 @@ buildPythonPackage rec {
99 sha256 = "8237dc5bfd6f1366abeee5624111b9d6879393d84745a507de0fda86043b65a8";
1010 };
1111
12+ patches = [
13+ (substituteAll {
14+ src = ./hardcode-git-path.patch;
15+ inherit git;
16+ })
17+ ];
18+
1219 checkInputs = [ mock nose ddt ];
1320 propagatedBuildInputs = [ gitdb2 ];
1421
15− postPatch = ''
16− sed -i "s|^refresh()$|refresh(path='${git}/bin/git')|" git/__init__.py
17− '';
18−
1922 # Tests require a git repo
2023 doCheck = false;
2124
pkgs/development/python-modules/GitPython/hardcode-git-path.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/git/cmd.py b/git/cmd.py
2+index a4faefe..51ad442 100644
3+--- a/git/cmd.py
4++++ b/git/cmd.py
5+@@ -175,7 +175,7 @@ class Git(LazyMixin):
6+
7+ # CONFIGURATION
8+
9+- git_exec_name = "git" # default that should work on linux and windows
10++ git_exec_name = "@git@/bin/git"
11+
12+ # Enables debugging of GitPython's git commands
13+ GIT_PYTHON_TRACE = os.environ.get("GIT_PYTHON_TRACE", False)