From d886cdaf10a9b5eb67ec7c1097ff4a805b5a0c87 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 10 Apr 2023 14:20:19 -0400 Subject: [PATCH] namaka: init at 0.1.0 --- .../development/tools/misc/namaka/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/tools/misc/namaka/default.nix diff --git a/pkgs/development/tools/misc/namaka/default.nix b/pkgs/development/tools/misc/namaka/default.nix new file mode 100644 index 000000000000..d89fc94db025 --- /dev/null +++ b/pkgs/development/tools/misc/namaka/default.nix @@ -0,0 +1,48 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, pkg-config +, oniguruma +}: + +rustPlatform.buildRustPackage rec { + pname = "namaka"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "namaka"; + rev = "v${version}"; + hash = "sha256-1B9FWdRxDM9PykfK9LKGZcwIc+sJNAZlvBh6G9dCHW4="; + }; + + cargoHash = "sha256-k9FDpugRCdvJ3E+gI1tO73RXRef8lg/txOAPDrE0+XM="; + + nativeBuildInputs = [ + installShellFiles + pkg-config + ]; + + buildInputs = [ + oniguruma + ]; + + env = { + GEN_ARTIFACTS = "artifacts"; + RUSTONIG_SYSTEM_LIBONIG = true; + }; + + postInstall = '' + installManPage artifacts/*.1 + installShellCompletion artifacts/namaka.{bash,fish} --zsh artifacts/_namaka + ''; + + meta = with lib; { + description = "Snapshot testing tool for Nix based on haumea"; + homepage = "https://github.com/nix-community/namaka"; + changelog = "https://github.com/nix-community/namaka/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mpl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a0e20576e73..0a173c85f0b1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32565,6 +32565,8 @@ with pkgs; mle = callPackage ../applications/editors/mle { }; + namaka = callPackage ../development/tools/misc/namaka { }; + nano = callPackage ../applications/editors/nano { }; nanoblogger = callPackage ../applications/misc/nanoblogger { };