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-07-15 17:15:38 +00:00
|
|
|
version = "0.6.7";
|
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-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-3tf2lFMrZowRL3v4bkkhyPdULKUZ5w7zJLXlWyMJg3k=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoHash = "sha256-g/f0+sj3XBjDFfSCLNlyqFehODsmf87hwbmobo6Tehg=";
|
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
|
|
|
};
|
|
|
|
}
|