2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchgit, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "datefudge";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "1.24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2020-08-20 17:08:02 +00:00
|
|
|
url = "https://salsa.debian.org/debian/${pname}.git";
|
|
|
|
rev = "debian/${version}";
|
|
|
|
sha256 = "1nh433yx4y4djp0bs6aawqbwk7miq7fsbs9wpjlyh2k9dvil2lrm";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "/usr" "/" \
|
|
|
|
--replace "-o root -g root" ""
|
|
|
|
substituteInPlace datefudge.sh \
|
|
|
|
--replace "@LIBDIR@" "$out/lib/"
|
2020-07-18 16:06:22 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = "chmod +x $out/lib/datefudge/datefudge.so";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fake the system date";
|
|
|
|
longDescription = ''
|
|
|
|
datefudge is a small utility that pretends that the system time is
|
|
|
|
different by pre-loading a small library which modifies the time,
|
|
|
|
gettimeofday and clock_gettime system calls.
|
|
|
|
'';
|
|
|
|
homepage = "https://packages.qa.debian.org/d/datefudge.html";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|