nixpkgs/pkgs/tools/misc/shadowenv/default.nix

35 lines
1.0 KiB
Nix
Raw Normal View History

2020-04-08 09:20:00 +00:00
{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "shadowenv";
version = "2.0.2";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "Shopify";
repo = pname;
rev = version;
sha256 = "1x5i5km6wblqbc0fibdjdlqkamqswxwhy8p6cbfz2nvcia7fgsf1";
2019-10-04 09:20:00 +00:00
};
cargoSha256 = "1hrsbd6025sfgnwr7smp43yzi7w2lfyfbdxhapgizrpwbq8y7xzd";
2020-04-08 09:20:00 +00:00
nativeBuildInputs = [ installShellFiles ];
2019-10-04 09:20:00 +00:00
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
2020-04-08 09:20:00 +00:00
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
2020-04-08 09:20:00 +00:00
'';
2019-10-04 09:20:00 +00:00
meta = with stdenv.lib; {
homepage = "https://shopify.github.io/shadowenv/";
description = "reversible directory-local environment variable manipulations";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}