Created
May 6, 2010 20:22
-
-
Save 573/392661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To run the `ghc-pkg` command with the correct environment, example usage `ghc-pkg list`. | |
ghc-pkg() | |
{( | |
setopt rc_expand_param glob_subst | |
path=( | |
# Using gcc4 is experimental, comment first if problems occur | |
$(/usr/bin/cygpath -u "${__APPS}/mingw-gcc4/libexec/gcc/mingw32/4.4.0") | |
$(/usr/bin/cygpath -u "${__APPS}/mingw-gcc4/bin") | |
"$HOME/Anwendungsdaten/cabal/bin" | |
$(/usr/bin/cygpath -u $(/usr/bin/cygpath -m $(/usr/bin/cygpath -sm "${PROGRAMFILES}/haskell platform/2009.2.0.2/bin"))) | |
$(/usr/bin/cygpath -u $(/usr/bin/cygpath -m $(/usr/bin/cygpath -sm "${PROGRAMFILES}/haskell platform/2009.2.0.2/extralibs/bin"))) | |
"$HOME/bin/$(/usr/bin/uname -m)-$(/usr/bin/uname -o)" | |
# For gtk2hs, must be the only gtk on path | |
$(/usr/bin/cygpath -u "${__APPS}/gtk/bin") | |
"$PATH" | |
) | |
declare GHC_PACKAGE_PATH=$(/bin/cygpath -w $HOME/Anwendungsdaten/ghc/i386-mingw32-$(/usr/bin/env ghc --numeric-version | /usr/bin/sed 's/$//')/package.conf)\; | |
builtin noglob /usr/bin/env -i /usr/bin/env HOME=$(/usr/bin/cygpath -m $HOME) APPDATA=$(/usr/bin/cygpath -w $HOME/Anwendungsdaten) USERPROFILE=$(/usr/bin/cygpath -w $HOME) COMSPEC=${COMSPEC} HISTSIZE=${HISTSIZE} SAVEHIST=${SAVEHIST} TEMP=${TEMP} TMP=${TMP} PAGER=${PAGER} TERM=${TERM} PATH=${PATH} ghc-pkg --package-conf ${GHC_PACKAGE_PATH/\;/} $* | |
)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment