2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
python3,
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sad";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.4.30";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ms-jpq";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "sad";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-pTCdoKY/+ubUY3adN/Cqop0Gvuqh6Bs55arjT9mjQ18=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
cargoHash = "sha256-ndl0jFQA30h90nnEcIl2CXfF/+cuj/UqUV/7ilsUPb4=";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ python3 ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# fix for compilation on aarch64
|
|
|
|
# see https://github.com/NixOS/nixpkgs/issues/145726
|
|
|
|
prePatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI tool to search and replace";
|
|
|
|
homepage = "https://github.com/ms-jpq/sad";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/ms-jpq/sad/releases/tag/v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sad";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
}
|