nixpkgs/pkgs/by-name/ps/psi-notify/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, systemd, libnotify, pkg-config }:
stdenv.mkDerivation rec {
pname = "psi-notify";
version = "1.3.1";
src = fetchFromGitHub {
owner = "cdown";
repo = pname;
rev = version;
sha256 = "sha256-GhGiSI5r0Ki6+MYNa5jCDyYZEW5R9LDNZ/S8K+6L0jo=";
};
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 ];
mainProgram = "psi-notify";
};
}