2020-06-26 13:38:19 +01:00
|
|
|
{ stdenv, fetchgit, fetchpatch }:
|
2016-06-29 22:13:45 +01:00
|
|
|
|
2020-07-26 23:31:07 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-06-29 22:13:45 +01:00
|
|
|
pname = "datefudge";
|
2020-07-26 23:15:38 +01:00
|
|
|
version = "1.24";
|
2016-06-29 22:13:45 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
2020-07-26 23:31:07 +01:00
|
|
|
url = "https://salsa.debian.org/debian/${pname}.git";
|
|
|
|
rev = "debian/${version}";
|
2020-07-26 23:15:38 +01:00
|
|
|
sha256 = "1nh433yx4y4djp0bs6aawqbwk7miq7fsbs9wpjlyh2k9dvil2lrm";
|
2016-06-29 22:13:45 +01:00
|
|
|
};
|
|
|
|
|
2020-06-26 13:38:19 +01:00
|
|
|
postPatch = ''
|
2016-06-29 22:13:45 +01:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "/usr" "/" \
|
|
|
|
--replace "-o root -g root" ""
|
|
|
|
substituteInPlace datefudge.sh \
|
|
|
|
--replace "@LIBDIR@" "$out/lib/"
|
2020-06-26 13:38:19 +01:00
|
|
|
'';
|
2016-06-29 22:13:45 +01:00
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = "chmod +x $out/lib/datefudge/datefudge.so";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://packages.qa.debian.org/d/datefudge.html";
|
2016-06-29 22:13:45 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|