depot/third_party/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

31 lines
830 B
Nix

{ stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false }:
stdenv.mkDerivation rec {
pname = "earlyoom";
version = "1.6";
src = fetchFromGitHub {
owner = "rfjakob";
repo = "earlyoom";
rev = "v${version}";
sha256 = "0g2bjsvnqq5h4g1k3a0x6ixb334wpzbm2gafl78b6ic6j45smwcs";
};
nativeBuildInputs = stdenv.lib.optionals withManpage [ pandoc installShellFiles ];
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; [];
};
}