blob: a48fd5f20c3727792eea6b719698d4bb291a0e4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{ stdenv, lib, fetchFromGitHub, autoconf, makeWrapper
, curl, libiconv, mercurial, zlib
, CoreServices
}:
let
python3 = mercurial.python;
in
stdenv.mkDerivation rec {
pname = "git-cinnabar";
version = "0.5.11";
src = fetchFromGitHub {
owner = "glandium";
repo = "git-cinnabar";
rev = version;
sha256 = "sha256-64ofKGeHwCqiZHOA6MrYrN2eV/qqClcjerDuSqsjKDg=";
fetchSubmodules = true;
};
nativeBuildInputs = [ autoconf makeWrapper ];
buildInputs = [ curl zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ];
# Ignore submodule status failing due to no git in environment.
makeFlags = [ "SUBMODULE_STATUS=yes" ];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/libexec
install git-cinnabar-helper $out/bin
install git-cinnabar git-remote-hg $out/libexec
cp -r cinnabar mercurial $out/libexec
for pythonBin in git-cinnabar git-remote-hg; do
makeWrapper $out/libexec/$pythonBin $out/bin/$pythonBin \
--prefix PATH : ${lib.getBin python3}/bin \
--prefix GIT_CINNABAR_EXPERIMENTS , python3 \
--set PYTHONPATH ${mercurial}/${python3.sitePackages}
done
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/glandium/git-cinnabar";
description = "git remote helper to interact with mercurial repositories";
license = licenses.gpl2Only;
maintainers = with maintainers; [ qyliss ];
platforms = platforms.all;
};
}
|