1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-14 20:57:36 +00:00
sops-nix/pkgs/sops-init-gpg-key/default.nix

37 lines
662 B
Nix
Raw Normal View History

2024-11-17 12:17:45 +01:00
{
stdenv,
lib,
makeWrapper,
gnupg,
coreutils,
util-linux,
unixtools,
}:
2020-07-06 07:30:09 +01:00
stdenv.mkDerivation {
name = "sops-init-gpg-key";
version = "0.1.0";
src = ./sops-init-gpg-key;
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -m755 -D $src $out/bin/sops-init-gpg-key
wrapProgram $out/bin/sops-init-gpg-key \
2024-11-17 12:17:45 +01:00
--prefix PATH : ${
lib.makeBinPath [
coreutils
util-linux
gnupg
unixtools.hostname
]
}
2020-07-06 07:30:09 +01:00
'';
2020-07-23 08:20:08 +01:00
doInstallCheck = true;
installCheckPhase = ''
$out/bin/sops-init-gpg-key --hostname server01 --gpghome $TMPDIR/key
'';
2020-07-06 07:30:09 +01:00
}