guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add earlyoom.


From: guix-commits
Subject: 01/02: gnu: Add earlyoom.
Date: Fri, 31 Jan 2020 23:37:35 -0500 (EST)

apteryx pushed a commit to branch master
in repository guix.

commit 76f5428bc6b4b4d944be1c16f50d6e558416635f
Author: Maxim Cournoyer <address@hidden>
AuthorDate: Sun Jan 5 00:44:48 2020 -0500

    gnu: Add earlyoom.
    
    * gnu/packages/linux.scm (earlyoom): New variable.
---
 gnu/packages/linux.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 3ab4822..6261d28 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -33,7 +33,7 @@
 ;;; Copyright © 2018 Pierre Langlois <address@hidden>
 ;;; Copyright © 2018 Vasile Dumitrascu <address@hidden>
 ;;; Copyright © 2019 Tim Gesthuizen <address@hidden>
-;;; Copyright © 2019 Maxim Cournoyer <address@hidden>
+;;; Copyright © 2019, 2020 Maxim Cournoyer <address@hidden>
 ;;; Copyright © 2019 Stefan Stefanović <address@hidden>
 ;;; Copyright © 2019 Pierre Langlois <address@hidden>
 ;;; Copyright © 2019 Brice Waegeneire <address@hidden>
@@ -87,6 +87,7 @@
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages man)
@@ -2656,6 +2657,50 @@ kmod.  The aim is to be compatible with tools, 
configurations and indices
 from the module-init-tools project.")
     (license license:gpl2+))) ; library under lgpl2.1+
 
+(define-public earlyoom
+  (package
+    (name "earlyoom")
+    (version "1.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rfjakob/earlyoom.git";)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0fwbx0y80nqgkxrc9kf9j3iwa0wbps2jmqir3pgqbc2cj0wjh0lr"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-before 'check 'set-home
+                    (lambda _
+                      (setenv "HOME" (getcwd))
+                      #t))
+                  (add-after 'build 'install-contribs
+                    ;; Install what seems useful from the contrib directory.
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (contrib (string-append
+                                       out "/share/earlyoom/contrib")))
+                        (install-file "contrib/notify_all_users.py" contrib)
+                        #t))))
+       #:make-flags (let* ((prefix (assoc-ref %outputs "out")))
+                      (list "CC=gcc"
+                            (string-append "VERSION=v" ,version)
+                            (string-append "PREFIX=" prefix)
+                            (string-append "SYSCONFDIR=" prefix "/etc")))
+       #:test-target "test"))
+    (native-inputs `(("go" ,go)               ;for the test suite
+                     ("pandoc" ,ghc-pandoc))) ;to generate the manpage
+    (home-page "https://github.com/rfjakob/earlyoom";)
+    (synopsis "Simple out of memory (OOM) daemon for the Linux kernel")
+    (description "Early OOM is a minimalist out of memory (OOM) daemon that
+runs in user space and provides a more responsive and configurable alternative
+to the in-kernel OOM killer.")
+    (license license:expat)))
+
 (define-public eudev
   ;; The post-systemd fork, maintained by Gentoo.
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]