diff options
author | rewine <luhongxu@deepin.org> | 2024-02-01 17:19:50 +0800 |
---|---|---|
committer | rewine <luhongxu@deepin.org> | 2024-02-01 17:19:50 +0800 |
commit | 52fbbf1d78e03210990c76106d00a3932cfbdac3 (patch) | |
tree | 0a722dcdc632530036ed03c3ae3dd38f501e7c63 /pkgs | |
parent | c290a5c39095cb6a5a298e11a2caa2c197bd7d39 (diff) |
qt6Packages.waylib: init at 0.1.1
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/waylib/default.nix | 74 | ||||
-rw-r--r-- | pkgs/top-level/qt6-packages.nix | 2 |
2 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/development/libraries/waylib/default.nix b/pkgs/development/libraries/waylib/default.nix new file mode 100644 index 0000000000000..9aa211ffd3e08 --- /dev/null +++ b/pkgs/development/libraries/waylib/default.nix @@ -0,0 +1,74 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, wayland-scanner +, wrapQtAppsHook +, qtbase +, qtquick3d +, qwlroots +, wayland +, wayland-protocols +, wlr-protocols +, pixman +, libdrm +, nixos-artwork +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "waylib"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "vioken"; + repo = "waylib"; + rev = finalAttrs.version; + hash = "sha256-3IdrChuXQyQGhJ/7kTqmkV0PyuSNP53Y0Po01Fc9Qi0="; + }; + + postPatch = '' + substituteInPlace examples/tinywl/OutputDelegate.qml \ + --replace "/usr/share/wallpapers/deepin/desktop.jpg" \ + "${nixos-artwork.wallpapers.simple-blue}/share/backgrounds/nixos/nix-wallpaper-simple-blue.png" + ''; + + nativeBuildInputs = [ + cmake + pkg-config + wayland-scanner + wrapQtAppsHook + ]; + + buildInputs = [ + qtbase + qtquick3d + wayland + wayland-protocols + wlr-protocols + pixman + libdrm + ]; + + propagatedBuildInputs = [ + qwlroots + ]; + + cmakeFlags = [ + (lib.cmakeBool "INSTALL_TINYWL" true) + ]; + + strictDeps = true; + + outputs = [ "out" "dev" "bin" ]; + + meta = { + description = "A wrapper for wlroots based on Qt"; + homepage = "https://github.com/vioken/waylib"; + license = with lib.licenses; [ gpl3Only lgpl3Only asl20 ]; + outputsToInstall = [ "out" ]; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ rewine ]; + }; +}) + diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index 665d2a653eee7..571a12ef50d63 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -88,6 +88,8 @@ makeScopeWithSplicing' { # is, to allow users to choose the right build if needed. sddm = callPackage ../applications/display-managers/sddm {}; + waylib = callPackage ../development/libraries/waylib { }; + } // lib.optionalAttrs pkgs.config.allowAliases { # Convert to a throw on 01-01-2023. # Warnings show up in various cli tool outputs, throws do not. |