forked from mirrors/nixpkgs
329cc874e4
Pick up shell completions
35 lines
1 KiB
Nix
35 lines
1 KiB
Nix
{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "shadowenv";
|
|
version = "2.0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Shopify";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1x5i5km6wblqbc0fibdjdlqkamqswxwhy8p6cbfz2nvcia7fgsf1";
|
|
};
|
|
|
|
cargoSha256 = "1hrsbd6025sfgnwr7smp43yzi7w2lfyfbdxhapgizrpwbq8y7xzd";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
postInstall = ''
|
|
installManPage man/man1/shadowenv.1
|
|
installManPage man/man5/shadowlisp.5
|
|
installShellCompletion --bash sh/completions/shadowenv.bash
|
|
installShellCompletion --fish sh/completions/shadowenv.fish
|
|
installShellCompletion --zsh sh/completions/_shadowenv
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = "https://shopify.github.io/shadowenv/";
|
|
description = "reversible directory-local environment variable manipulations";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|