From 276fe40ff34d0dcb0cf11a6f81c16fdbd6a66cd3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 10 Dec 2024 17:03:55 +0200 Subject: [PATCH] swift: Fix eval failure `error: expected a string but found null: null` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dunno if this is correct, there's other `hostPlatform.isDarwin` conditionals which may be wrong. Leaving the other conditionals to swift maintainers or people who are interested in swift cross-compilation ``` $ nix repl --file . --system aarch64-darwin nix-repl> pkgsCross.aarch64-multiplatform.swift «derivation /nix/store/kqbaqwdfc9g0yvkq4ffrlqspranprlmy-swift-wrapper-aarch64-unknown-linux-gnu-5.8.drv» nix-repl> pkgsCross.aarch64-multiplatform.buildPackages.swift error: error: expected a string but found null: null at /home/artturin/nixgits/my-nixpkgs/.worktree/2/pkgs/development/compilers/swift/compiler/default.nix:586:11: 585| #WATCHOS_SIMULATOR 586| }.${targetPlatform.darwinPlatform}} | ^ 587| ``` --- pkgs/development/compilers/swift/compiler/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/swift/compiler/default.nix b/pkgs/development/compilers/swift/compiler/default.nix index 8e8cf798db4f2..b8a4159003222 100644 --- a/pkgs/development/compilers/swift/compiler/default.nix +++ b/pkgs/development/compilers/swift/compiler/default.nix @@ -541,7 +541,7 @@ in stdenv.mkDerivation { "; buildProject lldb llvm-project/lldb - ${lib.optionalString stdenv.hostPlatform.isDarwin '' + ${lib.optionalString stdenv.targetPlatform.isDarwin '' # Need to do a standalone build of concurrency for Darwin back deployment. # Based on: utils/swift_build_support/swift_build_support/products/backdeployconcurrency.py cmakeFlags="