diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/createGhcWrapper/default.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/createGhcWrapper/default.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/development/compilers/ghc/createGhcWrapper/default.nix b/pkgs/development/compilers/ghc/createGhcWrapper/default.nix index 5eeb4d43190..4d6094f5d72 100644 --- a/pkgs/development/compilers/ghc/createGhcWrapper/default.nix +++ b/pkgs/development/compilers/ghc/createGhcWrapper/default.nix @@ -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 "; } |