2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-11-12 09:05:59 +00:00
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
2023-10-09 19:29:22 +00:00
|
|
|
, installShellFiles
|
2020-11-12 09:05:59 +00:00
|
|
|
, pkg-config
|
|
|
|
, libsodium
|
|
|
|
, openssl
|
|
|
|
, xxHash
|
|
|
|
, darwin
|
|
|
|
, gitImportSupport ? true
|
|
|
|
, libgit2 ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pijul";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.0.0-beta.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit version pname;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-jy0mzgLw9iWuoWe2ictMTL3cHnjJ5kzs6TAK+pdm28g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoHash = "sha256-iXGvb4qmZK7Sjbf/Jkyzj+nhpZFV3ngjtJfz6x/8z2s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
2023-03-04 12:14:45 +00:00
|
|
|
buildInputs = [ openssl libsodium xxHash ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ (lib.optionals gitImportSupport [ libgit2 ])
|
|
|
|
++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
2020-11-12 09:05:59 +00:00
|
|
|
CoreServices Security SystemConfiguration
|
|
|
|
]));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildFeatures = lib.optional gitImportSupport "git";
|
|
|
|
|
2023-10-09 19:29:22 +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)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Distributed version control system";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pijul.org";
|
|
|
|
license = with licenses; [ gpl2Plus ];
|
2021-07-14 22:03:04 +00:00
|
|
|
maintainers = with maintainers; [ gal_bolle dywedir fabianhjr ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "pijul";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|