forked from mirrors/nixpkgs
a774af3605
In $out/share it is NOT picked up into /etc/systemd/... when psi-notify is added to configuration.systemd.packages . (Originally put in $out/share b/c a hook copies from $out/lib into there ... so why not just put there? This is why.)
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, systemd, libnotify, pkg-config }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "psi-notify";
|
|
version = "1.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cdown";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0hn37plim1smmlrjjmz8kybyms8pz3wxcgf8vmqjrsqi6bfcym7g";
|
|
};
|
|
|
|
buildInputs = [ systemd libnotify ];
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D psi-notify $out/bin/psi-notify
|
|
substituteInPlace psi-notify.service --replace psi-notify $out/bin/psi-notify
|
|
install -D psi-notify.service $out/lib/systemd/user/psi-notify.service
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Alert on system resource saturation";
|
|
longDescription = ''
|
|
psi-notify can alert you when resources on your machine are becoming
|
|
oversaturated, and allow you to take action before your system slows to a
|
|
crawl.
|
|
'';
|
|
license = licenses.mit;
|
|
homepage = "https://github.com/cdown/psi-notify";
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ eduarrrd ];
|
|
};
|
|
}
|