nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 71 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch2, 6 cmake, 7 qt5, 8 qt6, 9 wayland, 10 nix-update-script, 11 useQt6 ? false, 12 13 # Shadows support on Qt5 requires the feature backported from Qt6: 14 # https://src.fedoraproject.org/rpms/qt5-qtwayland/blob/rawhide/f/qtwayland-decoration-support-backports-from-qt6.patch 15 qt5ShadowsSupport ? false, 16}: 17 18let 19 qt = if useQt6 then qt6 else qt5; 20 qtVersion = if useQt6 then "6" else "5"; 21 22in 23stdenv.mkDerivation (finalAttrs: { 24 pname = "qadwaitadecorations"; 25 version = "0.1.7"; 26 27 src = fetchFromGitHub { 28 owner = "FedoraQt"; 29 repo = "QAdwaitaDecorations"; 30 rev = finalAttrs.version; 31 hash = "sha256-Zg2G3vuRD/kK5C2fFq6Cft218uFyBvfXtO1DHKQECFQ="; 32 }; 33 34 patches = [ 35 (fetchpatch2 { 36 # https://github.com/FedoraQt/QAdwaitaDecorations/pull/88 37 name = "Fix build with Qt 6.10"; 38 url = "https://github.com/FedoraQt/QAdwaitaDecorations/commit/e6da80a440218b87e441c8a698014ef3962af98b.patch?full_index=1"; 39 hash = "sha256-7ZmceoOzUDHvvCX+8SwuX+DIi65d6hYIYfpikMiN0wM="; 40 }) 41 ]; 42 43 nativeBuildInputs = [ 44 cmake 45 ]; 46 47 buildInputs = with qt; [ 48 qtbase 49 qtsvg 50 qtwayland 51 wayland 52 ]; 53 54 dontWrapQtApps = true; 55 56 cmakeFlags = [ 57 "-DQT_PLUGINS_DIR=${placeholder "out"}/${qt.qtbase.qtPluginPrefix}" 58 ] 59 ++ lib.optional useQt6 "-DUSE_QT6=true" 60 ++ lib.optional qt5ShadowsSupport "-DHAS_QT6_SUPPORT=true"; 61 62 passthru.updateScript = nix-update-script { }; 63 64 meta = { 65 description = "Qt${qtVersion} Wayland decoration plugin using libadwaita style"; 66 homepage = "https://github.com/FedoraQt/QAdwaitaDecorations"; 67 license = lib.licenses.lgpl21Plus; 68 maintainers = with lib.maintainers; [ samlukeyes123 ]; 69 platforms = lib.platforms.linux; 70 }; 71})