diff options
Diffstat (limited to 'pkgs/applications/science/astronomy/stellarium/default.nix')
-rw-r--r-- | pkgs/applications/science/astronomy/stellarium/default.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 426a7f18dff3f..87118beec99f0 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -20,6 +20,8 @@ , qttools , exiv2 , nlopt +, testers +, xvfb-run }: stdenv.mkDerivation (finalAttrs: { @@ -93,6 +95,18 @@ stdenv.mkDerivation (finalAttrs: { qtWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; + passthru.tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + command = '' + # Create a temporary home directory because stellarium aborts with an + # error if it can't write some configuration files. + tmpdir=$(mktemp -d) + + # stellarium can't be run in headless mode, therefore we need xvfb-run. + HOME="$tmpdir" ${xvfb-run}/bin/xvfb-run stellarium --version + ''; + }; + meta = { description = "Free open-source planetarium"; mainProgram = "stellarium"; |