2024-07-01 15:47:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitUpdater,
|
|
|
|
makeWrapper,
|
|
|
|
ripgrep,
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "serpl";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.3.3";
|
2024-07-01 15:47:52 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yassinebridi";
|
|
|
|
repo = "serpl";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-koD5aFqL+XVxc5Iq3reTYIHiPm0z7hAQ4K59IfbY4Hg=";
|
2024-07-01 15:47:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-8XYEZQfoizVmOuh0hymzMj2UDiXNkSeHqBAWOqaMY84=";
|
2024-07-01 15:47:52 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Serpl needs ripgrep to function properly.
|
|
|
|
wrapProgram $out/bin/serpl \
|
|
|
|
--prefix PATH : "${lib.strings.makeBinPath [ ripgrep ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|