1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix

34 lines
856 B
Nix
Raw Normal View History

{ lib, 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-10-15 06:07:55 +01:00
version = "1.6.2";
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-10-15 06:07:55 +01:00
sha256 = "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq";
2017-02-24 05:31:23 +00:00
};
2021-01-15 14:45:37 +00:00
nativeBuildInputs = lib.optionals withManpage [ pandoc installShellFiles ];
2020-04-12 10:09:57 +01:00
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
2021-01-15 14:45:37 +00:00
'' + lib.optionalString withManpage ''
2020-04-12 10:09:57 +01:00
installManPage earlyoom.1
2017-02-24 05:31:23 +00:00
'';
meta = with 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
};
}