2020-11-12 09:05:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, clang
|
|
|
|
, libclang
|
|
|
|
, libsodium
|
|
|
|
, openssl
|
|
|
|
, xxHash
|
|
|
|
, zstd
|
|
|
|
, darwin
|
|
|
|
, gitImportSupport ? true
|
|
|
|
, libgit2 ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pijul";
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "1.0.0-alpha.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit version pname;
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "0bz38vvzjrplb2mgcypg2p4kq33v6m58yivg15s2ghr7ly9k5ybx";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
cargoSha256 = "0p9djvdjzyjzsn3fyw6f74fix39s3y92246cgzcqhc1qlwwz67rl";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
cargoBuildFlags = stdenv.lib.optional gitImportSupport "--features=git";
|
|
|
|
LIBCLANG_PATH = "${libclang}/lib";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-11-12 09:05:59 +00:00
|
|
|
nativeBuildInputs = [ pkg-config clang ];
|
|
|
|
buildInputs = [ openssl libclang libsodium xxHash zstd ]
|
|
|
|
++ (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
|
|
|
};
|
|
|
|
}
|