nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, bash, perl }:
2
3stdenv.mkDerivation rec {
4 name = "libfaketime-${version}";
5 version = "0.9.7";
6
7 src = fetchurl {
8 url = "https://github.com/wolfcw/libfaketime/archive/v${version}.tar.gz";
9 sha256 = "07l189881q0hybzmlpjyp7r5fwz23iafkm957bwy4gnmn9lg6rad";
10 };
11
12 patches = [
13 ./no-date-in-gzip-man-page.patch
14 ];
15
16 postPatch = ''
17 patchShebangs test src
18 for a in test/functests/test_exclude_mono.sh src/faketime.c ; do
19 substituteInPlace $a \
20 --replace /bin/bash ${stdenv.shell}
21 done
22 '';
23
24 preBuild = ''
25 makeFlagsArray+=(PREFIX="$out" LIBDIRNAME=/lib)
26 '';
27
28 checkInputs = [ perl ];
29
30 meta = with stdenv.lib; {
31 description = "Report faked system time to programs without having to change the system-wide time";
32 homepage = "https://github.com/wolfcw/libfaketime/";
33 license = licenses.gpl2;
34 platforms = platforms.all;
35 maintainers = [ maintainers.bjornfor ];
36 };
37}