nixpkgs/pkgs/applications/version-management/pijul/default.nix
2021-10-21 11:02:31 +09:00

42 lines
1.0 KiB
Nix

{ lib, stdenv
, fetchCrate
, rustPlatform
, pkg-config
, libsodium
, openssl
, xxHash
, zstd
, darwin
, gitImportSupport ? true
, libgit2 ? null
}:
rustPlatform.buildRustPackage rec {
pname = "pijul";
version = "1.0.0-alpha.55";
src = fetchCrate {
inherit version pname;
sha256 = "sha256-1nnn0cdDe+WOetGtRe7dMEyuCcbfRHdJWFxQ4bTXebQ=";
};
cargoSha256 = "sha256-j9xf97qPdhtakIwhAql0/Go5fPxlyWKAVLk5CMBfAbs=";
cargoBuildFlags = lib.optional gitImportSupport "--features=git";
doCheck = false;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl libsodium xxHash zstd ]
++ (lib.optionals gitImportSupport [ libgit2 ])
++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreServices Security SystemConfiguration
]));
meta = with lib; {
description = "A distributed version control system";
homepage = "https://pijul.org";
license = with licenses; [ gpl2Plus ];
maintainers = with maintainers; [ gal_bolle dywedir fabianhjr ];
};
}