diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 1283bb8bf3cd..9d2af35327e3 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -491,6 +491,7 @@ in drupal = runTest ./drupal.nix; dublin-traceroute = runTest ./dublin-traceroute.nix; dwl = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./dwl.nix; + e57inspector = runTest ./e57inspector.nix; early-mount-options = runTest ./early-mount-options.nix; earlyoom = runTestOn [ "x86_64-linux" ] ./earlyoom.nix; easytier = runTest ./easytier.nix; diff --git a/nixos/tests/e57inspector.nix b/nixos/tests/e57inspector.nix new file mode 100644 index 000000000000..d421b69f2101 --- /dev/null +++ b/nixos/tests/e57inspector.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: +{ + name = "e57inspector"; + meta.maintainers = with pkgs.lib.maintainers; [ + nh2 + chpatrick + ]; + + nodes.machine = + { ... }: + { + imports = [ + ./common/x11.nix + ]; + + services.xserver.enable = true; + environment.systemPackages = [ + pkgs.e57inspector + pkgs.xdotool + ]; + }; + + testScript = + let + testFile = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/asmaloney/libE57Format-test-data/bbcacec05d60f923869545c5eab33d94c390d50e/self/ColouredCubeFloat.e57"; + hash = "sha256-bb95crNYvX3Qhkx4k6Sqe2GjOf1u4nxxswMfdjyXfTM="; + }; + in + '' + start_all() + machine.wait_for_x() + + machine.execute("e57inspector ${testFile} >&2 &") + machine.wait_until_succeeds("xdotool search --pid $(pidof .e57inspector-wrapped)") + machine.screenshot("screen") + ''; +} diff --git a/pkgs/by-name/e5/e57inspector/package.nix b/pkgs/by-name/e5/e57inspector/package.nix index f8cdcf60ae0b..895ced7a183c 100644 --- a/pkgs/by-name/e5/e57inspector/package.nix +++ b/pkgs/by-name/e5/e57inspector/package.nix @@ -2,9 +2,11 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, qt6, xercesc, + nixosTests, }: stdenv.mkDerivation (finalAttrs: { @@ -60,6 +62,10 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; + passthru.tests = { + e57inspector = nixosTests.e57inspector; + }; + meta = { description = "Cross-platform E57 file viewer to list and view stored point clouds, images and metadata"; homepage = "https://github.com/sisakat/e57inspector";