depot/third_party/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix
Default email 1ffc76754d Project import generated by Copybara.
GitOrigin-RevId: a5cc7d3197705f933d88e97c0c61849219ce76c1
2020-07-18 18:06:22 +02:00

33 lines
872 B
Nix

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