1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-05 16:17:47 +00:00
sops-nix/pkgs/sops-init-gpg-key/default.nix

24 lines
597 B
Nix
Raw Normal View History

2022-09-26 16:28:23 +02: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 \
--prefix PATH : ${lib.makeBinPath [
2022-09-26 16:28:23 +02:00
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
}