summary refs log blame commit diff
path: root/pkgs/os-specific/linux/power-profiles-daemon/default.nix
blob: 03267b8e9ae5146e8b61e94d96caa1abb3568315 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                       
         



                                  
                    







                                      
                                                                   



















                                                  
                                                                          














                                                                                     
{ stdenv
, lib
, pkg-config
, meson
, ninja
, fetchFromGitLab
, libgudev
, glib
, gobject-introspection
, gettext
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_412
, libxml2
, libxslt
, upower
, systemd
, python3
}:

stdenv.mkDerivation rec {
  pname = "power-profiles-daemon";
  version = "0.8.1";

  outputs = [ "out" "devdoc" ];

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    owner = "hadess";
    repo = "power-profiles-daemon";
    rev = version;
    sha256 = "sha256-OnCUr7KWVPpYGDseBUcJD/PdOobvFnyNA97NhnKbTKY=";
  };

  nativeBuildInputs = [
    pkg-config
    meson
    ninja
    gettext
    gtk-doc
    docbook-xsl-nons
    docbook_xml_dtd_412
    libxml2 # for xmllint for stripping GResources
    libxslt # for xsltproc for building docs
    gobject-introspection
  ];

  buildInputs = [
    libgudev
    systemd
    upower
    glib
    (python3.withPackages (ps: with ps; [ ps.pygobject3 ])) # for cli tool
  ];

  mesonFlags = [
    "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
    "-Dgtk_doc=true"
  ];

  meta = with lib; {
    homepage = "https://gitlab.freedesktop.org/hadess/power-profiles-daemon";
    description = "Makes user-selected power profiles handling available over D-Bus";
    platforms = platforms.linux;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ mvnetbiz ];
  };
}