about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/package-management/harmonia/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/package-management/harmonia/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/package-management/harmonia/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/package-management/harmonia/default.nix b/nixpkgs/pkgs/tools/package-management/harmonia/default.nix
new file mode 100644
index 000000000000..f3c121c7c734
--- /dev/null
+++ b/nixpkgs/pkgs/tools/package-management/harmonia/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, boost
+, fetchFromGitHub
+, libsodium
+, nix
+, pkg-config
+, rustPlatform
+, nix-update-script
+, nixosTests
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "harmonia";
+  version = "0.6.4";
+
+  src = fetchFromGitHub {
+    owner = "nix-community";
+    repo = pname;
+    rev = "refs/tags/${pname}-v${version}";
+    hash = "sha256-JH0tdUCadvovAJclpx7Fn1oD+POFpBFHdullRTcFaVQ=";
+  };
+
+  cargoHash = "sha256-Wa+7Vo5VWmx47Uf6YtlzHReoWY44SxdOnscSFu74OSM=";
+
+  nativeBuildInputs = [
+    pkg-config nix
+  ];
+
+  buildInputs = [
+    boost
+    libsodium
+    nix
+  ];
+
+  passthru = {
+    updateScript = nix-update-script {
+      extraArgs = [ "--version-regex" "harmonia-v(.*)" ];
+    };
+    tests = { inherit (nixosTests) harmonia; };
+  };
+
+  meta = with lib; {
+    description = "Nix binary cache";
+    homepage = "https://github.com/nix-community/harmonia";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mic92 ];
+  };
+}