|
1 | | -{lib, stdenv, fetchFromGitHub, git, mercurial, makeWrapper}: |
| 1 | +{ |
| 2 | + lib, |
| 3 | + stdenv, |
| 4 | + fetchFromGitHub, |
| 5 | + git, |
| 6 | + mercurial, |
| 7 | + makeWrapper, |
| 8 | + nix-update-script, |
| 9 | + fetchpatch, |
| 10 | +}: |
2 | 11 |
|
3 | | -stdenv.mkDerivation rec { |
| 12 | +stdenv.mkDerivation (finalAttrs: { |
4 | 13 | pname = "fast-export"; |
5 | | - version = "221024"; |
| 14 | + version = "231118"; |
6 | 15 |
|
7 | 16 | src = fetchFromGitHub { |
8 | 17 | owner = "frej"; |
9 | | - repo = pname; |
10 | | - rev = "v${version}"; |
11 | | - sha256 = "sha256-re8iXM8s+TD35UGKalq2kVn8fx68fsnUC7Yo+/DQ9SM="; |
| 18 | + repo = "fast-export"; |
| 19 | + rev = "v${finalAttrs.version}"; |
| 20 | + hash = "sha256-JUy0t2yzd4bI7WPGG1E8L1topLfR5leV/WTU+u0bCyM="; |
12 | 21 | }; |
13 | 22 |
|
| 23 | + patches = [ |
| 24 | + (fetchpatch { |
| 25 | + url = "https://github.com/frej/fast-export/commit/a3d0562737e1e711659e03264e45cb47a5a2f46d.patch?full_index=1"; |
| 26 | + hash = "sha256-vZOHnb5lXO22ElCK4oWQKCcPIqRyZV5axWfZqa84V1Y="; |
| 27 | + }) |
| 28 | + ]; |
| 29 | + |
14 | 30 | nativeBuildInputs = [ makeWrapper ]; |
15 | | - buildInputs = [mercurial.python mercurial]; |
| 31 | + buildInputs = [ |
| 32 | + mercurial.python |
| 33 | + mercurial |
| 34 | + ]; |
16 | 35 |
|
17 | 36 | installPhase = '' |
18 | 37 | binPath=$out/bin |
19 | | - libexecPath=$out/libexec/${pname} |
| 38 | + libexecPath=$out/libexec/fast-export |
20 | 39 | sitepackagesPath=$out/${mercurial.python.sitePackages} |
21 | 40 | mkdir -p $binPath $libexecPath $sitepackagesPath |
22 | 41 |
|
@@ -57,11 +76,13 @@ stdenv.mkDerivation rec { |
57 | 76 | popd |
58 | 77 | ''; |
59 | 78 |
|
60 | | - meta = with lib; { |
| 79 | + passthru.updateScript = nix-update-script { }; |
| 80 | + |
| 81 | + meta = { |
61 | 82 | description = "Import mercurial into git"; |
62 | 83 | homepage = "https://repo.or.cz/w/fast-export.git"; |
63 | | - license = licenses.gpl2; |
64 | | - maintainers = [ maintainers.koral ]; |
65 | | - platforms = platforms.unix; |
| 84 | + license = lib.licenses.gpl2; |
| 85 | + maintainers = [ lib.maintainers.koral ]; |
| 86 | + platforms = lib.platforms.unix; |
66 | 87 | }; |
67 | | -} |
| 88 | +}) |
0 commit comments