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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "shadowenv";
2022-11-21 04:20:00 +00:00
version = "2.1.0";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "Shopify";
repo = pname;
rev = version;
2022-11-21 04:20:00 +00:00
hash = "sha256-11Zce3eehyuDOl2zYl0sf/yh8SOOnu8W/CrL18e3zzw=";
2019-10-04 09:20:00 +00:00
};
2022-11-21 04:20:00 +00:00
cargoHash = "sha256-eo+/mZ6QFoXgIT1uT65TVR65xWBm/Cw5yBzvRUVgQUY=";
2020-04-08 09:20:00 +00:00
nativeBuildInputs = [ installShellFiles ];
2019-10-04 09:20:00 +00:00
2021-01-15 09:19:50 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
2019-10-04 09:20:00 +00:00
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
'';
2022-11-21 04:20:00 +00:00
preCheck = ''
HOME=$TMPDIR
'';
meta = with lib; {
2019-10-04 09:20:00 +00:00
homepage = "https://shopify.github.io/shadowenv/";
description = "reversible directory-local environment variable manipulations";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}