Browse Source

gnu: Add earlyoom.

* gnu/packages/linux.scm (earlyoom): New variable.
Maxim Cournoyer 1 year ago
No known key found for this signature in database GPG Key ID: 1260E46482E63562
1 changed files with 46 additions and 1 deletions
  1. +46

+ 46
- 1
gnu/packages/linux.scm View File

@ -33,7 +33,7 @@
;;; Copyright © 2018 Pierre Langlois <>
;;; Copyright © 2018 Vasile Dumitrascu <>
;;; Copyright © 2019 Tim Gesthuizen <>
;;; Copyright © 2019 Maxim Cournoyer <>
;;; Copyright © 2019, 2020 Maxim Cournoyer <>
;;; Copyright © 2019 Stefan Stefanović <>
;;; Copyright © 2019 Pierre Langlois <>
;;; Copyright © 2019 Brice Waegeneire <>
@ -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
(name "earlyoom")
(version "1.3")
(source (origin
(method git-fetch)
(uri (git-reference
(url "")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(build-system gnu-build-system)
`(#:phases (modify-phases %standard-phases
(delete 'configure)
(add-before 'check 'set-home
(lambda _
(setenv "HOME" (getcwd))
(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/" contrib)
#: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 "")
(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.