wine: enable Vulkan on Darwin
This commit is contained in:
parent
424e97118f
commit
ff2aca9f4a
|
@ -5,6 +5,7 @@
|
||||||
supportFlags,
|
supportFlags,
|
||||||
patches,
|
patches,
|
||||||
vkd3dArches,
|
vkd3dArches,
|
||||||
|
moltenvk,
|
||||||
buildScript ? null, configureFlags ? []
|
buildScript ? null, configureFlags ? []
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
|
||||||
++ lib.optional pulseaudioSupport pkgs.libpulseaudio
|
++ lib.optional pulseaudioSupport pkgs.libpulseaudio
|
||||||
++ lib.optional (xineramaSupport && !waylandSupport) pkgs.xorg.libXinerama
|
++ lib.optional (xineramaSupport && !waylandSupport) pkgs.xorg.libXinerama
|
||||||
++ lib.optional udevSupport pkgs.udev
|
++ lib.optional udevSupport pkgs.udev
|
||||||
++ lib.optional vulkanSupport pkgs.vulkan-loader
|
++ lib.optional vulkanSupport (if stdenv.isDarwin then moltenvk else pkgs.vulkan-loader)
|
||||||
++ lib.optional sdlSupport pkgs.SDL2
|
++ lib.optional sdlSupport pkgs.SDL2
|
||||||
++ lib.optional usbSupport pkgs.libusb1
|
++ lib.optional usbSupport pkgs.libusb1
|
||||||
++ vkd3dArches
|
++ vkd3dArches
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# };
|
# };
|
||||||
# Make additional configurations on demand:
|
# Make additional configurations on demand:
|
||||||
# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
|
# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
|
||||||
{ lib, stdenv, callPackage,
|
{ lib, stdenv, callPackage, darwin,
|
||||||
wineRelease ? "stable",
|
wineRelease ? "stable",
|
||||||
wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
|
wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
|
||||||
gettextSupport ? false,
|
gettextSupport ? false,
|
||||||
|
@ -40,7 +40,8 @@
|
||||||
usbSupport ? false,
|
usbSupport ? false,
|
||||||
mingwSupport ? wineRelease != "stable",
|
mingwSupport ? wineRelease != "stable",
|
||||||
waylandSupport ? wineRelease == "wayland",
|
waylandSupport ? wineRelease == "wayland",
|
||||||
embedInstallers ? false # The Mono and Gecko MSI installers
|
embedInstallers ? false, # The Mono and Gecko MSI installers
|
||||||
|
moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let wine-build = build: release:
|
let wine-build = build: release:
|
||||||
|
@ -55,6 +56,7 @@ let wine-build = build: release:
|
||||||
tlsSupport openglSupport gstreamerSupport udevSupport vulkanSupport
|
tlsSupport openglSupport gstreamerSupport udevSupport vulkanSupport
|
||||||
sdlSupport usbSupport vkd3dSupport mingwSupport waylandSupport embedInstallers;
|
sdlSupport usbSupport vkd3dSupport mingwSupport waylandSupport embedInstallers;
|
||||||
};
|
};
|
||||||
|
inherit moltenvk;
|
||||||
});
|
});
|
||||||
|
|
||||||
in if wineRelease == "staging" then
|
in if wineRelease == "staging" then
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{ stdenv_32bit, lib, pkgs, pkgsi686Linux, pkgsCross, callPackage,
|
{ stdenv_32bit, lib, pkgs, pkgsi686Linux, pkgsCross, callPackage, moltenvk,
|
||||||
wineRelease ? "stable",
|
wineRelease ? "stable",
|
||||||
supportFlags
|
supportFlags
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
src = lib.getAttr wineRelease (callPackage ./sources.nix {});
|
src = lib.getAttr wineRelease (callPackage ./sources.nix {});
|
||||||
vkd3d = pkgs.callPackage ./vkd3d.nix {};
|
vkd3d = pkgs.callPackage ./vkd3d.nix { inherit moltenvk; };
|
||||||
vkd3d_i686 = pkgsi686Linux.callPackage ./vkd3d.nix {};
|
vkd3d_i686 = pkgsi686Linux.callPackage ./vkd3d.nix { inherit moltenvk; };
|
||||||
in with src; {
|
in with src; {
|
||||||
wine32 = pkgsi686Linux.callPackage ./base.nix {
|
wine32 = pkgsi686Linux.callPackage ./base.nix {
|
||||||
name = "wine-${version}";
|
name = "wine-${version}";
|
||||||
inherit src version supportFlags patches;
|
inherit src version supportFlags patches moltenvk;
|
||||||
pkgArches = [ pkgsi686Linux ];
|
pkgArches = [ pkgsi686Linux ];
|
||||||
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d_i686 ];
|
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d_i686 ];
|
||||||
geckos = [ gecko32 ];
|
geckos = [ gecko32 ];
|
||||||
|
@ -20,7 +20,7 @@ in with src; {
|
||||||
};
|
};
|
||||||
wine64 = callPackage ./base.nix {
|
wine64 = callPackage ./base.nix {
|
||||||
name = "wine64-${version}";
|
name = "wine64-${version}";
|
||||||
inherit src version supportFlags patches;
|
inherit src version supportFlags patches moltenvk;
|
||||||
pkgArches = [ pkgs ];
|
pkgArches = [ pkgs ];
|
||||||
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d ];
|
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d ];
|
||||||
mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ];
|
mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ];
|
||||||
|
@ -31,7 +31,7 @@ in with src; {
|
||||||
};
|
};
|
||||||
wineWow = callPackage ./base.nix {
|
wineWow = callPackage ./base.nix {
|
||||||
name = "wine-wow-${version}";
|
name = "wine-wow-${version}";
|
||||||
inherit src version supportFlags patches;
|
inherit src version supportFlags patches moltenvk;
|
||||||
stdenv = stdenv_32bit;
|
stdenv = stdenv_32bit;
|
||||||
pkgArches = [ pkgs pkgsi686Linux ];
|
pkgArches = [ pkgs pkgsi686Linux ];
|
||||||
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d vkd3d_i686 ];
|
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d vkd3d_i686 ];
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{ lib, stdenv, fetchurl, vulkan-headers, spirv-headers, vulkan-loader }:
|
{ lib, stdenv, fetchurl, moltenvk, vulkan-headers, spirv-headers, vulkan-loader }:
|
||||||
|
|
||||||
#TODO: MoltenVK
|
|
||||||
#TODO: unstable
|
#TODO: unstable
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -12,7 +11,8 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0szr1lw3xbgi9qjm13d1q4gyzzwv8i5wfxiwjg6dmwphrc7h6jxh";
|
sha256 = "0szr1lw3xbgi9qjm13d1q4gyzzwv8i5wfxiwjg6dmwphrc7h6jxh";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ vulkan-headers spirv-headers vulkan-loader ];
|
buildInputs = [ vulkan-headers spirv-headers ]
|
||||||
|
++ [ (if stdenv.isDarwin then moltenvk else vulkan-loader) ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "A 3d library build on top on Vulkan with a similar api to DirectX 12";
|
description = "A 3d library build on top on Vulkan with a similar api to DirectX 12";
|
||||||
homepage = "https://source.winehq.org/git/vkd3d.git";
|
homepage = "https://source.winehq.org/git/vkd3d.git";
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.marius851000 ];
|
maintainers = [ maintainers.marius851000 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ rec {
|
||||||
fontconfigSupport = stdenv.isLinux;
|
fontconfigSupport = stdenv.isLinux;
|
||||||
alsaSupport = stdenv.isLinux;
|
alsaSupport = stdenv.isLinux;
|
||||||
openglSupport = true;
|
openglSupport = true;
|
||||||
vulkanSupport = stdenv.isLinux;
|
vulkanSupport = true;
|
||||||
tlsSupport = true;
|
tlsSupport = true;
|
||||||
cupsSupport = true;
|
cupsSupport = true;
|
||||||
dbusSupport = stdenv.isLinux;
|
dbusSupport = stdenv.isLinux;
|
||||||
|
@ -40,7 +40,7 @@ rec {
|
||||||
gphoto2Support = true;
|
gphoto2Support = true;
|
||||||
krb5Support = true;
|
krb5Support = true;
|
||||||
ldapSupport = true;
|
ldapSupport = true;
|
||||||
vkd3dSupport = stdenv.isLinux;
|
vkd3dSupport = true;
|
||||||
embedInstallers = true;
|
embedInstallers = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue