wine: Enable on macOS

This commit is contained in:
Moritz Angermann 2018-05-17 15:21:23 +08:00 committed by John Ericson
parent d33322d449
commit 0828bc5b1f
2 changed files with 11 additions and 7 deletions

View File

@ -6,8 +6,6 @@
buildScript ? null, configureFlags ? ""
}:
assert stdenv.cc.cc.isGNU or false;
with import ./util.nix { inherit lib; };
stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
@ -54,9 +52,14 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ]
++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ]
++ lib.optionals openglSupport [ pkgs.libGLU_combined pkgs.mesa_noglu.osmesa pkgs.libdrm ]
++ (with pkgs.xorg; [
libX11 libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
])));
++ lib.optionals stdenv.isDarwin (with pkgs.buildPackages.darwin.apple_sdk.frameworks; [
CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration Security
ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenAL OpenCL Cocoa Carbon
])
++ lib.optionals stdenv.isLinux (with pkgs.xorg; [
libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
])
++ [ pkgs.xorg.libX11 ]));
# Wine locates a lot of libraries dynamically through dlopen(). Add
# them to the RPATH so that the user doesn't have to set them in
@ -105,7 +108,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
# https://bugs.winehq.org/show_bug.cgi?id=43530
# https://github.com/NixOS/nixpkgs/issues/31989
hardeningDisable = [ "bindnow" ];
hardeningDisable = [ "bindnow" ]
++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify";
passthru = { inherit pkgArches; };
meta = {

View File

@ -20,7 +20,7 @@ in with src; {
geckos = [ gecko64 ];
monos = [ mono ];
configureFlags = [ "--enable-win64" ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
wineWow = callPackage ./base.nix {
name = "wine-wow-${version}";