mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-02 17:09:09 +03:00
update ghc proposal (still not working)
svn path=/nixpkgs/trunk/; revision=10388
This commit is contained in:
parent
3066e0e8e2
commit
3f013f7bee
@ -1026,8 +1026,6 @@ rec {
|
|||||||
profiledCompiler = true;
|
profiledCompiler = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
/* doesn't work yet
|
|
||||||
|
|
||||||
# This new ghc stuff is under heavy development and might change !
|
# This new ghc stuff is under heavy development and might change !
|
||||||
|
|
||||||
# usage: see ghcPkgUtil.sh - use setup-new2 because of PATH_DELIMITER
|
# usage: see ghcPkgUtil.sh - use setup-new2 because of PATH_DELIMITER
|
||||||
@ -1052,20 +1050,20 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# this will change in the future
|
# this will change in the future
|
||||||
ghc68_extra_libs =
|
ghc68_extra_libs = ghc:
|
||||||
ghc : let
|
let deriv = name : goSrcDir : deps :
|
||||||
deriv = name : goSrcDir : deps :
|
let localDefs = builderDefs {
|
||||||
let bd = builderDefs {
|
inherit goSrcDir;
|
||||||
goSrcDir = "ghc-* /libraries";
|
src = ghc.extra_src;
|
||||||
src = ghc.extra_src;
|
} null;
|
||||||
} null; in
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit name;
|
inherit name;
|
||||||
builder = bd.writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(bd.textClosure [builderDefs.haskellBuilderDefs]);
|
(textClosure localDefs [ cabalBuild ]);
|
||||||
};
|
};
|
||||||
# using nvs to be able to use mtl-1.1.0.0 as name
|
# using nvs to be able to use mtl-1.1.0.0 as name
|
||||||
in lib.nvs "mtl-1.1.0.0" (deriv "mtl-1.1.0.0" "libraries/mtl" [ (__getAttr "base-3.0.1.0" ghc.core_libs) ]);
|
in lib.nvs "mtl-1.1.0.0" (deriv "mtl-1.1.0.0" "cd libraries/mtl" [ (__getAttr "base-3.0.1.0" ghc.core_libs) ]);
|
||||||
|
|
||||||
# the wrappers basically does one thing: It defines GHC_PACKAGE_PATH before calling ghc{i,-pkg}
|
# the wrappers basically does one thing: It defines GHC_PACKAGE_PATH before calling ghc{i,-pkg}
|
||||||
# So you can have different wrappers with different library combinations
|
# So you can have different wrappers with different library combinations
|
||||||
@ -1091,8 +1089,6 @@ rec {
|
|||||||
inherit ghc;
|
inherit ghc;
|
||||||
};
|
};
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
# ghc66boot = import ../development/compilers/ghc-6.6-boot {
|
# ghc66boot = import ../development/compilers/ghc-6.6-boot {
|
||||||
# inherit fetchurl stdenv perl readline;
|
# inherit fetchurl stdenv perl readline;
|
||||||
# m4 = gnum4;
|
# m4 = gnum4;
|
||||||
|
@ -199,6 +199,7 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
bzip2 -d <${s} > \$PWD/\$(basename ${s} .bz2)/\${NAME#*-}
|
bzip2 -d <${s} > \$PWD/\$(basename ${s} .bz2)/\${NAME#*-}
|
||||||
cd \$(basename ${s} .bz2)
|
cd \$(basename ${s} .bz2)
|
||||||
" else (abort "unknown archive type : ${s}"))+
|
" else (abort "unknown archive type : ${s}"))+
|
||||||
|
# goSrcDir is typically something like "cd mysubdir" .. but can be anything else
|
||||||
(if args ? goSrcDir then args.goSrcDir else "")
|
(if args ? goSrcDir then args.goSrcDir else "")
|
||||||
) ["minInit"];
|
) ["minInit"];
|
||||||
|
|
||||||
@ -283,7 +284,7 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
replaceScripts = l:(concatStringsSep "\n" (pairMap replaceInScript l));
|
replaceScripts = l:(concatStringsSep "\n" (pairMap replaceInScript l));
|
||||||
doReplaceScripts = FullDepEntry (replaceScripts (getAttr ["shellReplacements"] [] args)) [minInit];
|
doReplaceScripts = FullDepEntry (replaceScripts (getAttr ["shellReplacements"] [] args)) [minInit];
|
||||||
makeNest = x:(if x==defNest.text then x else "startNest\n" + x + "\nstopNest\n");
|
makeNest = x:(if x==defNest.text then x else "startNest\n" + x + "\nstopNest\n");
|
||||||
textClosure = textClosureMapOveridable makeNest;
|
textClosure = a : steps : textClosureMapOveridable makeNest a (["defNest"] ++ steps);
|
||||||
|
|
||||||
inherit noDepEntry FullDepEntry PackEntry;
|
inherit noDepEntry FullDepEntry PackEntry;
|
||||||
|
|
||||||
@ -355,7 +356,7 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
PACKAGE_DB=$out/nix-support/package.conf;
|
PACKAGE_DB=$out/nix-support/package.conf;
|
||||||
echo '[]' > \"$PACKAGE_DB\";
|
echo '[]' > \"$PACKAGE_DB\";
|
||||||
setupHookRegisteringPackageDatabase
|
setupHookRegisteringPackageDatabase
|
||||||
}" [defSetupHookRegisteringPackageDatabase];
|
}" ["defSetupHookRegisteringPackageDatabase" "defEnsureDir"];
|
||||||
|
|
||||||
# Cabal does only support --user ($HOME/.ghc/** ) and --global (/nix/store/*-ghc/lib/...)
|
# Cabal does only support --user ($HOME/.ghc/** ) and --global (/nix/store/*-ghc/lib/...)
|
||||||
# But we need kind of --custom=my-package-db
|
# But we need kind of --custom=my-package-db
|
||||||
@ -370,8 +371,7 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
# and ./setup register --gen-script to install to our local database
|
# and ./setup register --gen-script to install to our local database
|
||||||
# after replacing /usr/lib etc with our pure $out path
|
# after replacing /usr/lib etc with our pure $out path
|
||||||
cabalBuild = FullDepEntry
|
cabalBuild = FullDepEntry
|
||||||
(if (args ? subdir) then "cd ${args.subdir}" else "")+ "
|
" createEmptyPackageDatabaseAndSetupHook
|
||||||
createEmptyPackageDatabaseAndSetupHook
|
|
||||||
ghc --make setup.hs -o setup
|
ghc --make setup.hs -o setup
|
||||||
\$CABAL_SETUP configure
|
\$CABAL_SETUP configure
|
||||||
\$CABAL_SETUP build
|
\$CABAL_SETUP build
|
||||||
@ -380,6 +380,6 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
sed -e 's=/usr/local/lib=\$out=g' \\
|
sed -e 's=/usr/local/lib=\$out=g' \\
|
||||||
-i register.sh
|
-i register.sh
|
||||||
GHC_PACKAGE_PATH=\$PACKAGE_DB ./register.sh
|
GHC_PACKAGE_PATH=\$PACKAGE_DB ./register.sh
|
||||||
" [defCreateEmptyPackageDatabaseAndSetupHook defCabalSetupCmd];
|
" ["defCreateEmptyPackageDatabaseAndSetupHook" "defCabalSetupCmd"];
|
||||||
|
|
||||||
}) // args
|
}) // args
|
||||||
|
Loading…
Reference in New Issue
Block a user