depot/third_party/nixpkgs/pkgs/by-name/ha/handlr-regex/package.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

39 lines
1 KiB
Nix

{ lib, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "handlr-regex";
version = "0.9.0";
src = fetchFromGitHub {
owner = "Anomalocaridid";
repo = pname;
rev = "v${version}";
hash = "sha256-ndFe5GlSWVUPdGRRWuImcLtcuOMoMXMyGGIa+CXfCug=";
};
cargoHash = "sha256-lCClE8U4188q5rWEEkUt0peLEmYvLoE7vJ6Q9uB5HWg=";
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";
};
}