Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 166 lines 3.3 kB view raw
1{ 2 mkDerivation, 3 lib, 4 extra-cmake-modules, 5 kdoctools, 6 wayland-scanner, 7 fetchpatch, 8 libepoxy, 9 lcms2, 10 libICE, 11 libSM, 12 libcap, 13 libdrm, 14 libinput, 15 libxkbcommon, 16 libgbm, 17 pipewire, 18 udev, 19 wayland, 20 xcb-util-cursor, 21 xwayland, 22 plasma-wayland-protocols, 23 wayland-protocols, 24 libxcvt, 25 qtdeclarative, 26 qtmultimedia, 27 qtquickcontrols2, 28 qtscript, 29 qtsensors, 30 qtvirtualkeyboard, 31 qtx11extras, 32 breeze-qt5, 33 kactivities, 34 kcompletion, 35 kcmutils, 36 kconfig, 37 kconfigwidgets, 38 kcoreaddons, 39 kcrash, 40 kdeclarative, 41 kdecoration, 42 kglobalaccel, 43 ki18n, 44 kiconthemes, 45 kidletime, 46 kinit, 47 kio, 48 knewstuff, 49 knotifications, 50 kpackage, 51 krunner, 52 kscreenlocker, 53 kservice, 54 kwayland, 55 kwidgetsaddons, 56 kwindowsystem, 57 kxmlgui, 58 plasma-framework, 59 libqaccessibilityclient, 60}: 61 62# TODO (ttuegel): investigate qmlplugindump failure 63 64mkDerivation { 65 pname = "kwin"; 66 nativeBuildInputs = [ 67 extra-cmake-modules 68 kdoctools 69 wayland-scanner 70 ]; 71 buildInputs = [ 72 libepoxy 73 lcms2 74 libICE 75 libSM 76 libcap 77 libdrm 78 libinput 79 libxkbcommon 80 libgbm 81 pipewire 82 udev 83 wayland 84 xcb-util-cursor 85 xwayland 86 libxcvt 87 plasma-wayland-protocols 88 wayland-protocols 89 90 qtdeclarative 91 qtmultimedia 92 qtquickcontrols2 93 qtscript 94 qtsensors 95 qtvirtualkeyboard 96 qtx11extras 97 98 breeze-qt5 99 kactivities 100 kcmutils 101 kcompletion 102 kconfig 103 kconfigwidgets 104 kcoreaddons 105 kcrash 106 kdeclarative 107 kdecoration 108 kglobalaccel 109 ki18n 110 kiconthemes 111 kidletime 112 kinit 113 kio 114 knewstuff 115 knotifications 116 kpackage 117 krunner 118 kscreenlocker 119 kservice 120 kwayland 121 kwidgetsaddons 122 kwindowsystem 123 kxmlgui 124 plasma-framework 125 libqaccessibilityclient 126 127 ]; 128 outputs = [ 129 "out" 130 "dev" 131 ]; 132 133 postPatch = '' 134 patchShebangs src/effects/strip-effect-metadata.py 135 ''; 136 137 patches = [ 138 ./0001-follow-symlinks.patch 139 ./0002-xwayland.patch 140 ./0003-plugins-qpa-allow-using-nixos-wrapper.patch 141 ./0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch 142 ./0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch 143 # Pass special environments through arguments to `kwin_wayland`, bypassing 144 # ld.so(8) environment stripping due to `kwin_wayland`'s capabilities. 145 # We need this to have `TZDIR` correctly set for `plasmashell`, or 146 # everything related to timezone, like clock widgets, will be broken. 147 # https://invent.kde.org/plasma/kwin/-/merge_requests/1590 148 (fetchpatch { 149 url = "https://invent.kde.org/plasma/kwin/-/commit/9a008b223ad696db3bf5692750f2b74e578e08b8.diff"; 150 sha256 = "sha256-f35G+g2MVABLDbAkCed3ZmtDWrzYn1rdD08mEx35j4k="; 151 }) 152 ]; 153 154 CXXFLAGS = [ 155 ''-DNIXPKGS_XWAYLAND=\"${lib.getExe xwayland}\"'' 156 ]; 157 158 postInstall = '' 159 # Some package(s) refer to these service types by the wrong name. 160 # I would prefer to patch those packages, but I cannot find them! 161 ln -s ''${!outputBin}/share/kservicetypes5/kwineffect.desktop \ 162 ''${!outputBin}/share/kservicetypes5/kwin-effect.desktop 163 ln -s ''${!outputBin}/share/kservicetypes5/kwinscript.desktop \ 164 ''${!outputBin}/share/kservicetypes5/kwin-script.desktop 165 ''; 166}