agenix/pkgs/agenix.nix

38 lines
685 B
Nix
Raw Normal View History

{
lib,
stdenv,
rage,
2023-02-13 17:06:58 +01:00
jq,
nix,
mktemp,
2021-07-22 13:58:29 +02:00
diffutils,
substituteAll,
ageBin ? "${rage}/bin/rage",
shellcheck,
}:
stdenv.mkDerivation rec {
pname = "agenix";
2023-09-15 01:20:33 +02:00
version = "0.14.0";
src = substituteAll {
inherit ageBin version;
2023-02-13 17:06:58 +01:00
jqBin = "${jq}/bin/jq";
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";
}