From 7c77a0fa4f3c8576a6a396339a724586a45f55c5 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 21 Jul 2025 22:48:23 +0200 Subject: [PATCH] opensmalltalk-vm: don't throw without aliases CI needs ugly workarounds to catch a `throw` on unsupported platforms. If aliases are disabled, as is the case in CI, we simply return `null` for this leaf package. This will ignore it for CI purposes, while still giving a proper error message for end users. --- .../compilers/opensmalltalk-vm/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/opensmalltalk-vm/default.nix b/pkgs/development/compilers/opensmalltalk-vm/default.nix index e84ec1175514..7617b7ce877b 100644 --- a/pkgs/development/compilers/opensmalltalk-vm/default.nix +++ b/pkgs/development/compilers/opensmalltalk-vm/default.nix @@ -1,4 +1,5 @@ { + config, stdenv, lib, fetchFromGitHub, @@ -190,7 +191,11 @@ let platform = stdenv.targetPlatform.system; in -vmsByPlatform.${platform} or (throw ( - "Unsupported platform ${platform}: only the following platforms are supported: " - + builtins.toString (builtins.attrNames vmsByPlatform) -)) +if (!config.allowAliases && !(vmsByPlatform ? platform)) then + # Don't throw without aliases to not break CI. + null +else + vmsByPlatform.${platform} or (throw ( + "Unsupported platform ${platform}: only the following platforms are supported: " + + builtins.toString (builtins.attrNames vmsByPlatform) + ))