From 862d224c69562f0ce0e0b0bd2e00ebcf8ed27ffd Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 21 Feb 2015 14:41:29 +0100 Subject: [PATCH] haskell-wxc: fix build Our 'wxGTK' attribute refers to wxwidgets 2.8 by default, but haskell-wxc needs version 2.9 or later. Resolves https://github.com/NixOS/nixpkgs/issues/6478. --- .../haskell-modules/configuration-common.nix | 8 ++++++++ pkgs/development/haskell-modules/hackage-packages.nix | 3 --- pkgs/development/haskell-modules/wxc-no-ldconfig.patch | 10 ++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/haskell-modules/wxc-no-ldconfig.patch diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index ad88c0cd5823..f57928a49fe2 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -532,6 +532,14 @@ self: super: { # https://github.com/NixOS/nixpkgs/issues/6343 c2hs = dontCheck super.c2hs; + # wxc needs help deciding which version of GTK to use. + wxc = overrideCabal (super.wxc.override { wxGTK = pkgs.wxGTK29; }) (drv: { + patches = [ ./wxc-no-ldconfig.patch ]; + doHaddock = false; + postInstall = "cp -v dist/build/libwxc.so.${drv.version} $out/lib/libwxc.so"; + }); + wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK29; }; + } // { # Not on Hackage. diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index fe3a8c617ae7..482ef44f374f 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -122369,7 +122369,6 @@ self: { homepage = "http://haskell.org/haskellwiki/WxHaskell"; description = "wxHaskell"; license = "unknown"; - hydraPlatforms = stdenv.lib.platforms.none; }) {}; "wxAsteroids" = callPackage @@ -122417,7 +122416,6 @@ self: { homepage = "http://haskell.org/haskellwiki/WxHaskell"; description = "wxHaskell C++ wrapper"; license = "unknown"; - hydraPlatforms = stdenv.lib.platforms.none; }) { inherit (pkgs.xlibs) libX11; inherit (pkgs) mesa; inherit (pkgs) wxGTK;}; @@ -122437,7 +122435,6 @@ self: { homepage = "http://haskell.org/haskellwiki/WxHaskell"; description = "wxHaskell core"; license = "unknown"; - hydraPlatforms = stdenv.lib.platforms.none; }) { inherit (pkgs.xlibs) libX11; inherit (pkgs) mesa; inherit (pkgs) wxGTK;}; diff --git a/pkgs/development/haskell-modules/wxc-no-ldconfig.patch b/pkgs/development/haskell-modules/wxc-no-ldconfig.patch new file mode 100644 index 000000000000..72a8648cab67 --- /dev/null +++ b/pkgs/development/haskell-modules/wxc-no-ldconfig.patch @@ -0,0 +1,10 @@ +Only in wxc-0.91.0.0: dist +diff -ubr wxc-0.91.0.0-orig/Setup.hs wxc-0.91.0.0/Setup.hs +--- wxc-0.91.0.0-orig/Setup.hs 2014-10-31 13:30:15.514809137 +0100 ++++ wxc-0.91.0.0/Setup.hs 2014-10-31 13:33:53.606372005 +0100 +@@ -507,5 +507,3 @@ + inst_lib_dir = libdir $ absoluteInstallDirs pkg_descr local_bld_info NoCopyDest + + installOrdinaryFile (verbosity flags) (bld_dir lib_name) (inst_lib_dir lib_name) +- ldconfig inst_lib_dir +-