summary refs log tree commit diff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-05-16 11:44:36 +0200
committerMarius Bakke <marius@gnu.org>2021-05-22 17:08:14 +0200
commit46f2d25b0907bb7f9e898686508fdee02f4a4753 (patch)
tree9695ff7fb5afbb8080b475b3af9bfe7f24ef899d /gnu/packages/check.scm
parentb3338f10c49ae08704d330e40d73a8b675eb75d6 (diff)
downloadguix-46f2d25b0907bb7f9e898686508fdee02f4a4753.tar.gz
gnu: libfaketime: Use absolute 'date' reference.
* gnu/packages/check.scm (libfaketime)[inputs]: Add COREUTILS.
[arguments]: Add phase to substitute the absolute 'date' file name.
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 30a1b2ede0..8c16ce1c0d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -25,7 +25,7 @@
 ;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
 ;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -2668,6 +2668,12 @@ portable to just about any platform.")
     (build-system gnu-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'embed-date-reference
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((coreutils (assoc-ref inputs "coreutils")))
+                        (substitute* "src/faketime.c"
+                          (("\"date\"")
+                           (string-append "\"" coreutils "/bin/date\""))))))
                   (replace 'configure
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out")))
@@ -2684,6 +2690,8 @@ portable to just about any platform.")
        #:test-target "test"))
     (native-inputs
      `(("perl" ,perl)))                           ;for tests
+    (inputs
+     `(("coreutils" ,coreutils)))
     (synopsis "Fake the system time for single applications")
     (description
      "The libfaketime library allows users to modify the system time that an