Skip to content

Commit

Permalink
DONTDROP swift: Fix error: expected a string but found null: null
Browse files Browse the repository at this point in the history
```
$ 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:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:9:12:
            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'swift-wrapper-5.8'
         whose name attribute is located at /home/artturin/nixgits/my-nixpkgs/.worktree/2/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'buildCommand' of derivation 'swift-wrapper-5.8'
         at /home/artturin/nixgits/my-nixpkgs/.worktree/2/pkgs/development/compilers/swift/wrapper/default.nix:26:3:
           25|   passAsFile = [ "buildCommand" ];
           26|   buildCommand = ''
             |   ^
           27|     mkdir -p $out/bin $out/nix-support

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       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|
```
  • Loading branch information
Artturin committed Dec 4, 2024
1 parent fa55c94 commit 4b22806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/compilers/swift/compiler/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let
#appletvsimulator
#watchos
#watchsimulator
}.${targetPlatform.darwinPlatform}
}."${targetPlatform.darwinPlatform}"
or (throw "Cannot build Swift for target Darwin platform '${targetPlatform.darwinPlatform}'")
else targetPlatform.parsed.kernel.name;

Expand Down Expand Up @@ -583,7 +583,7 @@ in stdenv.mkDerivation {
#TVOS_SIMULATOR
#WATCHOS
#WATCHOS_SIMULATOR
}.${targetPlatform.darwinPlatform}}
}."${targetPlatform.darwinPlatform}"}
-DLLVM_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/llvm
Expand Down

0 comments on commit 4b22806

Please sign in to comment.