nixpkgs/pkgs/applications/version-management/git-cinnabar/default.nix
AndersonTorres d994dabace treewide: remove git-and-tools directory
We do not use a "plugin system" for Git addons anymore, and therefore this
directory is no longer useful. Indeed that directory is way more confusing,
given that it includes more than mere Git addons, going from Bitbucket server
command-line tools to complete rewrites of Git in exotic programming languages.

Also, without this directory, the mental load of decision-making reduces a lot.
When anyone is interested in including a new git-related tool, just put it into
pkgs/applications/version-management, without apologies.
2022-12-19 15:05:22 -03:00

55 lines
1.4 KiB
Nix

{ 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 \
--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;
};
}