[bug#78347,1/2] gnu: Add pps-tools.

Message ID 47c7242bb230aac863cf0b739e59a6fcd6a7813d.1746863945.git.a.r.draidi@redscript.org
State New
Headers
Series Add NTPsec and pps-tools |

Commit Message

Ahmad Draidi May 10, 2025, 8:20 a.m. UTC
  * gnu/packages/time.scm (pps-tools): New variable.

Change-Id: I06a10988acbf4dcd684721e1bee6a2d0c6f2dac6
---
 gnu/packages/time.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
  

Patch

diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index 56053da5010..2a09efb1fc2 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -118,6 +118,46 @@  (define-public time
 to a file.")
     (license gpl3+)))
 
+(define-public pps-tools
+  ;; Last tagged release was in 2021
+  (let ((commit "e5083fe1481a34373dee2acfabb63001ee9c40e0")
+        (revision "1"))
+    (package
+      (name "pps-tools")
+      (version (git-version "1.0.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/redlab-i/pps-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1q3yvkwgqzafpx940cgqjn0harziv9gix1k3r3ymidmip0i5z1cp"))))
+      (arguments
+       (list
+        #:tests? #f ;There is no test suite.
+        #:make-flags
+        #~(list "CC=gcc"
+                (string-append "DESTDIR=" %output))
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; No configure script
+            (delete 'configure)
+            (add-after 'unpack 'patch-makefile
+              (lambda _
+                (substitute* "Makefile"
+                  (("/usr/")
+                   "/")))))))
+      (build-system gnu-build-system)
+      (home-page "https://github.com/redlab-i/pps-tools")
+      (synopsis "User-space tools and headers for LinuxPPS")
+      (description
+       "This package includes the necessary headers for using
+@url{http://linuxpps.org/, LinuxPPS} PPSAPI kernel interface in user-space
+applications, and several support tools.")
+      (license gpl2+))))
+
 (define-public python-pytimeparse
   (package
     (name "python-pytimeparse")