2021-05-04 16:24:31 +03:00
|
|
|
{
|
2021-07-20 18:50:08 +03:00
|
|
|
lib,
|
2023-01-29 22:58:38 +03:00
|
|
|
stdenv,
|
2021-05-04 16:24:31 +03:00
|
|
|
rage,
|
2023-02-13 19:06:58 +03:00
|
|
|
jq,
|
2021-05-04 16:24:31 +03:00
|
|
|
nix,
|
|
|
|
mktemp,
|
2021-07-22 14:58:29 +03:00
|
|
|
diffutils,
|
2023-01-29 22:58:38 +03:00
|
|
|
substituteAll,
|
|
|
|
ageBin ? "${rage}/bin/rage",
|
|
|
|
shellcheck,
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "agenix";
|
2023-12-20 19:33:16 +03:00
|
|
|
version = "0.15.0";
|
2023-01-29 22:58:38 +03:00
|
|
|
src = substituteAll {
|
|
|
|
inherit ageBin version;
|
2023-02-13 19:06:58 +03:00
|
|
|
jqBin = "${jq}/bin/jq";
|
2023-01-29 22:58:38 +03:00
|
|
|
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";
|
|
|
|
}
|