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-04-21 15:54:59 +00:00
|
|
|
version = "0.4.28";
|
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}";
|
|
|
|
hash = "sha256-9zsNYUYUQ3RmJQN7uf+YQjywr7rRAIx5zz6EYkbN8/o=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoHash = "sha256-OSVG1sFSLKkVsgI0I2mYTszcPGlfOL1Md/aCpMf6Eow=";
|
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
|
|
|
};
|
|
|
|
}
|