mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ lib, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "handlr-regex";
|
|
version = "0.10.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Anomalocaridid";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-RCMTRf/mrLCDrmJSAofTgCHKK4GogkdGXnN4lFFQMA8=";
|
|
};
|
|
|
|
cargoHash = "sha256-GHRryBeofZQbVTyOwMwYKVAymui8VvsUQhiwGu0+HEE=";
|
|
|
|
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 ];
|
|
mainProgram = "handlr";
|
|
};
|
|
}
|