Files
nixpkgs/pkgs/by-name/ju/jujutsu/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

98 lines
2.0 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
gitMinimal,
gnupg,
openssh,
buildPackages,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "jujutsu";
version = "0.34.0";
src = fetchFromGitHub {
owner = "jj-vcs";
repo = "jj";
tag = "v${finalAttrs.version}";
hash = "sha256-OW8kSDBBSZr0G3U27AAkZ3cH3TJmSARbg9Pc4qZ6tA0=";
};
cargoHash = "sha256-/zC2z0evYs8VKta0uClTtl4l3tbDRcsVedGF2jtfQGA=";
nativeBuildInputs = [
installShellFiles
];
nativeCheckInputs = [
gitMinimal
gnupg
openssh
];
cargoBuildFlags = [
# Dont install the `gen-protos` build tool.
"--bin"
"jj"
];
useNextest = true;
cargoTestFlags = [
# Dont build the `gen-protos` build tool when running tests.
"-p"
"jj-lib"
"-p"
"jj-cli"
];
env = {
# Disable vendored libraries.
ZSTD_SYS_USE_PKG_CONFIG = "1";
LIBGIT2_NO_VENDOR = "1";
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
};
postInstall =
let
jj = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/jj";
in
lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ''
mkdir -p $out/share/man
${jj} util install-man-pages $out/share/man/
installShellCompletion --cmd jj \
--bash <(COMPLETE=bash ${jj}) \
--fish <(COMPLETE=fish ${jj}) \
--zsh <(COMPLETE=zsh ${jj})
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/jj";
versionCheckProgramArg = "--version";
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Git-compatible DVCS that is both simple and powerful";
homepage = "https://github.com/jj-vcs/jj";
changelog = "https://github.com/jj-vcs/jj/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
_0x4A6F
thoughtpolice
emily
bbigras
];
mainProgram = "jj";
};
})