diff options
Diffstat (limited to 'pkgs/kde/plasma/kinfocenter/default.nix')
-rw-r--r-- | pkgs/kde/plasma/kinfocenter/default.nix | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/pkgs/kde/plasma/kinfocenter/default.nix b/pkgs/kde/plasma/kinfocenter/default.nix index e48424305c1cd..2ef5008905ace 100644 --- a/pkgs/kde/plasma/kinfocenter/default.nix +++ b/pkgs/kde/plasma/kinfocenter/default.nix @@ -1,23 +1,57 @@ { + aha, + clinfo, + dmidecode, + iproute2, lib, + libusb1, + mesa-demos, mkKdeDerivation, - substituteAll, + pciutils, + pulseaudio, qttools, - xdpyinfo, + substituteAll, systemsettings, - libusb1, + util-linux, + vulkan-tools, + wayland-utils, + xdpyinfo, }: +let + tools = { + aha = lib.getExe aha; + clinfo = lib.getExe clinfo; + dmidecode = lib.getExe' dmidecode "dmidecode"; + eglinfo = lib.getExe' mesa-demos "eglinfo"; + glxinfo = lib.getExe' mesa-demos "glxinfo"; + ip = lib.getExe' iproute2 "ip"; + lsblk = lib.getExe' util-linux "lsblk"; + lspci = lib.getExe' pciutils "lspci"; + lscpu = lib.getExe' util-linux "lscpu"; + pactl = lib.getExe' pulseaudio "pactl"; + qdbus = lib.getExe' qttools "qdbus"; + vulkaninfo = lib.getExe' vulkan-tools "vulkaninfo"; + waylandinfo = lib.getExe wayland-utils; + xdpyinfo = lib.getExe xdpyinfo; + }; +in mkKdeDerivation { pname = "kinfocenter"; patches = [ - (substituteAll { + # fwupdmgr is provided through NixOS' module + (substituteAll ({ src = ./0001-tool-paths.patch; - qdbus = "${lib.getBin qttools}/bin/qdbus"; - xdpyinfo = lib.getExe xdpyinfo; - }) + } // tools)) ]; + postPatch = '' + substituteInPlace kcms/firmware_security/fwupdmgr.sh \ + --replace-fail " aha " " ${lib.getExe aha} " + ''; + + extraBuildInputs = [libusb1]; + # fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in # the same directory, while it is actually located in a completely different # store path @@ -25,6 +59,11 @@ mkKdeDerivation { ln -sf ${systemsettings}/bin/systemsettings $out/bin/kinfocenter ''; - extraBuildInputs = [libusb1]; + # Hardcoded as a QString, which is UTF-16 so Nix can't pick it up automatically + postFixup = '' + mkdir -p $out/nix-support + echo "${lib.concatStringsSep ":" (lib.attrValues tools)}" > $out/nix-support/depends + ''; + meta.mainProgram = "kinfocenter"; } |