diff options
author | Kid <44045911+kidonng@users.noreply.github.com> | 2021-07-04 14:24:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 07:24:55 +0000 |
commit | 055dc300ff0de7f901b972cef9483a36c0cbf83e (patch) | |
tree | 81e6c3f8625e54e7e2bb24e60f86de41f28e132e | |
parent | af7a317f79d07270a5ac036e3d22083f7ff6b2be (diff) | |
download | nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.tar nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.tar.gz nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.tar.bz2 nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.tar.lz nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.tar.xz nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.tar.zst nixpkgs-055dc300ff0de7f901b972cef9483a36c0cbf83e.zip |
sd: install man page and shell completions
-rw-r--r-- | pkgs/tools/text/sd/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/tools/text/sd/default.nix b/pkgs/tools/text/sd/default.nix index 1536e72ad29..009150062db 100644 --- a/pkgs/tools/text/sd/default.nix +++ b/pkgs/tools/text/sd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, Security +{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }: rustPlatform.buildRustPackage rec { @@ -14,8 +14,17 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1iwgy9zzdxay6hb9pz47jchy03jrsy5csxijlq4i228qhqnvq1lr"; + nativeBuildInputs = [ installShellFiles ]; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + 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; { description = "Intuitive find & replace CLI (sed alternative)"; homepage = "https://github.com/chmln/sd"; |