nixpkgs/pkgs/by-name/sa/sad/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
853 B
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
python3,
}:
rustPlatform.buildRustPackage rec {
pname = "sad";
version = "0.4.31";
src = fetchFromGitHub {
owner = "ms-jpq";
repo = "sad";
rev = "refs/tags/v${version}";
hash = "sha256-frsOfv98VdetlwgNA6O0KEhcCSY9tQeEwkl2am226ko=";
};
cargoHash = "sha256-2oZf2wim2h/krGZMg7Psxx0VLFE/Xf1d1vWqkVtjSmo=";
nativeBuildInputs = [ python3 ];
# fix for compilation on aarch64
# see https://github.com/NixOS/nixpkgs/issues/145726
prePatch = ''
rm .cargo/config.toml
'';
meta = with lib; {
description = "CLI tool to search and replace";
homepage = "https://github.com/ms-jpq/sad";
changelog = "https://github.com/ms-jpq/sad/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "sad";
};
}