From 00f48620ac28b2fc0bc080f8836dce385aa13bf4 Mon Sep 17 00:00:00 2001 From: Aman Setia Date: Sat, 20 Jan 2024 19:18:43 +0000 Subject: [PATCH] winePackages.*: Enable wayland driver; wine-waylan ..d only add -wayland prefix if wine-wayland package is selected otherwise keep the original name --- pkgs/applications/emulators/wine/base.nix | 3 ++- pkgs/applications/emulators/wine/default.nix | 2 +- pkgs/applications/emulators/wine/packages.nix | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index 68814ca5ba58..08bf9a630682 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -3,6 +3,7 @@ bison, flex, fontforge, makeWrapper, pkg-config, nixosTests, supportFlags, + wineRelease, patches, moltenvk, buildScript ? null, configureFlags ? [], mainProgram ? "wine" @@ -46,7 +47,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { }) // rec { inherit version src; - pname = prevName + lib.optionalString supportFlags.waylandSupport "-wayland"; + pname = prevName + lib.optionalString (wineRelease == "wayland") "-wayland"; # Fixes "Compiler cannot create executables" building wineWow with mingwSupport strictDeps = true; diff --git a/pkgs/applications/emulators/wine/default.nix b/pkgs/applications/emulators/wine/default.nix index 06c2b7486cd2..ec05cef74414 100644 --- a/pkgs/applications/emulators/wine/default.nix +++ b/pkgs/applications/emulators/wine/default.nix @@ -36,7 +36,7 @@ sdlSupport ? false, usbSupport ? false, mingwSupport ? wineRelease != "stable", - waylandSupport ? wineRelease == "wayland", + waylandSupport ? stdenv.isLinux, x11Support ? stdenv.isLinux, embedInstallers ? false, # The Mono and Gecko MSI installers moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily diff --git a/pkgs/applications/emulators/wine/packages.nix b/pkgs/applications/emulators/wine/packages.nix index c6744dbdcbc7..b40f92dae81c 100644 --- a/pkgs/applications/emulators/wine/packages.nix +++ b/pkgs/applications/emulators/wine/packages.nix @@ -8,7 +8,7 @@ let in with src; { wine32 = pkgsi686Linux.callPackage ./base.nix { pname = "wine"; - inherit src version supportFlags patches moltenvk; + inherit src version supportFlags patches moltenvk wineRelease; pkgArches = [ pkgsi686Linux ]; geckos = [ gecko32 ]; mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc ]; @@ -17,7 +17,7 @@ in with src; { }; wine64 = callPackage ./base.nix { pname = "wine64"; - inherit src version supportFlags patches moltenvk; + inherit src version supportFlags patches moltenvk wineRelease; pkgArches = [ pkgs ]; mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ]; geckos = [ gecko64 ]; @@ -28,7 +28,7 @@ in with src; { }; wineWow = callPackage ./base.nix { pname = "wine-wow"; - inherit src version supportFlags patches moltenvk; + inherit src version supportFlags patches moltenvk wineRelease; stdenv = stdenv_32bit; pkgArches = [ pkgs pkgsi686Linux ]; geckos = [ gecko32 gecko64 ]; @@ -44,7 +44,7 @@ in with src; { }; wineWow64 = callPackage ./base.nix { pname = "wine-wow64"; - inherit src version patches moltenvk; + inherit src version patches moltenvk wineRelease; supportFlags = supportFlags // { mingwSupport = true; }; # Required because we request "--enable-archs=x86_64" pkgArches = [ pkgs ]; mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc mingwW64.buildPackages.gcc ];