2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, fetchurl, perl }:
|
2014-11-02 12:52:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libfaketime";
|
2019-09-27 03:06:21 +01:00
|
|
|
version = "0.9.8";
|
2014-11-02 12:52:39 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-11-15 06:45:50 +00:00
|
|
|
url = "https://github.com/wolfcw/libfaketime/archive/v${version}.tar.gz";
|
2019-09-27 03:06:21 +01:00
|
|
|
sha256 = "18s2hjm4sbrlg6sby944z87yslnq9s85p7j892hyr42qrlvq4a06";
|
2014-11-02 12:52:39 +00:00
|
|
|
};
|
|
|
|
|
2014-04-13 14:46:27 +01:00
|
|
|
patches = [
|
|
|
|
./no-date-in-gzip-man-page.patch
|
2020-11-25 19:15:00 +00:00
|
|
|
] ++ (stdenv.lib.optionals stdenv.cc.isClang [
|
|
|
|
# https://github.com/wolfcw/libfaketime/issues/277
|
|
|
|
./0001-Remove-unsupported-clang-flags.patch
|
|
|
|
]);
|
2014-04-13 14:46:27 +01:00
|
|
|
|
2018-08-08 19:47:05 +01: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
|
|
|
|
'';
|
|
|
|
|
2019-05-14 20:57:41 +01:00
|
|
|
PREFIX = placeholder "out";
|
|
|
|
LIBDIRNAME = "/lib";
|
2014-11-02 12:52:39 +00:00
|
|
|
|
2020-11-25 19:15:00 +00:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation";
|
2019-01-11 06:46:39 +00:00
|
|
|
|
2018-08-08 19:47:05 +01:00
|
|
|
checkInputs = [ perl ];
|
|
|
|
|
2014-11-02 12:52:39 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Report faked system time to programs without having to change the system-wide time";
|
2017-11-15 06:45:50 +00:00
|
|
|
homepage = "https://github.com/wolfcw/libfaketime/";
|
2014-11-02 12:52:39 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|