diff mbox series

[bug#47798,v2] gnu: Add collectl.

Message ID i6nQ6QXtW1o_8fnyF6uN-ASENGrGvqEmS7cSn_U_FI4GX6RREsq2IGnZ35yF4IpffNDPDtu-cP8Zgh21I7ZGADVVRw74ribkAEoZkP6yXyE=@protonmail.com
State New
Headers show
Series [bug#47798,v2] gnu: Add collectl. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

phodina Nov. 5, 2021, 6:05 a.m. UTC
Hi zimoun and Roel,

I've build and used the package. The only issue was with the copyright line, therefore I'm sending this patch.

Petr

----8>------------cut here------------------->8-----------

* gnu/packages/admin.scm (collectl): New variable.

--
2.33.1
diff mbox series

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 86b6b7ce50..33aebfecfe 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,6 +44,7 @@ 
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -430,6 +431,47 @@  (define-public cloud-utils
 @end itemize")
     (license license:gpl3)))

+(define-public collectl
+  (package
+   (name "collectl")
+   (version "4.3.1")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "mirror://sourceforge/collectl/collectl/collectl-" version
+                   "/collectl-" version ".src.tar.gz"))
+             (sha256
+              (base32
+               "1wc9k3rmhqzh6cx5dcpqhlc3xcpadsn2ic54r19scdjbjx6jd1r1"))))
+   (build-system gnu-build-system)
+   (arguments
+    `(#:tests? #f ; There are no tests.
+      #:phases
+      (modify-phases %standard-phases
+        (delete 'build) ; There's nothing to build.
+        (replace 'configure
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* "INSTALL"
+              (("DESTDIR:=\"/\"") (format #f "DESTDIR:=~s"
+                                          (assoc-ref outputs "out")))
+              (("DESTDIR/usr") "DESTDIR"))))
+        (replace 'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* "collectl"
+             (("\\$configFile='';")
+              (string-append "$configFile='"
+                             (assoc-ref outputs "out")
+                             "/etc';")))
+            (invoke "./INSTALL"))))))
+   (inputs
+    `(("perl" ,perl)))
+   (home-page "http://collectl.sourceforge.net")
+   (synopsis "Performance data collector")
+   (description "This package provides a program that collects various
+performance measurement data like CPU, memory, disk and network performance
+numbers.")
+   (license license:artistic2.0)))
+
 (define-public daemontools
   (package
     (name "daemontools")