Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, installShellFiles
5, pkg-config
6, oniguruma
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "namaka";
11 version = "0.2.0";
12
13 src = fetchFromGitHub {
14 owner = "nix-community";
15 repo = "namaka";
16 rev = "v${version}";
17 hash = "sha256-CLGEW11Fo1v4vj0XSqiyW1EbhRZFO7dkgM43eKwItrk=";
18 };
19
20 cargoHash = "sha256-exftXTO/NbTfd7gNPpZ886jXH1XveqX+Cl/gXpZlS4c=";
21
22 nativeBuildInputs = [
23 installShellFiles
24 pkg-config
25 ];
26
27 buildInputs = [
28 oniguruma
29 ];
30
31 env = {
32 GEN_ARTIFACTS = "artifacts";
33 RUSTONIG_SYSTEM_LIBONIG = true;
34 };
35
36 postInstall = ''
37 installManPage artifacts/*.1
38 installShellCompletion artifacts/namaka.{bash,fish} --zsh artifacts/_namaka
39 '';
40
41 meta = with lib; {
42 description = "Snapshot testing tool for Nix based on haumea";
43 homepage = "https://github.com/nix-community/namaka";
44 changelog = "https://github.com/nix-community/namaka/blob/${src.rev}/CHANGELOG.md";
45 license = licenses.mpl20;
46 maintainers = with maintainers; [ figsoda ];
47 };
48}