Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 73 lines 1.3 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 nix-update-script, 6 cmake, 7 ninja, 8 qtbase, 9 qtwayland, 10 qt5, 11 xorg, 12 useQt6 ? false, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "adwaita-qt"; 17 version = "1.4.2"; 18 19 outputs = [ 20 "out" 21 "dev" 22 ]; 23 24 src = fetchFromGitHub { 25 owner = "FedoraQt"; 26 repo = pname; 27 rev = version; 28 sha256 = "sha256-K/+SL52C+M2OC4NL+mhBnm/9BwH0KNNTGIDmPwuUwkM="; 29 }; 30 31 nativeBuildInputs = [ 32 cmake 33 ninja 34 ]; 35 36 buildInputs = [ 37 qtbase 38 ] 39 ++ lib.optionals stdenv.hostPlatform.isLinux [ 40 xorg.libxcb 41 ] 42 ++ lib.optionals (!useQt6) [ 43 qt5.qtx11extras 44 ] 45 ++ lib.optionals useQt6 [ 46 qtwayland 47 ]; 48 49 # Qt setup hook complains about missing `wrapQtAppsHook` otherwise. 50 dontWrapQtApps = true; 51 52 cmakeFlags = lib.optionals useQt6 [ 53 "-DUSE_QT6=true" 54 ]; 55 56 postPatch = '' 57 # Fix plugin dir 58 substituteInPlace src/style/CMakeLists.txt \ 59 --replace "DESTINATION \"\''${QT_PLUGINS_DIR}/styles" "DESTINATION \"$qtPluginPrefix/styles" 60 ''; 61 62 passthru = { 63 updateScript = nix-update-script { }; 64 }; 65 66 meta = with lib; { 67 description = "Style to bend Qt applications to look like they belong into GNOME Shell"; 68 homepage = "https://github.com/FedoraQt/adwaita-qt"; 69 license = licenses.gpl2Plus; 70 maintainers = [ ]; 71 platforms = platforms.all; 72 }; 73}