2020-11-26 19:26:23 +00:00
|
|
|
{ lib, stdenv, fetchFromSourcehut, meson, ninja, pkg-config, scdoc, systemd }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "poweralertd";
|
2021-07-22 04:28:08 +00:00
|
|
|
version = "0.2.0";
|
2020-11-26 19:26:23 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~kennylevinsen";
|
|
|
|
repo = "poweralertd";
|
|
|
|
rev = version;
|
2021-07-22 04:28:08 +00:00
|
|
|
sha256 = "19rw9q4pcqw56nmzjfglfikzx5wwjl4n08awwdhg0jy1k0bm3dvp";
|
2020-11-26 19:26:23 +00:00
|
|
|
};
|
|
|
|
|
2023-08-07 08:17:52 +00:00
|
|
|
postPatch = ''
|
2020-11-26 19:26:23 +00:00
|
|
|
substituteInPlace meson.build --replace "systemd.get_pkgconfig_variable('systemduserunitdir')" "'${placeholder "out"}/lib/systemd/user'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
depsBuildBuild = [
|
|
|
|
scdoc
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "UPower-powered power alerter";
|
|
|
|
homepage = "https://git.sr.ht/~kennylevinsen/poweralertd";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ thibautmarty ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "poweralertd";
|
2020-11-26 19:26:23 +00:00
|
|
|
};
|
|
|
|
}
|