From d7eadb19fb53123a46eee45b378ffb9ce5f7d954 Mon Sep 17 00:00:00 2001
From: Ambroz Bizjak <ambrop7@gmail.com>
Date: Sun, 17 Apr 2016 20:58:44 +0200
Subject: [PATCH] wine: Disable stripping to avoid breaking fakedlls.

---
 pkgs/misc/emulators/wine/base.nix | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix
index 2af403c4deaf..804eb0bb304c 100644
--- a/pkgs/misc/emulators/wine/base.nix
+++ b/pkgs/misc/emulators/wine/base.nix
@@ -41,6 +41,13 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
   # elements specified above.
   dontPatchELF = true;
 
+  # Disable stripping to avoid breaking placeholder DLLs/EXEs.
+  # Symptoms of broken placeholders are: when the wineprefix is created
+  # 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.
+  dontStrip = true;
+
   ## FIXME
   # Add capability to ignore known failing tests
   # and enable doCheck