Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.7 KiB
Nix
66 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
stdenv,
|
|
curl,
|
|
openssl,
|
|
buildPackages,
|
|
installShellFiles,
|
|
}:
|
|
|
|
let
|
|
canRunCmd = stdenv.hostPlatform.emulatorAvailable buildPackages;
|
|
gix = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/gix";
|
|
ein = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/ein";
|
|
in
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "gitoxide";
|
|
version = "0.45.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "GitoxideLabs";
|
|
repo = "gitoxide";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-mMmyFFEVvzI5UmpA10XxnfYZiCg3tizplqFVUND/wQc=";
|
|
};
|
|
|
|
cargoHash = "sha256-JMpNe8jg52wDTJkPy4ZnNcLqjH6K1tXo5SFVPJdITdo=";
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = [ curl ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ openssl ];
|
|
|
|
preFixup = lib.optionalString canRunCmd ''
|
|
installShellCompletion --cmd gix \
|
|
--bash <(${gix} completions --shell bash) \
|
|
--fish <(${gix} completions --shell fish) \
|
|
--zsh <(${gix} completions --shell zsh)
|
|
|
|
installShellCompletion --cmd ein \
|
|
--bash <(${ein} completions --shell bash) \
|
|
--fish <(${ein} completions --shell fish) \
|
|
--zsh <(${ein} completions --shell zsh)
|
|
'';
|
|
|
|
# Needed to get openssl-sys to use pkg-config.
|
|
env.OPENSSL_NO_VENDOR = 1;
|
|
|
|
meta = {
|
|
description = "Command-line application for interacting with git repositories";
|
|
homepage = "https://github.com/GitoxideLabs/gitoxide";
|
|
changelog = "https://github.com/GitoxideLabs/gitoxide/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
|
license = with lib.licenses; [
|
|
mit # or
|
|
asl20
|
|
];
|
|
maintainers = with lib.maintainers; [ syberant ];
|
|
};
|
|
})
|