Merge pull request #231 from ryantm/revert-163-rtm-2-21-recursive-nix

Revert "contrib: add direct tests for agenix "
This commit is contained in:
Ryan Mulligan 2023-12-22 07:48:36 -08:00 committed by GitHub
commit d0d4ad5be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 49 deletions

View file

@ -9,9 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
system-features = nixos-test recursive-nix benchmark big-parallel kvm
extra-experimental-features = recursive-nix nix-command flakes
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
- run: nix build
- run: nix build .#doc
- run: nix fmt . -- --check
@ -22,9 +20,7 @@ jobs:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
system-features = nixos-test recursive-nix benchmark big-parallel kvm
extra-experimental-features = recursive-nix nix-command flakes
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
- run: nix build
- run: nix build .#doc
- run: nix fmt . -- --check

View file

@ -9,9 +9,7 @@
substituteAll,
ageBin ? "${rage}/bin/rage",
shellcheck,
}: let
bin = "${placeholder "out"}/bin/agenix";
in
}:
stdenv.mkDerivation rec {
pname = "agenix";
version = "0.15.0";
@ -24,33 +22,15 @@ in
src = ./agenix.sh;
};
dontUnpack = true;
doInstallCheck = true;
installCheckInputs = [shellcheck];
postInstallCheck = ''
shellcheck ${bin}
${bin} -h | grep ${version}
mkdir -p /tmp/home/.ssh
cp -r "${../example}" /tmp/home/secrets
chmod -R u+rw /tmp/home/secrets
export HOME=/tmp/home
(
umask u=rw,g=r,o=r
cp ${../example_keys/user1.pub} $HOME/.ssh/id_ed25519.pub
chown $UID $HOME/.ssh/id_ed25519.pub
)
(
umask u=rw,g=,o=
cp ${../example_keys/user1} $HOME/.ssh/id_ed25519
chown $UID $HOME/.ssh/id_ed25519
)
cd /tmp/home/secrets
test $(${bin} -d secret1.age) = "hello"
doCheck = true;
checkInputs = [shellcheck];
postCheck = ''
shellcheck $src
'';
installPhase = ''
install -D $src ${bin}
install -D $src ${placeholder "out"}/bin/agenix
'';
meta.description = "age-encrypted secrets for NixOS";