Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 python3,
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "sad";
10 version = "0.4.32";
11
12 src = fetchFromGitHub {
13 owner = "ms-jpq";
14 repo = "sad";
15 tag = "v${version}";
16 hash = "sha256-c5TYIVUrfKrVuyolVe7+EhiM/SOFNahz8X6F8WrKEa0=";
17 };
18
19 cargoHash = "sha256-hS66/bPRUpwmW/wSpZCq4kVKFkIhttsozIr3SCyZqQI=";
20
21 nativeBuildInputs = [ python3 ];
22
23 # fix for compilation on aarch64
24 # see https://github.com/NixOS/nixpkgs/issues/145726
25 prePatch = ''
26 rm .cargo/config.toml
27 '';
28
29 meta = {
30 description = "CLI tool to search and replace";
31 homepage = "https://github.com/ms-jpq/sad";
32 changelog = "https://github.com/ms-jpq/sad/releases/tag/v${version}";
33 license = lib.licenses.mit;
34 maintainers = with lib.maintainers; [
35 fab
36 ryan4yin
37 ];
38 mainProgram = "sad";
39 };
40}