new version - annotated derivation proposal - used to install addtiontal /src

and /tag/ source code which to build up develop environments more easily ( TODO
make this optional for ghcWrapper )

svn path=/nixpkgs/trunk/; revision=10648
This commit is contained in:
Marc Weber
2008-02-12 16:24:02 +00:00
parent 2fbd55bb6b
commit 260c0c9c96
3 changed files with 166 additions and 40 deletions
@@ -1,9 +1,15 @@
args: with args;
args: with args; with lib; with annotatedDerivations;
stdenv.mkDerivation {
inherit suffix name ghc ;
buildInputs = libraries ++ [ghcPkgUtil];
buildInputs = map delAnnotation (libraries ++ [ghcPkgUtil]);
#tags = if (installSourceAndTags == true) then
# map sourceWithTagsDerivation ( uniqList { inputList =
# ( filterAnnotated ( concatLists (map uniqAnnotatedDeps libraries ) ) ) ; } )
# else [];
tags = map (x : sourceWithTagsDerivation (x.sourceWithTags))
(uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } );
phases="installPhase";
@@ -21,5 +27,12 @@ GHC_PACKAGE_PATH=\${GHC_PACKAGE_PATH}\${g} \$ghc/bin/$app \"\\\$@\"
EOF
chmod +x \"\$out/bin/\$a$suffix\"
done
ensureDir \$out/{src,tags}
for i in \$tags; do
for path in src tags; do
ln -s \$i/\$path/* \$out/\$path
done
done
";
}