1{ stdenv, fetchurl, perl }:
2
3stdenv.mkDerivation rec {
4 pname = "libfaketime";
5 version = "0.9.8";
6
7 src = fetchurl {
8 url = "https://github.com/wolfcw/libfaketime/archive/v${version}.tar.gz";
9 sha256 = "18s2hjm4sbrlg6sby944z87yslnq9s85p7j892hyr42qrlvq4a06";
10 };
11
12 patches = [
13 ./no-date-in-gzip-man-page.patch
14 ];
15
16 postPatch = ''
17 patchShebangs test src
18 for a in test/functests/test_exclude_mono.sh src/faketime.c ; do
19 substituteInPlace $a \
20 --replace /bin/bash ${stdenv.shell}
21 done
22 '';
23
24 PREFIX = placeholder "out";
25 LIBDIRNAME = "/lib";
26
27 NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type -Wno-error=format-truncation";
28
29 checkInputs = [ perl ];
30
31 meta = with stdenv.lib; {
32 description = "Report faked system time to programs without having to change the system-wide time";
33 homepage = "https://github.com/wolfcw/libfaketime/";
34 license = licenses.gpl2;
35 platforms = platforms.all;
36 maintainers = [ maintainers.bjornfor ];
37 };
38}