mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
I grepped for `fetchCargoVendor` and `inherit (finalAttrs) src;`, and wrote this patch by hand. I tested this with `nix-build --check` on the following attributes, derived from `.meta.position`s that match any of the touched files: * `amberol.cargoDeps.vendorStaging` * `atuin-desktop.cargoDeps.vendorStaging` * `chance.cargoDeps.vendorStaging` * `clapgrep.cargoDeps.vendorStaging` * `cutecosmic.cargoDeps.vendorStaging` * `delineate.cargoDeps.vendorStaging` * `drawpile.cargoDeps.vendorStaging` * `drawpile-server-headless.cargoDeps.vendorStaging` * `field-monitor.cargoDeps.vendorStaging` * `fractal.cargoDeps.vendorStaging` * `geopard.cargoDeps.vendorStaging` * `git-cinnabar.cargoDeps.vendorStaging` * `gnome-robots.cargoDeps.vendorStaging` * `insulator2.cargoDeps.vendorStaging` * `kana.cargoDeps.vendorStaging` * `key-rack.cargoDeps.vendorStaging` * `kime.cargoDeps.vendorStaging` * `krunkit.cargoDeps.vendorStaging` * `krunvm.cargoDeps.vendorStaging` * `ladybird.cargoDeps.vendorStaging` * `libchewing.cargoDeps.vendorStaging` * `loupe.cargoDeps.vendorStaging` * `metronome.cargoDeps.vendorStaging` * `pdns-recursor.cargoDeps.vendorStaging` * `python314Packages.copykitten.cargoDeps.vendorStaging` * `python314Packages.django-vcache.cargoDeps.vendorStaging` * `python314Packages.pdoc-pyo3-sample-library.cargoDeps.vendorStaging` * `python314Packages.pycambia.cargoDeps.vendorStaging` * `python314Packages.python-kadmin-rs.cargoDeps.vendorStaging` * `python314Packages.tlparse.cargoDeps.vendorStaging` * `python313Packages.copykitten.cargoDeps.vendorStaging` * `python313Packages.django-vcache.cargoDeps.vendorStaging` * `python313Packages.pdoc-pyo3-sample-library.cargoDeps.vendorStaging` * `python313Packages.pycambia.cargoDeps.vendorStaging` * `python313Packages.python-kadmin-rs.cargoDeps.vendorStaging` * `python313Packages.tlparse.cargoDeps.vendorStaging` * `share-preview.cargoDeps.vendorStaging` * `stratisd.cargoDeps.vendorStaging` * `taskwarrior3.cargoDeps.vendorStaging` * `tsukimi.cargoDeps.vendorStaging` * `wildcard.cargoDeps.vendorStaging`
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
cargo,
|
|
pkg-config,
|
|
rustPlatform,
|
|
bzip2,
|
|
curl,
|
|
zlib,
|
|
zstd,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "git-cinnabar";
|
|
version = "0.7.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "glandium";
|
|
repo = "git-cinnabar";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-qE9LvOX2n+ylQry79CsmRCUzUEgwYZne3tbNDCoynzk=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cargo
|
|
pkg-config
|
|
rustPlatform.cargoSetupHook
|
|
];
|
|
|
|
buildInputs = [
|
|
bzip2
|
|
curl
|
|
zlib
|
|
zstd
|
|
];
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (finalAttrs) pname version src;
|
|
hash = "sha256-IVizzc2dKZ83dz3KBMDDiaFNdnS40cS++k8AywyvakQ=";
|
|
};
|
|
|
|
env.ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Disable automated version-check
|
|
buildNoDefaultFeatures = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
install -v target/release/git-cinnabar $out/bin
|
|
ln -sv git-cinnabar $out/bin/git-remote-hg
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Git remote helper to interact with mercurial repositories";
|
|
homepage = "https://github.com/glandium/git-cinnabar";
|
|
license = lib.licenses.gpl2Only;
|
|
maintainers = with lib.maintainers; [ qyliss ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|