nixpkgs/pkgs/tools/misc/shadowenv/default.nix
2021-10-20 16:25:18 -04:00

34 lines
1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
rustPlatform.buildRustPackage rec {
pname = "shadowenv";
version = "2.0.6";
src = fetchFromGitHub {
owner = "Shopify";
repo = pname;
rev = version;
sha256 = "sha256-OfrK5eQ2oJ7ZeUem4PZPE2tsjIObQ+aao6GrtrK8AqA=";
};
cargoSha256 = "sha256-gno44ZdLthcp5/+NP12d0C+x1jrmJHNkHSnyuHWl3Zk=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = 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 lib; {
homepage = "https://shopify.github.io/shadowenv/";
description = "reversible directory-local environment variable manipulations";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}