2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, ninja
|
|
|
|
, meson
|
|
|
|
, fetchFromGitLab
|
|
|
|
, systemd
|
|
|
|
, libgudev
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, python3
|
|
|
|
, gobject-introspection
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "switcheroo-control";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.6";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "hadess";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-F+5HhMxM8pcnAGmVBARKWNCL0rIEzHW/jsGHHqYZJug=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
ninja
|
|
|
|
meson
|
|
|
|
pkg-config
|
|
|
|
|
|
|
|
# needed for glib-compile-resources
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
systemd
|
|
|
|
libgudev
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3.pkgs.pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
"-Dhwdbdir=${placeholder "out"}/etc/udev/hwdb.d"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "D-Bus service to check the availability of dual-GPU";
|
|
|
|
homepage = "https://gitlab.freedesktop.org/hadess/switcheroo-control/";
|
|
|
|
changelog = "https://gitlab.freedesktop.org/hadess/switcheroo-control/-/blob/${version}/NEWS";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|