libfaketime: 0.9.9 -> 0.9.10

Drop patch `no-date-in-gzip-man-page.patch` as changes made
upstream. Backport patch from upstream to fix building on
`x86_64-darwin`.
This commit is contained in:
usertam 2022-12-19 19:07:49 +08:00
parent 5b18bcaf81
commit e6b4e45a2f
No known key found for this signature in database
GPG key ID: C35F5FF3A6C5AC43
3 changed files with 10 additions and 18 deletions

View file

@ -1,19 +1,23 @@
{ lib, stdenv, fetchFromGitHub, perl, coreutils }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, perl, coreutils }:
stdenv.mkDerivation rec {
pname = "libfaketime";
version = "0.9.9";
version = "0.9.10";
src = fetchFromGitHub {
owner = "wolfcw";
repo = "libfaketime";
rev = "v${version}";
sha256 = "sha256-P1guVggteGtoq8+eeE966hDPkRwsn0m7oLCohyPrIb4=";
sha256 = "sha256-DYRuQmIhQu0CNEboBAtHOr/NnWxoXecuPMSR/UQ/VIQ=";
};
patches = [
./no-date-in-gzip-man-page.patch
./nix-store-date.patch
(fetchpatch {
name = "0001-libfaketime.c-wrap-timespec_get-in-TIME_UTC-macro.patch";
url = "https://github.com/wolfcw/libfaketime/commit/e0e6b79568d36a8fd2b3c41f7214769221182128.patch";
sha256 = "sha256-KwwP76v0DXNW73p/YBvwUOPdKMAcVdbQSKexD/uFOYo=";
})
] ++ (lib.optionals stdenv.cc.isClang [
# https://github.com/wolfcw/libfaketime/issues/277
./0001-Remove-unsupported-clang-flags.patch

View file

@ -13,9 +13,9 @@ index af618f2..48e47da 100644
+++ b/src/faketime.c
@@ -50,11 +50,7 @@
const char version[] = "0.9.9";
const char version[] = "0.9.10";
-#ifdef __APPLE__
-#if (defined __APPLE__) || (defined __sun)
-static const char *date_cmd = "gdate";
-#else
-static const char *date_cmd = "date";

View file

@ -1,12 +0,0 @@
diff -ur libfaketime-0.9.5.orig/man/Makefile libfaketime-0.9.5/man/Makefile
--- libfaketime-0.9.5.orig/man/Makefile 2013-10-13 11:19:30.000000000 +0200
+++ libfaketime-0.9.5/man/Makefile 2014-04-13 01:22:14.362296519 +0200
@@ -6,7 +6,7 @@
install:
$(INSTALL) -Dm0644 faketime.1 "${DESTDIR}${PREFIX}/share/man/man1/faketime.1"
- gzip -f "${DESTDIR}${PREFIX}/share/man/man1/faketime.1"
+ gzip -9nf "${DESTDIR}${PREFIX}/share/man/man1/faketime.1"
uninstall:
rm -f "${DESTDIR}${PREFIX}/share/man/man1/faketime.1.gz"