summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-08-04 09:55:29 -0700
committerJude Taylor <me@jude.bio>2015-08-12 11:27:54 -0700
commitef95107ddcd3fb587aabcec5936ad83c3a731df2 (patch)
tree3544d6ed4d1fb10f34d3863f2978c00ef0c9a6c1 /pkgs
parentdc74a811291ea5e29e47f7dcc01bdac118f492fb (diff)
downloadnixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.tar
nixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.tar.gz
nixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.tar.bz2
nixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.tar.lz
nixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.tar.xz
nixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.tar.zst
nixpkgs-ef95107ddcd3fb587aabcec5936ad83c3a731df2.zip
make isClang work the way a user might expect
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix2
-rw-r--r--pkgs/development/libraries/ffmpeg-full/default.nix2
-rw-r--r--pkgs/development/libraries/iniparser/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/CF/default.nix3
-rw-r--r--pkgs/stdenv/pure-darwin/default.nix1
5 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 57607ba25b9..8965fc6bef0 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -9,7 +9,7 @@
 , cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell
 , zlib ? null, extraPackages ? [], extraBuildCommands ? ""
 , dyld ? null # TODO: should this be a setup-hook on dyld?
-, isGNU ? false, isClang ? false
+, isGNU ? false, isClang ? cc.isClang or false
 }:
 
 with stdenv.lib;
diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix
index 555576d3a36..263943411e8 100644
--- a/pkgs/development/libraries/ffmpeg-full/default.nix
+++ b/pkgs/development/libraries/ffmpeg-full/default.nix
@@ -253,7 +253,7 @@ stdenv.mkDerivation rec {
     # On some ARM platforms --enable-thumb
     "--enable-shared --disable-static"
     (enableFeature true "pic")
-    (if (stdenv.cc.cc.isClang or false) then "--cc=clang" else null)
+    (if stdenv.cc.isClang then "--cc=clang" else null)
     (enableFeature smallBuild "small")
     (enableFeature runtimeCpuDetectBuild "runtime-cpudetect")
     (enableFeature grayBuild "gray")
diff --git a/pkgs/development/libraries/iniparser/default.nix b/pkgs/development/libraries/iniparser/default.nix
index 8d6e0b91ca0..bd2f328e257 100644
--- a/pkgs/development/libraries/iniparser/default.nix
+++ b/pkgs/development/libraries/iniparser/default.nix
@@ -2,7 +2,6 @@
 
 let
   inherit (stdenv.lib) optional;
-  isClang = (stdenv.cc.cc.isClang or false);
 in
 stdenv.mkDerivation rec{
   name = "iniparser-3.1";
@@ -15,8 +14,7 @@ stdenv.mkDerivation rec{
   patches = ./no-usr.patch;
 
   # TODO: Build dylib on Darwin
-  buildFlags = (if stdenv.isDarwin then [ "libiniparser.a" ] else [ "libiniparser.so" ])
-    ++ optional isClang "CC=clang";
+  buildFlags = (if stdenv.isDarwin then [ "libiniparser.a" ] else [ "libiniparser.so" ]) ++ [ "CC=cc" ];
 
   installPhase = ''
     mkdir -p $out/lib
diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
index f919dde7f69..2aca836ba48 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
@@ -1,5 +1,8 @@
 { stdenv, appleDerivation, icu, dyld, libdispatch, launchd, libclosure }:
 
+# this project uses blocks, a clang-only extension
+assert stdenv.cc.isClang;
+
 appleDerivation {
   buildInputs = [ dyld icu libdispatch launchd libclosure ];
 
diff --git a/pkgs/stdenv/pure-darwin/default.nix b/pkgs/stdenv/pure-darwin/default.nix
index b40fbd8d446..2f31144a11e 100644
--- a/pkgs/stdenv/pure-darwin/default.nix
+++ b/pkgs/stdenv/pure-darwin/default.nix
@@ -81,6 +81,7 @@ in rec {
           nativePrefix = bootstrapTools;
           nativeLibc   = false;
           libc         = last.pkgs.darwin.Libsystem;
+          isClang      = true;
           cc           = { name = "clang-9.9.9"; outPath = bootstrapTools; };
         };