1b51b70317
- fetchdarcs_2pre added - flapjax added - no longer used : annotatedDerivations - added bleeding edge repos with a tiny nix repository manager which dowloads and updates repostiries, then creates tar.gz dist files which are used by bleeding_edge_source (darcs tested only by now) - added experimental my_environment with example svn path=/nixpkgs/trunk/; revision=10974
34 lines
928 B
Nix
34 lines
928 B
Nix
args: with args; with lib;
|
|
|
|
stdenv.mkDerivation {
|
|
inherit suffix name ghc readline ncurses;
|
|
|
|
buildInputs = (libraries ++ [ghcPkgUtil]);
|
|
tags = map (x : sourceWithTagsDerivation ((lib.traceWhatis x).passthru.sourceWithTags))
|
|
(uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } );
|
|
|
|
phases="installPhase";
|
|
|
|
installPhase="
|
|
ensureDir \$out/bin
|
|
if test -n \"\$ghcPackagedLibs\"; then
|
|
g=:\$(echo \$ghc/lib/ghc-*/package.conf)
|
|
fi
|
|
|
|
for a in ghc ghci ghc-pkg; do
|
|
app=$(ls -al $ghc/bin/$a | sed -n 's%.*-> \\(.*\\)%\\1%p');
|
|
cat > \"\$out/bin/\$a$suffix\" << EOF
|
|
#!`type -f sh | gawk '{ print $3; }'`
|
|
export LIBRARY_PATH=\$readline/lib:\$ncurses/lib
|
|
GHC_PACKAGE_PATH=\${GHC_PACKAGE_PATH}\${g} \$ghc/bin/$app \"\\\$@\"
|
|
EOF
|
|
chmod +x \"\$out/bin/\$a$suffix\"
|
|
done
|
|
|
|
ensureDir \$out/src
|
|
for i in \$tags; do
|
|
ln -s \$i/src/* \$out/src
|
|
done
|
|
";
|
|
}
|