3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix

34 lines
872 B
Nix
Raw Normal View History

2020-04-12 10:09:57 +01:00
{ stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false }:
2017-02-24 05:31:23 +00:00
stdenv.mkDerivation rec {
2020-04-12 10:09:57 +01:00
pname = "earlyoom";
2020-07-08 06:27:23 +01:00
version = "1.6.1";
2017-02-24 05:31:23 +00:00
src = fetchFromGitHub {
owner = "rfjakob";
repo = "earlyoom";
2020-04-12 10:09:57 +01:00
rev = "v${version}";
2020-07-08 06:27:23 +01:00
sha256 = "1cn0bgbgiq69i8mk8zxly1f7j01afm82g672qzccz6swsi2637j4";
2017-02-24 05:31:23 +00:00
};
2020-04-12 10:09:57 +01:00
nativeBuildInputs = stdenv.lib.optionals withManpage [ pandoc installShellFiles ];
patches = [ ./fix-dbus-path.patch ];
2020-04-12 10:09:57 +01:00
makeFlags = [ "VERSION=${version}" ];
2017-02-24 05:31:23 +00:00
installPhase = ''
install -D earlyoom $out/bin/earlyoom
2020-04-12 10:09:57 +01:00
'' + stdenv.lib.optionalString withManpage ''
installManPage earlyoom.1
2017-02-24 05:31:23 +00:00
'';
2020-04-12 10:09:57 +01:00
meta = with stdenv.lib; {
2017-02-24 05:31:23 +00:00
description = "Early OOM Daemon for Linux";
2020-04-12 10:09:57 +01:00
homepage = "https://github.com/rfjakob/earlyoom";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [];
2017-02-24 05:31:23 +00:00
};
}