nixpkgs/pkgs/applications/version-management/pijul/default.nix
2023-05-24 14:11:44 +03:00

41 lines
993 B
Nix

{ lib, stdenv
, fetchCrate
, rustPlatform
, pkg-config
, libsodium
, openssl
, xxHash
, darwin
, gitImportSupport ? true
, libgit2 ? null
}:
rustPlatform.buildRustPackage rec {
pname = "pijul";
version = "1.0.0-beta.5";
src = fetchCrate {
inherit version pname;
hash = "sha256-hFNNi5xzH1wQnmy4XkXg07ZbZMlyWR4/GLe/PyJpb20=";
};
cargoHash = "sha256-gOREd5Z1j+UUJ2NNryoDDsFtP6XYlWQlR/llgqKgy+g=";
doCheck = false;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl libsodium xxHash ]
++ (lib.optionals gitImportSupport [ libgit2 ])
++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreServices Security SystemConfiguration
]));
buildFeatures = lib.optional gitImportSupport "git";
meta = with lib; {
description = "A distributed version control system";
homepage = "https://pijul.org";
license = with licenses; [ gpl2Plus ];
maintainers = with maintainers; [ gal_bolle dywedir fabianhjr ];
};
}