2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl }:
|
2014-11-02 12:52:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libfaketime";
|
2021-02-23 05:52:49 +00:00
|
|
|
version = "0.9.9";
|
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";
|
2021-02-23 05:52:49 +00:00
|
|
|
sha256 = "sha256-V9AYEVA2HAqbXI7vBbETkvYTStosLZmOkuY9rtY5ZHw=";
|
2014-11-02 12:52:39 +00:00
|
|
|
};
|
|
|
|
|
2014-04-13 13:46:27 +00:00
|
|
|
patches = [
|
|
|
|
./no-date-in-gzip-man-page.patch
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ (lib.optionals stdenv.cc.isClang [
|
2020-11-25 19:15:00 +00:00
|
|
|
# https://github.com/wolfcw/libfaketime/issues/277
|
|
|
|
./0001-Remove-unsupported-clang-flags.patch
|
|
|
|
]);
|
2014-04-13 13:46:27 +00:00
|
|
|
|
2018-08-08 18:47:05 +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
|
|
|
|
'';
|
|
|
|
|
2019-05-14 19:57:41 +00:00
|
|
|
PREFIX = placeholder "out";
|
|
|
|
LIBDIRNAME = "/lib";
|
2014-11-02 12:52:39 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
NIX_CFLAGS_COMPILE = 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 18:47:05 +00:00
|
|
|
checkInputs = [ perl ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2014-11-02 12:52:39 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|