From dad41ac31edf388a484c27ada76355bf152f61ad Mon Sep 17 00:00:00 2001 From: Adam Thompson-Sharpe Date: Sat, 4 Jul 2026 20:23:37 -0400 Subject: [PATCH] opentxl: allow disabling compiler in wrapper --- pkgs/by-name/op/opentxl/package.nix | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/op/opentxl/package.nix b/pkgs/by-name/op/opentxl/package.nix index ab1b5896ba1c..78ade6cb6f3f 100644 --- a/pkgs/by-name/op/opentxl/package.nix +++ b/pkgs/by-name/op/opentxl/package.nix @@ -4,6 +4,7 @@ makeWrapper, opentxl-unwrapped, targetPackages, + withCompiler ? true, }: let inherit (targetPackages.stdenv.cc) targetPrefix; @@ -29,19 +30,21 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p $out/bin # Wrap compiler - makeWrapper ${opentxl-unwrapped}/bin/txlc \ - $out/bin/${targetPrefix}txlc \ - --set TXLLIB ${opentxl-unwrapped}/lib \ - --set BUILD_TXLLIB ${opentxl-unwrapped}/lib \ - --set TARGET_TXLLIB ${targetOpentxl}/lib \ - --set CC ${targetPackages.stdenv.cc}/bin/${targetPrefix}cc \ - --set OS ${opentxl-unwrapped.osOption stdenv.targetPlatform} - ${ - # For convenience, if there is a target prefix, create a symlink named txlc - lib.optionalString (targetPrefix != "") '' - ln -s $out/bin/${targetPrefix}txlc $out/bin/txlc - '' - } + ${lib.optionalString withCompiler '' + makeWrapper ${opentxl-unwrapped}/bin/txlc \ + $out/bin/${targetPrefix}txlc \ + --set TXLLIB ${opentxl-unwrapped}/lib \ + --set BUILD_TXLLIB ${opentxl-unwrapped}/lib \ + --set TARGET_TXLLIB ${targetOpentxl}/lib \ + --set CC ${targetPackages.stdenv.cc}/bin/${targetPrefix}cc \ + --set OS ${opentxl-unwrapped.osOption stdenv.targetPlatform} + ${ + # For convenience, if there is a target prefix, create a symlink named txlc + lib.optionalString (targetPrefix != "") '' + ln -s $out/bin/${targetPrefix}txlc $out/bin/txlc + '' + } + ''} # Wrap other scripts for name in txl2c txlp; do