diff options
-rw-r--r-- | nixos/tests/wine.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/emulators/wine/default.nix | 11 | ||||
-rw-r--r-- | pkgs/misc/emulators/wine/sources.nix | 15 | ||||
-rw-r--r-- | pkgs/misc/emulators/wine/wayland.nix | 21 | ||||
-rw-r--r-- | pkgs/top-level/aliases.nix | 1 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/wine-packages.nix | 3 |
7 files changed, 55 insertions, 4 deletions
diff --git a/nixos/tests/wine.nix b/nixos/tests/wine.nix index c46c7d338b2..18ad759b551 100644 --- a/nixos/tests/wine.nix +++ b/nixos/tests/wine.nix @@ -35,7 +35,7 @@ let }; }; - variants = [ "base" "full" "minimal" "staging" "unstable" ]; + variants = [ "base" "full" "minimal" "staging" "unstable" "wayland" ]; in listToAttrs (map (makeWineTest "winePackages" [ hello32 ]) variants ++ map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants) diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix index 023d013740d..5884d36dc8c 100644 --- a/pkgs/misc/emulators/wine/default.nix +++ b/pkgs/misc/emulators/wine/default.nix @@ -1,7 +1,7 @@ ## Configuration: # Control you default wine config in nixpkgs-config: # wine = { -# release = "stable"; # "stable", "unstable", "staging" +# release = "stable"; # "stable", "unstable", "staging", "wayland" # build = "wineWow"; # "wine32", "wine64", "wineWow" # }; # Make additional configurations on demand: @@ -67,4 +67,11 @@ in if wineRelease == "staging" then wineUnstable = wine-build wineBuild "unstable"; } else - wine-build wineBuild wineRelease + (if wineRelease == "wayland" then + callPackage ./wayland.nix { + wineWayland = wine-build wineBuild "wayland"; + inherit vulkanSupport vkd3dSupport; + } + else + wine-build wineBuild wineRelease + ) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 41b019461a8..93d617a7896 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -10,6 +10,8 @@ let fetchurl = args@{url, sha256, ...}: pkgs.fetchurl { inherit url sha256; } // args; fetchFromGitHub = args@{owner, repo, rev, sha256, ...}: pkgs.fetchFromGitHub { inherit owner repo rev sha256; } // args; + fetchFromGitLab = args@{domain, owner, repo, rev, sha256, ...}: + pkgs.fetchFromGitLab { inherit domain owner repo rev sha256; } // args; in rec { stable = fetchurl rec { @@ -73,6 +75,19 @@ in rec { disabledPatchsets = [ ]; }; + wayland = fetchFromGitLab rec { + version = "7.0-rc2"; + sha256 = "sha256-FU9L8cyIIfFQ+8f/AUg7IT+RxTpyNTuSfL0zBnur0SA="; + domain = "gitlab.collabora.com"; + owner = "alf"; + repo = "wine"; + rev = "95f0154c96a4b7d81e783ee5ba2f5d9cc7cda351"; + + inherit (unstable) gecko32 gecko64; + + inherit (unstable) mono; + }; + winetricks = fetchFromGitHub rec { # https://github.com/Winetricks/winetricks/releases version = "20210825"; diff --git a/pkgs/misc/emulators/wine/wayland.nix b/pkgs/misc/emulators/wine/wayland.nix new file mode 100644 index 00000000000..4dd4c9bd3b1 --- /dev/null +++ b/pkgs/misc/emulators/wine/wayland.nix @@ -0,0 +1,21 @@ +{ lib, callPackage, wineWayland, vulkanSupport, vkd3dSupport }: + +with callPackage ./util.nix {}; + +(lib.overrideDerivation wineWayland (self: { + buildInputs = (toBuildInputs wineWayland.pkgArches (pkgs: [ pkgs.wayland pkgs.libxkbcommon pkgs.wayland-protocols pkgs.wayland.dev pkgs.libxkbcommon.dev ])) ++ (lib.subtractLists (toBuildInputs wineWayland.pkgArches (pkgs: [ pkgs.xorg.libX11 pkgs.xorg.libXi pkgs.xorg.libXcursor pkgs.xorg.libXrandr pkgs.xorg.libXrender pkgs.xorg.libXxf86vm pkgs.xorg.libXcomposite pkgs.xorg.libXext ])) self.buildInputs); + + name = "${self.name}-wayland"; + + configureFlags = self.configureFlags + ++ [ "--with-wayland" ] + ++ lib.optionals vulkanSupport [ "--with-vulkan" ] + ++ lib.optionals vkd3dSupport [ "--with-vkd3d" ]; + +})) // { + meta = wineWayland.meta // { + description = "An Open Source implementation of the Windows API on top of OpenGL and Unix (with experimental Wayland support)"; + platforms = (lib.remove "x86_64-darwin" wineWayland.meta.platforms); + maintainers = wineWayland.meta.maintainers ++ [ lib.maintainers.jmc-figueira ]; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a3edb07ffbb..44da808136f 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1036,6 +1036,7 @@ mapAliases ({ weechat-matrix-bridge = weechatScripts.weechat-matrix-bridge; # added 2018-09-06 wicd = throw "wicd has been removed as it is abandoned."; # added 2021-09-11 wineStaging = wine-staging; # added 2018-01-08 + wineWayland = wine-wayland; winusb = woeusb; # added 2017-12-22 winswitch = throw "winswitch has been removed from nixpkgs."; # added 2019-12-10 wireshark-gtk = throw "wireshark-gtk is not supported anymore. Use wireshark-qt or wireshark-cli instead."; # added 2019-11-18 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 568322e003f..25224bc0327 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33652,7 +33652,7 @@ with pkgs; inherit wineBuild; inherit (callPackage ./wine-packages.nix {}) - minimal base full stable stableFull unstable unstableFull staging stagingFull fonts; + minimal base full stable stableFull unstable unstableFull staging stagingFull wayland waylandFull fonts; }); winePackages = recurseIntoAttrs (winePackagesFor (config.wine.build or "wine32")); @@ -33666,6 +33666,10 @@ with pkgs; wineRelease = "staging"; }); + wine-wayland = lowPrio (winePackages.full.override { + wineRelease = "wayland"; + }); + winetricks = callPackage ../misc/emulators/wine/winetricks.nix { inherit (gnome) zenity; }; diff --git a/pkgs/top-level/wine-packages.nix b/pkgs/top-level/wine-packages.nix index fff2d73110c..5dbfd2d5413 100644 --- a/pkgs/top-level/wine-packages.nix +++ b/pkgs/top-level/wine-packages.nix @@ -58,4 +58,7 @@ rec { staging = base.override { wineRelease = "staging"; }; stagingFull = full.override { wineRelease = "staging"; }; + + wayland = base.override { wineRelease = "wayland"; }; + waylandFull = full.override { wineRelease = "wayland"; }; } |