about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenno Fünfstück <benno.fuenfstueck@gmail.com>2015-08-26 16:20:21 +0200
committerBenno Fünfstück <benno.fuenfstueck@gmail.com>2015-08-26 17:36:25 +0200
commit271926d00dbac878bd2105c1d6e191b3298f138e (patch)
tree9253fc50694b744ec15b3cfd0a247220a8c3f982
parenta5e28d531973528cbb80e5b49267f2fa8b2ec75b (diff)
haskell: fix build of SDL-* libraries
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index ba5f2a68f120c..10e665b70a2ea 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -973,4 +973,23 @@ self: super: {
   hackage-security = dontDistribute super.hackage-security;
   hackage-security-HTTP = dontDistribute super.hackage-security-HTTP;
 
+  # The cabal files for these libraries do not list the required system dependencies.
+  SDL-image = overrideCabal super.SDL-image (drv: {
+    librarySystemDepends = [ pkgs.SDL pkgs.SDL_image ] ++ drv.librarySystemDepends or [];
+  });
+  SDL-ttf = overrideCabal super.SDL-ttf (drv: {
+    librarySystemDepends = [ pkgs.SDL pkgs.SDL_ttf ];
+  });
+  SDL-mixer = overrideCabal super.SDL-mixer (drv: {
+    librarySystemDepends = [ pkgs.SDL pkgs.SDL_mixer ];
+  });
+  SDL-gfx = overrideCabal super.SDL-gfx (drv: {
+    librarySystemDepends = [ pkgs.SDL pkgs.SDL_gfx ];
+  });
+  SDL-mpeg = overrideCabal super.SDL-mpeg (drv: {
+    configureFlags = (drv.configureFlags or []) ++ [
+      "--extra-lib-dirs=${pkgs.smpeg}/lib"
+      "--extra-include-dirs=${pkgs.smpeg}/include/smpeg"
+    ];
+  });
 }