diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index e06460994150..0ff6f3f041e2 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -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 = { diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix index a786babc79de..d2305aa37ba6 100644 --- a/pkgs/misc/emulators/wine/packages.nix +++ b/pkgs/misc/emulators/wine/packages.nix @@ -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}";