diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-15 10:30:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-15 10:30:44 +0000 |
commit | e0794be8a0d11e90461e5a9c85012a36b93ec976 (patch) | |
tree | efd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/libraries/libfaketime | |
parent | 3538874082ded7647b1ccec0343c7c1e882cfef3 (diff) | |
parent | 1a57d96edd156958b12782e8c8b6a374142a7248 (diff) | |
download | nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2 nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip |
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfaketime')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch | 25 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libfaketime/default.nix | 7 |
2 files changed, 30 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch b/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch new file mode 100644 index 000000000000..84ee18084c29 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch @@ -0,0 +1,25 @@ +From f974fe07de9e6820bb1de50b31e480296d1d97b7 Mon Sep 17 00:00:00 2001 +From: Christian Kampka <christian@kampka.net> +Date: Wed, 25 Nov 2020 20:09:50 +0100 +Subject: [PATCH] Remove unsupported clang flags + +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index f13a6bb..b305150 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -69,7 +69,7 @@ PREFIX ?= /usr/local + LIBDIRNAME ?= /lib/faketime + PLATFORM ?=$(shell uname) + +-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS) ++CFLAGS += -std=gnu99 -Wall -Wextra -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS) + ifeq ($(PLATFORM),SunOS) + CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 + endif +-- +2.28.0 + 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 ]; |