2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "earlyoom";
|
2020-11-24 20:58:05 +00:00
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rfjakob";
|
|
|
|
repo = "earlyoom";
|
|
|
|
rev = "v${version}";
|
2020-11-24 20:58:05 +00:00
|
|
|
sha256 = "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = lib.optionals withManpage [ pandoc installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
patches = [ ./fix-dbus-path.patch ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [ "VERSION=${version}" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D earlyoom $out/bin/earlyoom
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString withManpage ''
|
2020-04-24 23:36:52 +00:00
|
|
|
installManPage earlyoom.1
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Early OOM Daemon for Linux";
|
|
|
|
homepage = "https://github.com/rfjakob/earlyoom";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [];
|
|
|
|
};
|
|
|
|
}
|