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

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

41 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
2019-10-04 11:20:00 +02:00
rustPlatform.buildRustPackage rec {
pname = "shadowenv";
version = "2.1.1";
2019-10-04 11:20:00 +02:00
src = fetchFromGitHub {
owner = "Shopify";
repo = pname;
rev = version;
hash = "sha256-NKqoeJ2sejbe7Gghk3H7oJtP16SX1PcIIjsh/bZdTfQ=";
2019-10-04 11:20:00 +02:00
};
cargoPatches = [ ./Cargo.lock.patch ];
cargoHash = "sha256-CGAwb+UduM2QKne2bPntOcFnaUQN/3uUANc6z7f/Oig=";
2020-04-08 11:20:00 +02:00
nativeBuildInputs = [ installShellFiles ];
2019-10-04 11:20:00 +02:00
2021-01-15 10:19:50 +01:00
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
2019-10-04 11:20:00 +02:00
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
'';
2022-11-21 05:20:00 +01:00
preCheck = ''
HOME=$TMPDIR
'';
meta = with lib; {
2019-10-04 11:20:00 +02:00
homepage = "https://shopify.github.io/shadowenv/";
description = "reversible directory-local environment variable manipulations";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}