nixpkgs/pkgs/by-name/ha/handlr-regex/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
2023-05-10 22:19:52 +01:00
rustPlatform.buildRustPackage rec {
pname = "handlr-regex";
2024-03-17 20:54:08 +00:00
version = "0.10.0";
2023-05-10 22:19:52 +01:00
src = fetchFromGitHub {
owner = "Anomalocaridid";
repo = pname;
rev = "v${version}";
2024-03-17 20:54:08 +00:00
hash = "sha256-RCMTRf/mrLCDrmJSAofTgCHKK4GogkdGXnN4lFFQMA8=";
2023-05-10 22:19:52 +01:00
};
2024-03-17 20:54:08 +00:00
cargoHash = "sha256-GHRryBeofZQbVTyOwMwYKVAymui8VvsUQhiwGu0+HEE=";
2023-05-10 22:19:52 +01:00
nativeBuildInputs = [ installShellFiles shared-mime-info ];
buildInputs = [ libiconv ];
preCheck = ''
export HOME=$TEMPDIR
'';
postInstall = ''
installShellCompletion \
--zsh assets/completions/_handlr \
--bash assets/completions/handlr \
--fish assets/completions/handlr.fish
installManPage assets/manual/man1/*
'';
meta = with lib; {
description = "Fork of handlr with support for regex";
homepage = "https://github.com/Anomalocaridid/handlr-regex";
license = licenses.mit;
maintainers = with maintainers; [ anomalocaris ];
2023-11-27 01:17:53 +00:00
mainProgram = "handlr";
2023-05-10 22:19:52 +01:00
};
}