2023-04-12 12:48:02 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkg-config, rustPlatform
|
|
|
|
, bzip2, curl, zlib, zstd, libiconv, CoreServices
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-cinnabar";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "glandium";
|
|
|
|
repo = "git-cinnabar";
|
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "VvfoMypiFT68YJuGpEyPCxGOjdbDoF6FXtzLWlw0uxY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config rustPlatform.cargoSetupHook rustPlatform.rust.cargo
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ bzip2 curl zlib zstd ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ];
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "GApYgE7AezKmcGWNY+dF1Yp1TZmEeUdq3CsjvMvo/Rw=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-13 14:23:35 +00:00
|
|
|
runHook preInstall
|
2023-04-12 12:48:02 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
install -v target/release/git-cinnabar $out/bin
|
|
|
|
ln -sv git-cinnabar $out/bin/git-remote-hg
|
2021-02-13 14:23:35 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/glandium/git-cinnabar";
|
|
|
|
description = "git remote helper to interact with mercurial repositories";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ qyliss ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|