diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/os-specific/linux/switcheroo-control/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/os-specific/linux/switcheroo-control/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/switcheroo-control/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/switcheroo-control/default.nix b/pkgs/os-specific/linux/switcheroo-control/default.nix new file mode 100644 index 00000000000..38945c70622 --- /dev/null +++ b/pkgs/os-specific/linux/switcheroo-control/default.nix @@ -0,0 +1,58 @@ +{ lib +, ninja +, meson +, fetchFromGitLab +, systemd +, libgudev +, pkg-config +, glib +, python3 +, gobject-introspection +}: + +python3.pkgs.buildPythonApplication rec { + pname = "switcheroo-control"; + version = "2.3"; + + format = "other"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "hadess"; + repo = pname; + rev = version; + hash = "sha256-1Pze2TJ9mggfcpiLFwJ7/9WhsdJx4G3GoA7+Z47shuc="; + }; + + 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; + }; +} |