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

35 lines
1 KiB
Nix
Raw Normal View History

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