lol
1{
2 lib,
3 ninja,
4 meson,
5 fetchFromGitLab,
6 systemd,
7 libgudev,
8 pkg-config,
9 glib,
10 python3Packages,
11}:
12
13python3Packages.buildPythonApplication rec {
14 pname = "switcheroo-control";
15 version = "2.6";
16
17 format = "other";
18
19 src = fetchFromGitLab {
20 domain = "gitlab.freedesktop.org";
21 owner = "hadess";
22 repo = "switcheroo-control";
23 rev = version;
24 hash = "sha256-F+5HhMxM8pcnAGmVBARKWNCL0rIEzHW/jsGHHqYZJug=";
25 };
26
27 nativeBuildInputs = [
28 ninja
29 meson
30 pkg-config
31 ];
32
33 buildInputs = [
34 systemd
35 libgudev
36 glib
37 ];
38
39 propagatedBuildInputs = [
40 python3Packages.pygobject3
41 ];
42
43 mesonFlags = [
44 "-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
45 "-Dhwdbdir=${placeholder "out"}/etc/udev/hwdb.d"
46 ];
47
48 meta = {
49 description = "D-Bus service to check the availability of dual-GPU";
50 mainProgram = "switcherooctl";
51 homepage = "https://gitlab.freedesktop.org/hadess/switcheroo-control/";
52 changelog = "https://gitlab.freedesktop.org/hadess/switcheroo-control/-/blob/${version}/NEWS";
53 license = lib.licenses.gpl3Plus;
54 maintainers = with lib.maintainers; [ ];
55 platforms = lib.platforms.linux;
56 };
57}