base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / po / poweralertd / package.nix
blobc61f5af1b41d1051bb4804a505d33ef306a65fee
1 { lib, stdenv, fetchFromSourcehut, meson, ninja, pkg-config, scdoc, systemd }:
3 stdenv.mkDerivation rec {
4   pname = "poweralertd";
5   version = "0.3.0";
7   outputs = [ "out" "man" ];
9   src = fetchFromSourcehut {
10     owner = "~kennylevinsen";
11     repo = "poweralertd";
12     rev = version;
13     hash = "sha256-WzqThv3Vu8R+g6Bn8EfesRk18rchCvw/UMPwbn9YC80=";
14   };
16   postPatch = ''
17     substituteInPlace meson.build --replace-fail "systemd.get_pkgconfig_variable('systemduserunitdir')" "'${placeholder "out"}/lib/systemd/user'"
18   '';
20   buildInputs = [
21     systemd
22   ];
24   nativeBuildInputs = [
25     meson
26     ninja
27     pkg-config
28   ];
30   depsBuildBuild = [
31     scdoc
32     pkg-config
33   ];
35   meta = with lib; {
36     description = "UPower-powered power alerter";
37     homepage = "https://git.sr.ht/~kennylevinsen/poweralertd";
38     license = licenses.gpl3Only;
39     platforms = platforms.linux;
40     maintainers = with maintainers; [ thibautmarty ];
41     mainProgram = "poweralertd";
42   };