diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfaketime')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libfaketime/default.nix | 36 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libfaketime/no-date-in-gzip-man-page.patch | 12 |
2 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/default.nix b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix new file mode 100644 index 000000000000..62f1b087de5b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, perl }: + +stdenv.mkDerivation rec { + pname = "libfaketime"; + version = "0.9.7"; + + src = fetchurl { + url = "https://github.com/wolfcw/libfaketime/archive/v${version}.tar.gz"; + sha256 = "07l189881q0hybzmlpjyp7r5fwz23iafkm957bwy4gnmn9lg6rad"; + }; + + patches = [ + ./no-date-in-gzip-man-page.patch + ]; + + postPatch = '' + patchShebangs test src + for a in test/functests/test_exclude_mono.sh src/faketime.c ; do + substituteInPlace $a \ + --replace /bin/bash ${stdenv.shell} + done + ''; + + PREFIX = placeholder "out"; + LIBDIRNAME = "/lib"; + + checkInputs = [ perl ]; + + meta = with stdenv.lib; { + description = "Report faked system time to programs without having to change the system-wide time"; + homepage = "https://github.com/wolfcw/libfaketime/"; + license = licenses.gpl2; + platforms = platforms.all; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/no-date-in-gzip-man-page.patch b/nixpkgs/pkgs/development/libraries/libfaketime/no-date-in-gzip-man-page.patch new file mode 100644 index 000000000000..7b7e362fbf0f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libfaketime/no-date-in-gzip-man-page.patch @@ -0,0 +1,12 @@ +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" |