Files
nixpkgs/pkgs/by-name/se/serpl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
makeWrapper,
ast-grep,
ripgrep,
versionCheckHook,
}:
let
pname = "serpl";
version = "0.3.4";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "yassinebridi";
repo = "serpl";
rev = version;
hash = "sha256-lEvUS1RlZ4CvervzyfODsFqRJAiA6PyLNUVWhSoPMDY=";
};
buildFeatures = [ "ast_grep" ];
nativeBuildInputs = [ makeWrapper ];
cargoHash = "sha256-reeJsSNifPeDzqMKVpS1Pmyn9x1F+Vin/xy81d5rKVs=";
postFixup = ''
# Serpl needs ripgrep to function properly.
wrapProgram $out/bin/serpl \
--prefix PATH : "${
lib.strings.makeBinPath [
ripgrep
ast-grep
]
}"
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/serpl";
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple terminal UI for search and replace, ala VS Code";
homepage = "https://github.com/yassinebridi/serpl.git";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ NotAShelf ];
mainProgram = "serpl";
};
}