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

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

35 lines
935 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security
2019-04-26 06:37:21 +02:00
}:
rustPlatform.buildRustPackage rec {
pname = "sd";
2020-08-02 15:17:57 +02:00
version = "0.7.6";
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}";
2020-08-02 15:17:57 +02:00
sha256 = "0c5bsqs6c55x4j640vhzlmbiylhp5agr7lx0jrwcjazfyvxihc01";
2019-04-26 06:37:21 +02:00
};
cargoSha256 = "1iwgy9zzdxay6hb9pz47jchy03jrsy5csxijlq4i228qhqnvq1lr";
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
preFixup = ''
installManPage $releaseDir/build/sd-*/out/sd.1
installShellCompletion $releaseDir/build/sd-*/out/sd.{bash,fish}
installShellCompletion --zsh $releaseDir/build/sd-*/out/_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
};
}