about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libfaketime/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfaketime/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libfaketime/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/default.nix b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix
index 10cc5cace7b5..6c751e07b831 100644
--- a/nixpkgs/pkgs/development/libraries/libfaketime/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix
@@ -11,7 +11,10 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./no-date-in-gzip-man-page.patch
-  ];
+  ] ++ (stdenv.lib.optionals stdenv.cc.isClang [
+    # https://github.com/wolfcw/libfaketime/issues/277
+    ./0001-Remove-unsupported-clang-flags.patch
+  ]);
 
   postPatch = ''
     patchShebangs test src
@@ -24,7 +27,7 @@ stdenv.mkDerivation rec {
   PREFIX = placeholder "out";
   LIBDIRNAME = "/lib";
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type -Wno-error=format-truncation";
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation";
 
   checkInputs = [ perl ];