2021-05-04 15:24:31 +02:00
|
|
|
{
|
2021-07-20 17:50:08 +02:00
|
|
|
lib,
|
2023-01-29 20:58:38 +01:00
|
|
|
stdenv,
|
2021-05-04 15:24:31 +02:00
|
|
|
rage,
|
|
|
|
gnused,
|
|
|
|
nix,
|
|
|
|
mktemp,
|
2021-07-22 13:58:29 +02:00
|
|
|
diffutils,
|
2023-01-29 20:58:38 +01:00
|
|
|
substituteAll,
|
|
|
|
ageBin ? "${rage}/bin/rage",
|
|
|
|
shellcheck,
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "agenix";
|
|
|
|
version = "0.13.0";
|
|
|
|
src = substituteAll {
|
|
|
|
inherit ageBin version;
|
|
|
|
sedBin = "${gnused}/bin/sed";
|
|
|
|
nixInstantiate = "${nix}/bin/nix-instantiate";
|
|
|
|
mktempBin = "${mktemp}/bin/mktemp";
|
|
|
|
diffBin = "${diffutils}/bin/diff";
|
|
|
|
src = ./agenix.sh;
|
|
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [shellcheck];
|
|
|
|
postCheck = ''
|
|
|
|
shellcheck $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D $src ${placeholder "out"}/bin/agenix
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta.description = "age-encrypted secrets for NixOS";
|
|
|
|
}
|