mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
fe3e52c291
* earlyoom: patch absolute path of dbus-send * nixos/earlyoom: replace `notificationsCommand` with `enableNotification` * nixos/earlyoom: setup `systembus-notify` when `enableNotification`
34 lines
870 B
Nix
34 lines
870 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 ];
|
|
|
|
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; [];
|
|
};
|
|
}
|