git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #16610 from leenaars/datefudge

Datefudge

commit909b036b47883711601a843102975f052c3817e2 authorLuca Bruno <lucabru@src.gnome.org> dateFri 12 Aug 2016, 22:10 (10 years ago) parentc8ca30fb250898
2 files changed+42
pkgs/tools/system/datefudge/default.nix+40 pkgs/top-level/all-packages.nix+2
pkgs/tools/system/datefudge/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ stdenv, fetchgit }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "datefudge";
5+ version = "1.2.1";
6+ name = "${pname}-${version}";
7+
8+ src = fetchgit {
9+ sha256 = "0l83kn6c3jr3wzs880zfa64rw81cqjjk55gjxz71rjf2balp64ps";
10+ url = "git://anonscm.debian.org/users/robert/datefudge.git";
11+ rev = "cd141c63bebe9b579109b2232b5e83db18f222c2";
12+ };
13+
14+ patchPhase = ''
15+ substituteInPlace Makefile \
16+ --replace "/usr" "/" \
17+ --replace "-o root -g root" ""
18+ substituteInPlace datefudge.sh \
19+ --replace "@LIBDIR@" "$out/lib/"
20+ '';
21+
22+ preInstallPhase = "mkdir -P $out/lib/datefudge";
23+
24+ installFlags = [ "DESTDIR=$(out)" ];
25+
26+ postInstall = "chmod +x $out/lib/datefudge/datefudge.so";
27+
28+ meta = with stdenv.lib; {
29+ description = "Fake the system date";
30+ longDescription = ''
31+ datefudge is a small utility that pretends that the system time is
32+ different by pre-loading a small library which modifies the time,
33+ gettimeofday and clock_gettime system calls.
34+ '';
35+ homepage = http://packages.qa.debian.org/d/datefudge.html;
36+ license = licenses.gpl2;
37+ platforms = platforms.linux;
38+ maintainers = with maintainers; [ leenaars ];
39+ };
40+}
pkgs/top-level/all-packages.nix+2
@@ -728,6 +728,8 @@ in
728728
729729 datamash = callPackage ../tools/misc/datamash { };
730730
731+ datefudge = callPackage ../tools/system/datefudge { };
732+
731733 ddate = callPackage ../tools/misc/ddate { };
732734
733735 deis = callPackage ../development/tools/deis {};