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 , nlopt
, testers , testers
, xvfb-run , xvfb-run
, gitUpdater
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -95,16 +96,19 @@ stdenv.mkDerivation (finalAttrs: {
qtWrapperArgs+=("''${gappsWrapperArgs[@]}") qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
''; '';
passthru.tests.version = testers.testVersion { passthru = {
package = finalAttrs.finalPackage; tests.version = testers.testVersion {
command = '' package = finalAttrs.finalPackage;
# Create a temporary home directory because stellarium aborts with an command = ''
# error if it can't write some configuration files. # Create a temporary home directory because stellarium aborts with an
tmpdir=$(mktemp -d) # 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. # stellarium can't be run in headless mode, therefore we need xvfb-run.
HOME="$tmpdir" ${xvfb-run}/bin/xvfb-run stellarium --version HOME="$tmpdir" ${lib.getExe xvfb-run} stellarium --version
''; '';
};
updateScript = gitUpdater { rev-prefix = "v"; };
}; };
meta = { meta = {