[PATCH] gnu: Add datefudge.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kyle Meyer
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kyle Meyer
Severity
normal

Debbugs page

Kyle Meyer wrote 6 years ago
(address . guix-patches@gnu.org)(name . Kyle Meyer)(address . kyle@kyleam.com)
20190204040052.3195-1-kyle@kyleam.com
* gnu/packages/time.scm (datefudge): New variable.
---
I wasn't quite sure which module to place this in. Please let me know if
there's a more appropriate location.

gnu/packages/time.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index e491970300..948d2b995c 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,10 +35,12 @@ (define-module (gnu packages time)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz))
@@ -377,3 +380,41 @@ (define-public python-aniso8601
(define-public python2-aniso8601
(package-with-python2 python-aniso8601))
+
+(define-public datefudge
+ (package
+ (name "datefudge")
+ (version "1.22")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://salsa.debian.org/debian/datefudge.git")
+ (commit (string-append "debian/" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1fmd05r00wx4zc90lbi804jl7xwdl11jq2a1kp5lqimk3yyvfw4c"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:make-flags (list "CC=gcc"
+ (string-append "prefix=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-makefile
+ (lambda _
+ (substitute* "Makefile"
+ ((" -o root -g root") "")
+ (("VERSION := \\$\\(shell dpkg-parsechangelog .*")
+ (string-append "VERSION = " ,version)))
+ #t))
+ (delete 'configure))))
+ (native-inputs
+ `(("perl" ,perl)))
+ (home-page "https://salsa.debian.org/debian/datefudge")
+ (synopsis "Pretend the system date is different")
+ (description
+ "Utility that fakes the system time by pre-loading a small library that
+modifies the @code{time}, @code{gettimeofday} and @code{clock_gettime} system
+calls.")
+ (license gpl2)))
--
2.20.1
Ludovic Courtès wrote 6 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 34306-done@debbugs.gnu.org)
87womc7ewf.fsf@gnu.org
Hello Kyle,

Kyle Meyer <kyle@kyleam.com> skribis:

Toggle quote (5 lines)
> * gnu/packages/time.scm (datefudge): New variable.
> ---
> I wasn't quite sure which module to place this in. Please let me know if
> there's a more appropriate location.

libfaketime, which does the same thing, lives in check.scm, but time.scm
is just as appropriate or maybe more. :-)

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 34306@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 34306
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help