about summary refs log tree commit diff
path: root/pkgs/by-name/ha/harmonia/package.nix
blob: a8f4c4b09d6bb3ad05443f94c204cc5172c32f74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, boost
, fetchFromGitHub
, libsodium
, nixVersions
, pkg-config
, rustPlatform
, stdenv
, nix-update-script
, nixosTests
}:

rustPlatform.buildRustPackage rec {
  pname = "harmonia";
  version = "0.8.0";

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = pname;
    rev = "refs/tags/${pname}-v${version}";
    hash = "sha256-+V0V/l9Q7HR3J0aH1UWc1qHrpGiRWd6B4R+3MECFORg=";
  };

  cargoHash = "sha256-3Nx1YXjbYVOD7pYgI9Cp5Vsxv1j1XeX6pCl4+Q1OtVs=";

  doCheck = false;

  nativeBuildInputs = [
    pkg-config nixVersions.nix_2_21
  ];

  buildInputs = [
    boost
    libsodium
    nixVersions.nix_2_21
  ];

  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 ];
    mainProgram = "harmonia";
  };
}