diff --git a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix index 4ae59a4317705..0d5772467be0a 100644 --- a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" - ] ++ lib.optionals (haveLibc && !isMusl) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix index 6790910ee8304..54b84fe02b153 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" - ] ++ lib.optionals (haveLibc && !isMusl) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index ed34d06ed9861..a372030b3f87f 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" - ] ++ lib.optionals (haveLibc && !isMusl) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 9124686705ae7..798280f0c1c49 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" - ] ++ lib.optionals (haveLibc && !isMusl) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [ "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix index ef2495714e451..669c6bbb9588d 100644 --- a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" - ] ++ lib.optionals (haveLibc && !isMusl) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index cefda47cb5be2..2dbea4e3833ae 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -1,6 +1,5 @@ -{ lib, stdenv, makeWrapper, writeText, writeShellScriptBin, runCommand +{ lib, stdenv, makeWrapper, writeText, writeTextFile, runCommand, callPackage , CoreServices, ImageIO, CoreGraphics -, runtimeShell, callPackage , xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX" , xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1" , sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" }: @@ -37,7 +36,7 @@ let ''; xcode-select = writeText "xcode-select" '' -#!${runtimeShell} +#!${stdenv.shell} while [ $# -gt 0 ]; do case "$1" in -h | --help) ;; # noop @@ -51,7 +50,12 @@ while [ $# -gt 0 ]; do done ''; - xcrun = writeShellScriptBin "xcrun" '' + xcrun = writeTextFile { + name = "xcrun"; + executable = true; + destination = "/bin/xcrun"; + text = '' +#!${stdenv.shell} args=( "$@" ) # If an SDK was requested, check that it matches. @@ -94,7 +98,11 @@ done if ! [[ -z "$@" ]]; then exec "$@" fi - ''; + ''; + checkPhase = '' + ${stdenv.shellDryRun} "$target" + ''; + }; in