3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix
Alyssa Ross 6c4d3aa6f7
git-cinnabar: 0.5.4 -> 0.5.6
Also add missing installPhase hooks, and clarify license.
I'm assuming GPL-2.0-only, because it doesn't seem to be specified, and
the helper links with git, which is -only.
2021-02-07 21:35:46 +00:00

55 lines
1.5 KiB
Nix

{ stdenv, lib, fetchFromGitHub, autoconf, makeWrapper
, curl, libiconv, mercurial, zlib
}:
let
python3 = mercurial.python;
in
stdenv.mkDerivation rec {
pname = "git-cinnabar";
version = "0.5.6";
src = fetchFromGitHub {
owner = "glandium";
repo = "git-cinnabar";
rev = version;
sha256 = "1wbp4xqpkaqhhkjw8rbbsagwiciqffacqqbm4j49q41mlk371ai3";
fetchSubmodules = true;
};
nativeBuildInputs = [ autoconf makeWrapper ];
buildInputs = [ curl zlib ] ++ lib.optional stdenv.isDarwin libiconv;
# 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;
};
}