Files
nixpkgs/pkgs/by-name/hg/hgrep/package.nix
Jonathan Davies 116036d574 treewide: Remove redundant versionCheckProgramArg = "--version"; with:
```shell
git grep -l -e 'versionCheckProgramArg = "--version";' -e 'versionCheckProgramArg = \[ "--version" \];' | while read f; do
  sed -i '/versionCheckProgramArg/d' "$f"
  sed -i '/^$/N;/\n$/D' "$f"
done
```
2025-11-20 10:39:02 +00:00

40 lines
792 B
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
let
version = "0.3.9";
in
rustPlatform.buildRustPackage {
pname = "hgrep";
inherit version;
src = fetchFromGitHub {
owner = "rhysd";
repo = "hgrep";
tag = "v${version}";
hash = "sha256-xBLpEs0PvYb7sIca9yb3vhi2Bsr1BFqB0jlD+bZT2EI=";
};
cargoHash = "sha256-TP+PClv7FX3kRBwJ0RAKbKoTKpi7hTZgw/Z/ktFKbwQ=";
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Grep with human-friendly search results";
homepage = "https://github.com/rhysd/hgrep";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ axka ];
mainProgram = "hgrep";
};
}