From 63ba95cb91d09a5ede7a57a2d9be6d06226d712c Mon Sep 17 00:00:00 2001 From: kilianar Date: Wed, 2 Oct 2024 19:47:53 +0200 Subject: [PATCH 1/2] stellarium: add passthru.updateScript --- .../science/astronomy/stellarium/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 7ddaf5357e7c..0089152c9d22 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -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" ${xvfb-run}/bin/xvfb-run stellarium --version + ''; + }; + updateScript = gitUpdater { rev-prefix = "v"; }; }; meta = { From e7be25251399c8998665bf177459284bc7343279 Mon Sep 17 00:00:00 2001 From: kilianar Date: Sun, 27 Oct 2024 21:23:15 +0100 Subject: [PATCH 2/2] stellarium: use lib.getExe in tests.version for xvfb-run --- pkgs/applications/science/astronomy/stellarium/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 0089152c9d22..43a96a47a744 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { 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 + HOME="$tmpdir" ${lib.getExe xvfb-run} stellarium --version ''; }; updateScript = gitUpdater { rev-prefix = "v"; };