stellarium: add passthru.updateScript (#346147)

This commit is contained in:
Colin 2024-11-18 22:31:32 +00:00 committed by GitHub
commit d63375c74f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,7 @@
, nlopt
, testers
, xvfb-run
, gitUpdater
}:
stdenv.mkDerivation (finalAttrs: {
@ -95,16 +96,19 @@ 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)
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
'';
# stellarium can't be run in headless mode, therefore we need xvfb-run.
HOME="$tmpdir" ${lib.getExe xvfb-run} stellarium --version
'';
};
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {