2020-11-12 09:05:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, libsodium
|
|
|
|
, openssl
|
|
|
|
, xxHash
|
|
|
|
, zstd
|
|
|
|
, darwin
|
|
|
|
, gitImportSupport ? true
|
|
|
|
, libgit2 ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pijul";
|
2021-01-09 10:05:03 +00:00
|
|
|
version = "1.0.0-alpha.31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit version pname;
|
2021-01-09 10:05:03 +00:00
|
|
|
sha256 = "sha256-dSwQlALN0E87o86sasuNFPTZN6SRCuxP6pI7wi4uRf4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
cargoSha256 = "sha256-Xwk5bX9o41M/1BmkOpAscGQHikhzV+9qAwVz0qI7FRA";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
cargoBuildFlags = stdenv.lib.optional gitImportSupport "--features=git";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-12-07 07:45:13 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl libsodium xxHash zstd ]
|
2020-11-12 09:05:59 +00:00
|
|
|
++ (stdenv.lib.optionals gitImportSupport [ libgit2 ])
|
|
|
|
++ (stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
|
|
CoreServices Security SystemConfiguration
|
|
|
|
]));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A distributed version control system";
|
|
|
|
homepage = "https://pijul.org";
|
|
|
|
license = with licenses; [ gpl2Plus ];
|
2020-11-12 09:05:59 +00:00
|
|
|
maintainers = with maintainers; [ gal_bolle dywedir ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|