Merge remote-tracking branch 'eelco/master' into stdenv-updates

Conflicts:
	pkgs/development/compilers/gcc/4.7/default.nix

Trivial solution.
This commit is contained in:
Lluís Batlle i Rossell
2012-12-28 23:28:16 +01:00
135 changed files with 1945 additions and 727 deletions

View File

@@ -1,47 +1,45 @@
{builderDefsPackage
, gmp, mpfr, libffi
, ...} @ x:
builderDefsPackage (a :
let
propagatedBuildInputs = with a; [
{stdenv, fetchurl
, gmp, mpfr, libffi
, noUnicode ? false,
}:
let
s = # Generated upstream information
rec {
baseName="ecl";
version="12.12.1";
name="${baseName}-${version}";
hash="15y2dgj95li6mxiz9pnllj9x88km0z8gfh46kysfllkp2pl7rrsl";
url="mirror://sourceforge/project/ecls/ecls/12.12/ecl-12.12.1.tgz";
sha256="15y2dgj95li6mxiz9pnllj9x88km0z8gfh46kysfllkp2pl7rrsl";
};
buildInputs = [
libffi
];
propagatedBuildInputs = [
gmp mpfr
];
buildInputs = [ gmp libffi mpfr ];
in
rec {
mainVersion = "12.7";
revision = "1";
version = "${mainVersion}.${revision}";
name = "ecl-${version}";
src = a.fetchurl {
url = "mirror://sourceforge/project/ecls/ecls/${mainVersion}/${name}.tar.gz";
sha256 = "0k8ww142g3bybvvnlijqsbidl8clbs1pb4ympk2ds07z5swvy2ap";
};
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs propagatedBuildInputs;
src = fetchurl {
inherit (s) url sha256;
};
configureFlags = [
"--enable-threads"
]
++
(a.lib.optional (! (a.lib.attrByPath ["noUnicode"] false a))
(stdenv.lib.optional (! noUnicode)
"--enable-unicode")
;
/* doConfigure should be removed if not needed */
phaseNames = ["doConfigure" "doMakeInstall" "fixEclConfig"];
fixEclConfig = a.fullDepEntry ''
postInstall = ''
sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
'' ["minInit"];
'';
meta = {
description = "A Lisp implementation aiming to be small and fast";
maintainers = [
a.lib.maintainers.raskin
];
platforms = with a.lib.platforms;
linux;
inherit (s) version;
description = "Lisp implementation aiming to be small, fast and easy to embed";
license = stdenv.lib.licenses.mit ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
};
}) x
}

View File

@@ -0,0 +1,4 @@
url http://sourceforge.net/projects/ecls/files/ecls/
SF_version_dir
version_link '[.]tgz/download$'
SF_redirect

View File

@@ -12,9 +12,9 @@ let
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
method = "fetchgit";
rev = "14f62c94f952104d27d920ea662c8a61b370abe8";
rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
url = "git://gitorious.org/eql/eql";
hash = "1ca31f0ad8cbc45d2fdf7b1e4059b1e612523c043f4688d7147c7e16fa5ba9ca";
hash = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8";
version = rev;
name = "eql-git-${version}";
};
@@ -30,7 +30,7 @@ rec {
inherit (sourceInfo) name version;
inherit buildInputs;
phaseNames = ["setVars" "fixPaths" "firstMetaTypeId" "buildEQLLib" "doQMake" "doMake" "doDeploy"];
phaseNames = ["setVars" "fixPaths" "doQMake" "doMake" "doDeploy"];
setVars = a.fullDepEntry (''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
@@ -40,27 +40,13 @@ rec {
sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
'') ["minInit" "doUnpack"];
firstMetaTypeId = a.fullDepEntry (''
cd src
qmake first_metatype_id.pro
make
TMP=.
TMPDIR=.
XKB_BINDIR="${xkbcomp}/bin" Xvfb -once -reset -terminate :2 -xkbdir ${xkeyboard_config}/etc/X11/xkb &
sleep 10;
DISPLAY=:2 ./first_metatype_id
'') ["doUnpack" "addInputs"];
buildEQLLib = a.fullDepEntry (''
ecl -shell make-eql-lib.lisp
qmake eql_lib.pro
make
'') ["doUnpack" "addInputs" "firstMetaTypeId"];
doQMake = a.fullDepEntry (''
cd src
qmake eql_exe.pro
make
'') ["addInputs" "firstMetaTypeId" "buildEQLLib"];
cd ..
cd src
'') ["addInputs" "doUnpack" "buildEQLLib"];
doDeploy = a.fullDepEntry (''
cd ..
@@ -70,7 +56,16 @@ rec {
ln -s $out/lib/eql/build-dir/src/*.h $out/include
ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
'') ["minInit" "defEnsureDir"];
'') ["minInit"];
buildEQLLib = a.fullDepEntry (''
cd src
ecl -shell make-eql-lib.lisp
qmake eql_lib.pro
make
cd ..
'') ["doUnpack" "addInputs"];
meta = {
description = "Embedded Qt Lisp (ECL+Qt)";

View File

@@ -89,9 +89,11 @@ let version = "4.7.2";
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
gccMode = stdenv.lib.attrByPath [ "gcc" "mode" ] null cross;
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
crossMingw = (cross != null && cross.libc == "msvcrt");
crossConfigureFlags =
@@ -99,6 +101,7 @@ let version = "4.7.2";
withArch +
withCpu +
withAbi +
withMode +
(if crossMingw && crossStageStatic then
" --with-headers=${libcCross}/include" +
" --with-gcc" +

View File

@@ -79,7 +79,12 @@ stdenv.mkDerivation rec {
echo -n "Generating wrappers "
for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "-B$linkedTopDir"
# The NIX env-vars are picked up by our patched version of ghc-paths.
makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
--add-flags "-B$linkedTopDir" \
--set "NIX_GHC" "$out/bin/ghc" \
--set "NIX_GHCPKG" "$out/bin/ghc-pkg" \
--set "NIX_GHC_LIBDIR" "$linkedTopDir"
echo -n .
done