nixpkgs/pkgs/tools/text/sd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
892 B
Nix
Raw Normal View History

2023-11-08 06:00:37 +01:00
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, installShellFiles
, Security
2019-04-26 06:37:21 +02:00
}:
rustPlatform.buildRustPackage rec {
pname = "sd";
2023-11-08 06:00:37 +01:00
version = "1.0.0";
2019-04-26 06:37:21 +02:00
src = fetchFromGitHub {
owner = "chmln";
repo = pname;
2020-03-31 23:30:56 +02:00
rev = "v${version}";
2023-11-08 06:00:37 +01:00
hash = "sha256-hC4VKEgrAVuqOX7b24XhtrxrnJW5kmlX4E6QbY9H8OA=";
2019-04-26 06:37:21 +02:00
};
2023-11-08 06:00:37 +01:00
cargoHash = "sha256-IhCuWCaSU7c7Tot4uvxE7oabY69wDLstuBN35OzkQcU=";
2019-06-16 22:00:00 +02:00
nativeBuildInputs = [ installShellFiles ];
2021-01-15 10:19:50 +01:00
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
2019-04-26 06:37:21 +02:00
2023-11-08 06:00:37 +01:00
postInstall = ''
installManPage gen/sd.1
2023-11-08 06:00:37 +01:00
installShellCompletion gen/completions/sd.{bash,fish}
installShellCompletion --zsh gen/completions/_sd
'';
meta = with lib; {
2019-04-26 06:37:21 +02:00
description = "Intuitive find & replace CLI (sed alternative)";
2019-06-16 22:00:00 +02:00
homepage = "https://github.com/chmln/sd";
2019-04-26 06:37:21 +02:00
license = licenses.mit;
maintainers = with maintainers; [ amar1729 Br1ght0ne ];
2019-04-26 06:37:21 +02:00
};
}