Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 64 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 extra-cmake-modules, 7 fcitx5, 8 gettext, 9 qtbase, 10 qtwayland, 11 wrapQtAppsHook, 12 wayland, 13}: 14let 15 majorVersion = lib.versions.major qtbase.version; 16in 17stdenv.mkDerivation rec { 18 pname = "fcitx5-qt${majorVersion}"; 19 version = "5.1.9"; 20 21 src = fetchFromGitHub { 22 owner = "fcitx"; 23 repo = "fcitx5-qt"; 24 rev = version; 25 hash = "sha256-cOCLPsWRcwukGCKAYHrZSRUYlmfYxdyspX5Y0rqbD2w="; 26 }; 27 28 postPatch = '' 29 substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \ 30 --replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix} 31 ''; 32 33 cmakeFlags = [ 34 "-DENABLE_QT4=OFF" 35 "-DENABLE_QT5=OFF" 36 "-DENABLE_QT6=OFF" 37 "-DENABLE_QT${majorVersion}=ON" 38 ]; 39 40 nativeBuildInputs = [ 41 cmake 42 extra-cmake-modules 43 gettext 44 wrapQtAppsHook 45 ]; 46 47 buildInputs = [ 48 qtbase 49 qtwayland 50 fcitx5 51 wayland 52 ]; 53 54 meta = with lib; { 55 description = "Fcitx5 Qt Library"; 56 homepage = "https://github.com/fcitx/fcitx5-qt"; 57 license = with licenses; [ 58 lgpl21Plus 59 bsd3 60 ]; 61 maintainers = with maintainers; [ poscat ]; 62 platforms = platforms.linux; 63 }; 64}