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