2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, perl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libfaketime";
|
|
|
|
version = "0.9.8";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/wolfcw/libfaketime/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "18s2hjm4sbrlg6sby944z87yslnq9s85p7j892hyr42qrlvq4a06";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./no-date-in-gzip-man-page.patch
|
2020-11-30 08:33:03 +00:00
|
|
|
] ++ (stdenv.lib.optionals stdenv.cc.isClang [
|
|
|
|
# https://github.com/wolfcw/libfaketime/issues/277
|
|
|
|
./0001-Remove-unsupported-clang-flags.patch
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|