2024-04-02 08:14:30 +03:00
|
|
|
{
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
|
|
|
lib,
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "srgn";
|
2025-06-24 02:06:33 +00:00
|
|
|
version = "0.14.0";
|
2024-04-02 08:14:30 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexpovel";
|
|
|
|
repo = "srgn";
|
2024-08-21 00:56:55 +02:00
|
|
|
rev = "srgn-v${version}";
|
2025-06-24 02:06:33 +00:00
|
|
|
hash = "sha256-ZWjpkClhac4VD4b/Veffb5FHGvh+oeTu3ukaOux6MG0=";
|
2024-04-02 08:14:30 +03:00
|
|
|
};
|
|
|
|
|
2025-06-24 02:06:33 +00:00
|
|
|
cargoHash = "sha256-d/wFD0kxWNOsYaY4G5P9iM85dSo0UZGSte5AqOosM2g=";
|
2024-04-02 08:14:30 +03:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash zsh fish; do
|
|
|
|
installShellCompletion --cmd srgn "--$shell" <("$out/bin/srgn" --completions "$shell")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2025-06-05 09:11:29 -07:00
|
|
|
description = "Code surgeon for precise text and code transplantation";
|
2024-04-02 08:14:30 +03:00
|
|
|
license = licenses.mit;
|
2025-04-09 01:36:26 +03:00
|
|
|
maintainers = with maintainers; [ magistau ];
|
2024-04-02 08:14:30 +03:00
|
|
|
mainProgram = "srgn";
|
|
|
|
homepage = "https://github.com/${src.owner}/${src.repo}/";
|
|
|
|
downloadPage = "https://github.com/${src.owner}/${src.repo}/releases/tag/${src.rev}";
|
|
|
|
changelog = "https://github.com/${src.owner}/${src.repo}/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
};
|
|
|
|
}
|