diff --git a/pkgs/applications/virtualization/looking-glass-client/default.nix b/pkgs/applications/virtualization/looking-glass-client/default.nix index 60db5708922f..88b1c36a6d26 100644 --- a/pkgs/applications/virtualization/looking-glass-client/default.nix +++ b/pkgs/applications/virtualization/looking-glass-client/default.nix @@ -1,7 +1,39 @@ -{ stdenv, lib, fetchFromGitHub, makeDesktopItem, cmake, pkg-config -, freefont_ttf, spice-protocol, nettle, libbfd, fontconfig, libffi, expat -, libxkbcommon, libGL, libXext, libXrandr, libXi, libXScrnSaver, libXinerama -, libXcursor, libXpresent, wayland, wayland-protocols +{ stdenv +, lib +, fetchFromGitHub +, makeDesktopItem +, pkg-config +, cmake +, freefont_ttf +, spice-protocol +, nettle +, libbfd +, fontconfig +, libffi +, expat +, libGL + +, libX11 +, libxkbcommon +, libXext +, libXrandr +, libXi +, libXScrnSaver +, libXinerama +, libXcursor +, libXpresent + +, wayland +, wayland-protocols + +, pipewire +, pulseaudio +, libsamplerate + +, xorgSupport ? true +, waylandSupport ? true +, pipewireSupport ? true +, pulseSupport ? true }: let @@ -16,40 +48,30 @@ let in stdenv.mkDerivation rec { pname = "looking-glass-client"; - version = "B5.0.1"; + version = "B6"; src = fetchFromGitHub { owner = "gnif"; repo = "LookingGlass"; rev = version; - sha256 = "sha256-UzZQU5SzJ2mo9QBweQB0VJSnKfzgTG5QaKpIQN/6LCE="; + sha256 = "sha256-6vYbNmNJBCoU23nVculac24tHqH7F4AZVftIjL93WJU="; fetchSubmodules = true; }; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ - libGL - freefont_ttf - spice-protocol - expat - libbfd - nettle - fontconfig - libffi - libxkbcommon - libXi - libXScrnSaver - libXinerama - libXcursor - libXpresent - libXext - libXrandr - wayland - wayland-protocols - ]; + buildInputs = [ libGL libX11 freefont_ttf spice-protocol expat libbfd nettle fontconfig libffi ] + ++ lib.optionals xorgSupport [ libxkbcommon libXi libXScrnSaver libXinerama libXcursor libXpresent libXext libXrandr ] + ++ lib.optionals waylandSupport [ libxkbcommon wayland wayland-protocols ] + ++ lib.optionals pipewireSupport [ pipewire libsamplerate ] + ++ lib.optionals pulseSupport [ pulseaudio libsamplerate ]; + + cmakeFlags = [ "-DOPTIMIZE_FOR_NATIVE=OFF" ] + ++ lib.optional (!xorgSupport) "-DENABLE_X11=no" + ++ lib.optional (!waylandSupport) "-DENABLE_WAYLAND=no" + ++ lib.optional (!pulseSupport) "-DENABLE_PULSEAUDIO=no" + ++ lib.optional (!pipewireSupport) "-DENABLE_PIPEWIRE=no"; - cmakeFlags = [ "-DOPTIMIZE_FOR_NATIVE=OFF" ]; postUnpack = '' echo ${src.rev} > source/VERSION diff --git a/pkgs/os-specific/linux/kvmfr/default.nix b/pkgs/os-specific/linux/kvmfr/default.nix index 24fedbf59d78..6b5f31a1d350 100644 --- a/pkgs/os-specific/linux/kvmfr/default.nix +++ b/pkgs/os-specific/linux/kvmfr/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, kernel, kmod, looking-glass-client }: +{ lib, stdenv, fetchFromGitHub, kernel, kmod, looking-glass-client }: stdenv.mkDerivation rec { pname = "kvmfr"; @@ -9,19 +9,6 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" "format" ]; nativeBuildInputs = kernel.moduleBuildDependencies; - patches = lib.optional (kernel.kernelAtLeast "5.16") (fetchpatch { - name = "kvmfr-5.16.patch"; - url = "https://github.com/gnif/LookingGlass/commit/a9b5302a517e19d7a2da114acf71ef1e69cfb497.patch"; - sha256 = "017nxlk2f7kyjp6llwa74dbczdb1jk8v791qld81dxhzkm9dyqqx"; - stripLen = 1; - }) - ++ lib.optional (kernel.kernelAtLeast "5.18") (fetchpatch { - name = "kvmfr-5.18.patch"; - url = "https://github.com/gnif/LookingGlass/commit/c7029f95042fe902843cb6acbfc75889e93dc210.patch"; - sha256 = "sha256-6DpL17XWj8BKpiBdKdCPC51MWKLIo6PixQ9UaygT2Zg="; - stripLen = 1; - }); - makeFlags = [ "KVER=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"