nixpkgs/pkgs/applications/version-management/pijul/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Permalink Normal View History

{ lib, stdenv
2020-11-09 12:03:31 +00:00
, fetchCrate
, rustPlatform
2023-09-22 14:44:00 +00:00
, installShellFiles
2020-11-09 12:03:31 +00:00
, pkg-config
, libsodium
, openssl
, xxHash
, darwin
, gitImportSupport ? true
, libgit2 ? null
}:
rustPlatform.buildRustPackage rec {
2019-08-31 11:41:23 +00:00
pname = "pijul";
2024-04-08 18:37:21 +00:00
version = "1.0.0-beta.9";
2017-03-20 07:19:05 +00:00
2020-11-09 12:03:31 +00:00
src = fetchCrate {
inherit version pname;
2024-04-08 18:37:21 +00:00
hash = "sha256-jy0mzgLw9iWuoWe2ictMTL3cHnjJ5kzs6TAK+pdm28g=";
2017-03-20 07:19:05 +00:00
};
2024-04-08 18:37:21 +00:00
cargoHash = "sha256-iXGvb4qmZK7Sjbf/Jkyzj+nhpZFV3ngjtJfz6x/8z2s=";
2017-03-20 07:19:05 +00:00
doCheck = false;
2023-09-22 14:44:00 +00:00
nativeBuildInputs = [ installShellFiles pkg-config ];
2023-03-01 11:11:13 +00:00
buildInputs = [ openssl libsodium xxHash ]
2021-01-15 13:21:58 +00:00
++ (lib.optionals gitImportSupport [ libgit2 ])
++ (lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
2020-11-09 12:03:31 +00:00
CoreServices Security SystemConfiguration
]));
2017-06-07 08:24:44 +00:00
2021-11-15 23:47:13 +00:00
buildFeatures = lib.optional gitImportSupport "git";
2023-09-22 14:44:00 +00:00
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pijul \
--bash <($out/bin/pijul completion bash) \
--fish <($out/bin/pijul completion fish) \
--zsh <($out/bin/pijul completion zsh)
'';
meta = with lib; {
2017-03-20 07:19:05 +00:00
description = "Distributed version control system";
homepage = "https://pijul.org";
2017-03-20 07:19:05 +00:00
license = with licenses; [ gpl2Plus ];
maintainers = with maintainers; [ gal_bolle dywedir fabianhjr ];
2023-11-27 01:17:53 +00:00
mainProgram = "pijul";
2017-03-20 07:19:05 +00:00
};
}