diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/base.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/base.nix | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/base.nix b/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/base.nix index 025158b07173..0be36daac9f9 100644 --- a/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/base.nix +++ b/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/base.nix @@ -1,7 +1,8 @@ { stdenv, lib, pkgArches, callPackage, - name, version, src, monos, geckos, platforms, + name, version, src, mingwGccs, monos, geckos, platforms, pkgconfig, fontforge, makeWrapper, flex, bison, supportFlags, + patches, buildScript ? null, configureFlags ? [] }: @@ -9,15 +10,21 @@ with import ./util.nix { inherit lib; }; let vkd3d = callPackage ./vkd3d.nix {}; + patches' = patches; in stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { builder = buildScript; }) // rec { inherit name src configureFlags; + # Fixes "Compiler cannot create executables" building wineWow with mingwSupport + # FIXME Breaks wineStaging builds + strictDeps = supportFlags.mingwSupport; + nativeBuildInputs = [ pkgconfig fontforge makeWrapper flex bison - ]; + ] + ++ lib.optionals supportFlags.mingwSupport mingwGccs; buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs: [ pkgs.freetype ] @@ -68,10 +75,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { ]) ++ [ pkgs.xorg.libX11 pkgs.perl ])); - patches = [ - # Also look for root certificates at $NIX_SSL_CERT_FILE - ./cert-path.patch - ]; + patches = [ ] ++ patches'; # 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 @@ -92,6 +96,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { # drive_c/windows/system32 will only contain a few files instead of # hundreds, there will be an error about winemenubuilder and MountMgr # on startup of Wine, and the Drives tab in winecfg will show an error. + # TODO: binutils 2.34 contains a fix for this bug, re-enable stripping once available. dontStrip = true; ## FIXME @@ -136,7 +141,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { # https://bugs.winehq.org/show_bug.cgi?id=43530 # https://github.com/NixOS/nixpkgs/issues/31989 hardeningDisable = [ "bindnow" ] - ++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify"; + ++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify" + ++ lib.optional (supportFlags.mingwSupport) "format"; passthru = { inherit pkgArches; }; meta = { |