Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, ninja 3, meson 4, fetchFromGitLab 5, systemd 6, libgudev 7, pkg-config 8, glib 9, python3 10, gobject-introspection 11}: 12 13python3.pkgs.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 = pname; 23 rev = version; 24 hash = "sha256-F+5HhMxM8pcnAGmVBARKWNCL0rIEzHW/jsGHHqYZJug="; 25 }; 26 27 nativeBuildInputs = [ 28 ninja 29 meson 30 pkg-config 31 32 # needed for glib-compile-resources 33 glib 34 ]; 35 36 buildInputs = [ 37 systemd 38 libgudev 39 ]; 40 41 propagatedBuildInputs = [ 42 python3.pkgs.pygobject3 43 ]; 44 45 mesonFlags = [ 46 "-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system" 47 "-Dhwdbdir=${placeholder "out"}/etc/udev/hwdb.d" 48 ]; 49 50 meta = with lib; { 51 description = "D-Bus service to check the availability of dual-GPU"; 52 homepage = "https://gitlab.freedesktop.org/hadess/switcheroo-control/"; 53 changelog = "https://gitlab.freedesktop.org/hadess/switcheroo-control/-/blob/${version}/NEWS"; 54 license = licenses.gpl3Plus; 55 maintainers = [ ]; 56 platforms = platforms.linux; 57 }; 58}