2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, boost
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libsodium
|
|
|
|
, nix
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, nix-update-script
|
|
|
|
, nixosTests
|
2022-10-21 18:38:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "harmonia";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.6.4";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-03-30 22:05:00 +00:00
|
|
|
owner = "nix-community";
|
2022-10-21 18:38:19 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${pname}-v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-JH0tdUCadvovAJclpx7Fn1oD+POFpBFHdullRTcFaVQ=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoHash = "sha256-Wa+7Vo5VWmx47Uf6YtlzHReoWY44SxdOnscSFu74OSM=";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-04-12 12:48:02 +00:00
|
|
|
pkg-config nix
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
libsodium
|
|
|
|
nix
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "harmonia-v(.*)" ];
|
|
|
|
};
|
|
|
|
tests = { inherit (nixosTests) harmonia; };
|
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Nix binary cache";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/nix-community/harmonia";
|
2022-10-21 18:38:19 +00:00
|
|
|
license = licenses.mit;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
}
|