diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/development/libraries/libfaketime | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfaketime')
3 files changed, 38 insertions, 19 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 index 84ee18084c29..7dfad4978005 100644 --- a/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch +++ b/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch @@ -1,25 +1,13 @@ -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 +index 2af4804..bcff809 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -69,7 +69,7 @@ PREFIX ?= /usr/local +@@ -80,7 +80,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) +-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -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_UTIME -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 170bb116a8a8..ced1c3e7bb9f 100644 --- a/nixpkgs/pkgs/development/libraries/libfaketime/default.nix +++ b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix @@ -1,16 +1,17 @@ -{ lib, stdenv, fetchurl, perl }: +{ lib, stdenv, fetchurl, perl, coreutils }: stdenv.mkDerivation rec { pname = "libfaketime"; - version = "0.9.8"; + version = "0.9.9"; src = fetchurl { url = "https://github.com/wolfcw/libfaketime/archive/v${version}.tar.gz"; - sha256 = "18s2hjm4sbrlg6sby944z87yslnq9s85p7j892hyr42qrlvq4a06"; + sha256 = "sha256-V9AYEVA2HAqbXI7vBbETkvYTStosLZmOkuY9rtY5ZHw="; }; patches = [ ./no-date-in-gzip-man-page.patch + ./nix-store-date.patch ] ++ (lib.optionals stdenv.cc.isClang [ # https://github.com/wolfcw/libfaketime/issues/277 ./0001-Remove-unsupported-clang-flags.patch @@ -22,6 +23,7 @@ stdenv.mkDerivation rec { substituteInPlace $a \ --replace /bin/bash ${stdenv.shell} done + substituteInPlace src/faketime.c --replace @DATE_CMD@ ${coreutils}/bin/date ''; PREFIX = placeholder "out"; diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch b/nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch new file mode 100644 index 000000000000..b88245dfe8fb --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch @@ -0,0 +1,29 @@ +From abd7dd05b440e3dc9621a1579e4afb0267897d9c Mon Sep 17 00:00:00 2001 +From: Finn Behrens <me@kloenk.de> +Date: Fri, 5 Mar 2021 21:58:57 +0100 +Subject: [PATCH] use nix date path + +--- + src/faketime.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/faketime.c b/src/faketime.c +index af618f2..48e47da 100644 +--- a/src/faketime.c ++++ b/src/faketime.c +@@ -50,11 +50,7 @@ + + const char version[] = "0.9.9"; + +-#ifdef __APPLE__ +-static const char *date_cmd = "gdate"; +-#else +-static const char *date_cmd = "date"; +-#endif ++static const char *date_cmd = "@DATE_CMD@"; + + #define PATH_BUFSIZE 4096 + +-- +2.24.3 (Apple Git-128) + |