diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9a059c30563c..b6512c99ca01 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1303,6 +1303,7 @@ in polaris = runTest ./polaris.nix; pomerium = handleTestOn [ "x86_64-linux" ] ./pomerium.nix { }; portunus = runTest ./portunus.nix; + porxie = runTest ./porxie.nix; postfix = handleTest ./postfix.nix { }; postfix-raise-smtpd-tls-security-level = handleTest ./postfix-raise-smtpd-tls-security-level.nix diff --git a/nixos/tests/porxie.nix b/nixos/tests/porxie.nix new file mode 100644 index 000000000000..7f14509a6ba6 --- /dev/null +++ b/nixos/tests/porxie.nix @@ -0,0 +1,23 @@ +{ lib, ... }: +{ + name = "porxie"; + + nodes.machine = + { pkgs, ... }: + { + services.porxie = { + enable = true; + settings = { + PORXIE_SERVER_ADDRESS = "ip:127.0.0.1:6453"; + }; + }; + }; + + testScript = '' + machine.wait_for_unit("porxie.service") + machine.wait_for_open_port(6453) + machine.succeed("curl --fail http://localhost:6453") + ''; + + meta.maintainers = [ lib.maintainers.blooym ]; +} diff --git a/pkgs/by-name/po/porxie/package.nix b/pkgs/by-name/po/porxie/package.nix index 33c6265bf340..9920eaf7e84b 100644 --- a/pkgs/by-name/po/porxie/package.nix +++ b/pkgs/by-name/po/porxie/package.nix @@ -2,6 +2,8 @@ lib, fetchFromCodeberg, rustPlatform, + nixosTests, + stdenvNoCC, nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -18,7 +20,12 @@ rustPlatform.buildRustPackage (finalAttrs: { }; cargoHash = "sha256-a0Ps8SvheQoX+Ai8EYgEpyTFwNvB7E3J6MfGiyEvMzM="; - passthru.updateScript = nix-update-script { }; + passthru = { + updateScript = nix-update-script { }; + tests = lib.optionalAttrs stdenvNoCC.hostPlatform.isLinux { + porxie = nixosTests.porxie; + }; + }; meta = { description = "Porxie, an ATProto blob proxy for secure content delivery";