Skip to content

Commit 9fb99de

Browse files
authored
ydiff: fix build (#384041)
2 parents e7e1c30 + ef65197 commit 9fb99de

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

pkgs/development/python-modules/ydiff/default.nix

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
lib,
33
buildPythonPackage,
4-
fetchPypi,
4+
fetchFromGitHub,
55
pygments,
66
gitMinimal,
77
mercurial,
88
subversion,
9-
patchutils,
9+
p4,
1010
less,
1111
}:
1212

@@ -15,21 +15,23 @@ buildPythonPackage rec {
1515
version = "1.4.2";
1616
format = "setuptools";
1717

18-
src = fetchPypi {
19-
inherit pname version;
20-
hash = "sha256-NpvmI9zeeVTZiXP7nbF4DWTwNTmCvzrIWBjz1i/0UrA=";
18+
src = fetchFromGitHub {
19+
owner = "ymattw";
20+
repo = "ydiff";
21+
tag = version;
22+
hash = "sha256-JaGkABroj+/7MrgpFYI2vE1bndsilIodopMUnfmNhwA=";
2123
};
2224

2325
patchPhase = ''
2426
substituteInPlace ydiff.py \
25-
--replace "['git'" "['${gitMinimal}/bin/git'" \
26-
--replace "['hg'" "['${mercurial}/bin/hg'" \
27-
--replace "['svn'" "['${subversion}/bin/svn'" \
28-
--replace "['filterdiff'" "['${patchutils}/bin/filterdiff'" \
29-
--replace "['less'" "['${less}/bin/less'" # doesn't support PAGER from env
27+
--replace-fail "['git'" "['${lib.getExe gitMinimal}'" \
28+
--replace-fail "['hg'" "['${lib.getExe mercurial}'" \
29+
--replace-fail "['svn'" "['${lib.getExe subversion}'" \
30+
--replace-fail "['p4'" "['${lib.getExe p4}'" \
31+
--replace-fail "['less'" "['${lib.getExe less}'" # doesn't support PAGER from env
3032
substituteInPlace tests/test_ydiff.py \
31-
--replace /bin/rm rm \
32-
--replace /bin/sh sh
33+
--replace-fail /bin/rm rm \
34+
--replace-fail /bin/sh sh
3335
patchShebangs setup.py
3436
patchShebangs tests/*.sh
3537
'';

0 commit comments

Comments
 (0)