diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-07-19 08:06:14 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-07-19 08:09:29 +0200 |
commit | 9a80550cc461fe364adae86478bc51dce564e596 (patch) | |
tree | a8b468f2ce6bdee6b345c3a7b7bc412b1efd583f /pkgs/development/haskell-modules | |
parent | 7acbdcd02b52fd99a826b16c832888dbff64088f (diff) | |
parent | 4efbe9620569c977cab38609de34e00d81c819fd (diff) | |
download | nixlib-9a80550cc461fe364adae86478bc51dce564e596.tar nixlib-9a80550cc461fe364adae86478bc51dce564e596.tar.gz nixlib-9a80550cc461fe364adae86478bc51dce564e596.tar.bz2 nixlib-9a80550cc461fe364adae86478bc51dce564e596.tar.lz nixlib-9a80550cc461fe364adae86478bc51dce564e596.tar.xz nixlib-9a80550cc461fe364adae86478bc51dce564e596.tar.zst nixlib-9a80550cc461fe364adae86478bc51dce564e596.zip |
Merge branch 'staging', discussion #8844
Diffstat (limited to 'pkgs/development/haskell-modules')
3 files changed, 30 insertions, 61 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index fd3e70eaed86..a59219786c98 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -186,21 +186,39 @@ self: super: { # cabal2nix likes to generate dependencies on hinotify when hfsevents is really required # on darwin: https://github.com/NixOS/cabal2nix/issues/146 - hinotify = if pkgs.stdenv.isDarwin then super.hfsevents else super.hinotify; + hinotify = if pkgs.stdenv.isDarwin then self.hfsevents else super.hinotify; + + # hfsevents needs CoreServices in scope + hfsevents = if pkgs.stdenv.isDarwin + then addBuildTool super.hfsevents pkgs.darwin.apple_sdk.frameworks.CoreServices + else super.hfsevents; # FSEvents API is very buggy and tests are unreliable. See # http://openradar.appspot.com/10207999 and similar issues fsnotify = if pkgs.stdenv.isDarwin then dontCheck super.fsnotify else super.fsnotify; + # the system-fileio tests use canonicalizePath, which fails in the sandbox + system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio; + # Prevents needing to add security_tool as a build tool to all of x509-system's # dependencies. - # TODO: use pkgs.darwin.security_tool once we can build it - x509-system = let security_tool = "/usr"; - in overrideCabal super.x509-system (drv: { - patchPhase = (drv.patchPhase or "") + pkgs.stdenv.lib.optionalString pkgs.stdenv.isDarwin '' - substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security - ''; - }); + x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc + then let inherit (pkgs.darwin) security_tool; + in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: { + patchPhase = (drv.patchPhase or "") + '' + substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security + ''; + }) + else super.x509-system; + + double-conversion = if !pkgs.stdenv.isDarwin + then super.double-conversion + else overrideCabal super.double-conversion (drv: + { + patchPhase = '' + substituteInPlace double-conversion.cabal --replace stdc++ c++ + ''; + }); # Does not compile: "fatal error: ieee-flpt.h: No such file or directory" base_4_8_0_0 = markBroken super.base_4_8_0_0; @@ -862,6 +880,10 @@ self: super: { # https://github.com/yesodweb/serversession/issues/1 serversession = dontCheck super.serversession; + yesod-bin = if pkgs.stdenv.isDarwin + then addBuildDepend super.yesod-bin pkgs.darwin.apple_sdk.frameworks.Cocoa + else super.yesod-bin; + # https://github.com/commercialhaskell/stack/issues/408 # https://github.com/commercialhaskell/stack/issues/409 stack = overrideCabal super.stack (drv: { preCheck = "export HOME=$TMPDIR"; doCheck = false; }); diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index d7371c5b97b0..de0fdacb3f9d 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -44,10 +44,6 @@ self: super: { # Don't use jailbreak built with Cabal 1.22.x because of https://github.com/peti/jailbreak-cabal/issues/9. jailbreak-cabal = pkgs.haskell.packages.ghc784.jailbreak-cabal; - # GHC 7.10.x's Haddock binary cannot generate hoogle files. - # https://ghc.haskell.org/trac/ghc/ticket/9921 - mkDerivation = drv: super.mkDerivation (drv // { doHoogle = false; }); - idris = let idris' = overrideCabal super.idris (drv: { # "idris" binary cannot find Idris library otherwise while building. @@ -231,9 +227,6 @@ self: super: { seqid-streams_0_1_0 = markBroken super.seqid-streams_0_1_0; vector_0_10_9_3 = markBroken super.vector_0_10_9_3; - # https://github.com/purefn/hipbot/issues/1 - hipbot = dontDistribute super.hipbot; - # https://github.com/HugoDaniel/RFC3339/issues/14 timerep = dontCheck super.timerep; diff --git a/pkgs/development/haskell-modules/gcc-clang-wrapper.sh b/pkgs/development/haskell-modules/gcc-clang-wrapper.sh deleted file mode 100755 index d081be231a1c..000000000000 --- a/pkgs/development/haskell-modules/gcc-clang-wrapper.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -inPreprocessorMode () { - hasE=0 - hasU=0 - hasT=0 - for arg in "$@" - do - if [ 'x-E' = "x$arg" ]; then hasE=1; fi - if [ 'x-undef' = "x$arg" ]; then hasU=1; fi - if [ 'x-traditional' = "x$arg" ]; then hasT=1; fi - done - [ "$hasE$hasU$hasT" = '111' ] -} - -extraClangArgs="-Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs" - -adjustPreprocessorLanguage () { - newArgs='' - while [ $# -gt 0 ] - do - newArgs="$newArgs $1" - if [ "$1" = '-x' ] - then - shift - if [ $# -gt 0 ] - then - if [ "$1" = 'c' ] - then - newArgs="$newArgs assembler-with-cpp" - else - newArgs="$newArgs $1" - fi - fi - fi - shift - done - echo $newArgs -} - -if inPreprocessorMode "$@" -then - exec clang $extraClangArgs `adjustPreprocessorLanguage "$@"` -else - exec clang $extraClangArgs "${@/-nodefaultlibs/}" -fi |