Updating from trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18878
This commit is contained in:
127
pkgs/development/compilers/gcc-apple64/builder.sh
Normal file
127
pkgs/development/compilers/gcc-apple64/builder.sh
Normal file
@@ -0,0 +1,127 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
|
||||
# Thing.
|
||||
export CPP="gcc -E"
|
||||
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers being
|
||||
# generated to make sure that they use our glibc.
|
||||
if test -e $NIX_GCC/nix-support/orig-glibc; then
|
||||
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
|
||||
|
||||
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
|
||||
# source in $NIX_GCC/nix-support/add-flags, since that would
|
||||
# cause *this* GCC to be linked against the *previous* GCC.
|
||||
# Need some more modularity there.
|
||||
extraCFlags="-B$glibc/lib -isystem $glibc/include"
|
||||
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
|
||||
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
|
||||
|
||||
# Oh, what a hack. I should be shot for this. In stage 1, we
|
||||
# should link against the previous GCC, but not afterwards.
|
||||
# Otherwise we retain a dependency. However, ld-wrapper,
|
||||
# which adds the linker flags for the previous GCC, is also
|
||||
# used in stage 2/3. We can prevent it from adding them by
|
||||
# NIX_GLIBC_FLAGS_SET, but then gcc-wrapper will also not add
|
||||
# them, thereby causing stage 1 to fail. So we use a trick to
|
||||
# only set the flags in gcc-wrapper.
|
||||
hook=$(pwd)/ld-wrapper-hook
|
||||
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
|
||||
export NIX_LD_WRAPPER_START_HOOK=$hook
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$glibc/include
|
||||
fi
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
export NIX_EXTRA_LDFLAGS=$extraLDFlags
|
||||
export CFLAGS=$extraCFlags
|
||||
export CXXFLAGS=$extraCFlags
|
||||
export LDFLAGS=$extraLDFlags
|
||||
fi
|
||||
|
||||
|
||||
preConfigure() {
|
||||
|
||||
# Determine the frontends to build.
|
||||
langs="c"
|
||||
if test -n "$langCC"; then
|
||||
langs="$langs,c++"
|
||||
fi
|
||||
if test -n "$langF77"; then
|
||||
langs="$langs,f95"
|
||||
fi
|
||||
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
|
||||
configureScript=../$sourceRoot/configure
|
||||
configureFlags="--enable-languages=$langs --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib --with-gxx-include-dir=${STDCXX_INCDIR} --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10 --target=x86_64-apple-darwin10"
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
}
|
||||
|
||||
postUnpack() {
|
||||
mv $libstdcxx/libstdcxx $sourceRoot/
|
||||
}
|
||||
|
||||
STDCXX_INCDIR="$out/include/c++/4.2.1"
|
||||
|
||||
genericBuild
|
||||
|
||||
|
||||
echo '-------------------------------------------------------------------------------------------------------------------------'
|
||||
echo 'libstdcxx-16'
|
||||
echo '-------------------------------------------------------------------------------------------------------------------------'
|
||||
|
||||
cd ..
|
||||
pwd
|
||||
|
||||
preConfigure() {
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build_libstdcxx
|
||||
cd ../build_libstdcxx
|
||||
|
||||
ln -s ../build/gcc gcc
|
||||
|
||||
configureScript=../$sourceRoot/libstdcxx/configure
|
||||
configureFlags="--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib --with-gxx-include-dir=${STDCXX_INCDIR}"
|
||||
}
|
||||
|
||||
unpackPhase () {
|
||||
echo '-'
|
||||
}
|
||||
|
||||
postInstall() {
|
||||
echo '-'
|
||||
echo "cp -v ${STDCXX_INCDIR}/*/bits/* ${STDCXX_INCDIR}/bits/"
|
||||
cp -v ${STDCXX_INCDIR}/*/bits/* ${STDCXX_INCDIR}/bits/
|
||||
}
|
||||
|
||||
patchPhase() {
|
||||
echo '-'
|
||||
}
|
||||
|
||||
genericBuild
|
||||
|
||||
ln -s $out/lib/x86_64 $out/lib64
|
||||
30
pkgs/development/compilers/gcc-apple64/debug_list.patch
Normal file
30
pkgs/development/compilers/gcc-apple64/debug_list.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff -rc libstdcxx-16-orig/libstdcxx/libstdc++-v3/src/Makefile.in libstdcxx-16/libstdcxx/libstdc++-v3/src/Makefile.in
|
||||
*** libstdcxx-16-orig/libstdcxx/libstdc++-v3/src/Makefile.in Thu Jul 23 19:13:52 2009
|
||||
--- libstdcxx-16/libstdcxx/libstdc++-v3/src/Makefile.in Thu Jul 23 19:38:23 2009
|
||||
***************
|
||||
*** 65,71 ****
|
||||
numeric_members.lo time_members.lo
|
||||
am__objects_2 = basic_file.lo c++locale.lo
|
||||
am__objects_3 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
|
||||
! codecvt.lo complex_io.lo ctype.lo debug.lo debug_list.lo \
|
||||
functexcept.lo globals_locale.lo globals_io.lo ios.lo \
|
||||
ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo \
|
||||
locale.lo locale_init.lo locale_facets.lo localename.lo \
|
||||
--- 65,71 ----
|
||||
numeric_members.lo time_members.lo
|
||||
am__objects_2 = basic_file.lo c++locale.lo
|
||||
am__objects_3 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
|
||||
! codecvt.lo complex_io.lo ctype.lo debug.lo \
|
||||
functexcept.lo globals_locale.lo globals_io.lo ios.lo \
|
||||
ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo \
|
||||
locale.lo locale_init.lo locale_facets.lo localename.lo \
|
||||
***************
|
||||
*** 315,321 ****
|
||||
complex_io.cc \
|
||||
ctype.cc \
|
||||
debug.cc \
|
||||
- debug_list.cc \
|
||||
functexcept.cc \
|
||||
globals_locale.cc \
|
||||
globals_io.cc \
|
||||
--- 315,320 ----
|
||||
30
pkgs/development/compilers/gcc-apple64/default.nix
Normal file
30
pkgs/development/compilers/gcc-apple64/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langF77 ? false
|
||||
, profiledCompiler ? false
|
||||
, gmp ? null, mpfr ? null, bison ? null, flex ? null
|
||||
}:
|
||||
|
||||
assert langC;
|
||||
assert stdenv.isDarwin;
|
||||
assert langF77 -> gmp != null;
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "gcc-4.2.1-apple-5646";
|
||||
builder = ./builder.sh;
|
||||
src =
|
||||
stdenv.lib.optional /*langC*/ true (fetchurl {
|
||||
url = http://www.opensource.apple.com/tarballs/gcc/gcc-5646.tar.gz;
|
||||
sha256 = "13jghyb098104kfym96iwwdvbj6snnws2c92h48lbd4fmyf1iv24";
|
||||
}) ++
|
||||
stdenv.lib.optional langCC (fetchurl {
|
||||
url = http://www.opensource.apple.com/tarballs/libstdcxx/libstdcxx-39.tar.gz ;
|
||||
sha256 = "1fy6j41rhxdsm19sib9wygjl5l54g8pm13c6y5x13f40mavw1mma";
|
||||
}) ;
|
||||
|
||||
libstdcxx = "libstdcxx-39";
|
||||
sourceRoot = "gcc-5646/";
|
||||
patches =
|
||||
[./pass-cxxcpp.patch ]
|
||||
++ (if noSysDirs then [./no-sys-dirs.patch] else []);
|
||||
inherit noSysDirs langC langCC langF77 profiledCompiler;
|
||||
} // (if langF77 then {buildInputs = [gmp mpfr bison flex];} else {}))
|
||||
126
pkgs/development/compilers/gcc-apple64/no-sys-dirs.patch
Normal file
126
pkgs/development/compilers/gcc-apple64/no-sys-dirs.patch
Normal file
@@ -0,0 +1,126 @@
|
||||
diff -ruN gcc-4.1.0/gcc/cppdefault.c gcc-4.1.0.new/gcc/cppdefault.c
|
||||
--- gcc-4.1.0/gcc/cppdefault.c 2005-06-25 04:02:01.000000000 +0200
|
||||
+++ gcc-4.1.0.new/gcc/cppdefault.c 2006-03-01 18:48:58.000000000 +0100
|
||||
@@ -41,6 +41,10 @@
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+#undef LOCAL_INCLUDE_DIR
|
||||
+#undef SYSTEM_INCLUDE_DIR
|
||||
+#undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -ruN gcc-4.1.0/gcc/Makefile.in gcc-4.1.0.new/gcc/Makefile.in
|
||||
--- gcc-4.1.0/gcc/Makefile.in 2006-02-16 16:23:24.000000000 +0100
|
||||
+++ gcc-4.1.0.new/gcc/Makefile.in 2006-03-01 18:55:12.000000000 +0100
|
||||
@@ -219,7 +219,7 @@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
# These exists to be overridden by the x-* and t-* files, respectively.
|
||||
-X_CFLAGS =
|
||||
+X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
|
||||
T_CFLAGS =
|
||||
|
||||
X_CPPFLAGS =
|
||||
@@ -383,7 +383,11 @@
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
+# `fixinc' from fixing header files in /usr/include. However,
|
||||
+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
+# it to some dummy directory.
|
||||
+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
@@ -395,7 +399,7 @@
|
||||
STMP_FIXINC = @STMP_FIXINC@
|
||||
|
||||
# Test to see whether <limits.h> exists in the system header files.
|
||||
-LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
|
||||
+LIMITS_H_TEST = true
|
||||
|
||||
# Directory for prefix to system directories, for
|
||||
# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
|
||||
@@ -3002,7 +3006,7 @@
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
@TARGET_SYSTEM_ROOT_DEFINE@
|
||||
diff -ruN gcc-4.1.0/libstdc++-v3/include/Makefile.in gcc-4.1.0.new/libstdc++-v3/include/Makefile.in
|
||||
--- gcc-4.1.0/libstdc++-v3/include/Makefile.in 2006-01-10 18:14:00.000000000 +0100
|
||||
+++ gcc-4.1.0.new/libstdc++-v3/include/Makefile.in 2006-03-01 18:57:32.000000000 +0100
|
||||
@@ -1257,8 +1257,8 @@
|
||||
if [ ! -d "${pch_output_builddir}" ]; then \
|
||||
mkdir -p ${pch_output_builddir}; \
|
||||
fi; \
|
||||
- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \
|
||||
- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch;
|
||||
+ $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \
|
||||
+ $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch;
|
||||
|
||||
# For robustness sake (in light of junk files or in-source
|
||||
# configuration), copy from the build or source tree to the install
|
||||
diff -ruN gcc-4.1.0/ltcf-cxx.sh gcc-4.1.0.new/ltcf-cxx.sh
|
||||
--- gcc-4.1.0/ltcf-cxx.sh 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.1.0.new/ltcf-cxx.sh 2006-03-01 18:58:15.000000000 +0100
|
||||
@@ -989,7 +989,7 @@
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
- for p in `eval $output_verbose_link_cmd`; do
|
||||
+ for p in `true`; do
|
||||
|
||||
case $p in
|
||||
|
||||
diff -ruN gcc-4.1.0/ltconfig gcc-4.1.0.new/ltconfig
|
||||
--- gcc-4.1.0/ltconfig 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.1.0.new/ltconfig 2006-03-01 18:59:58.000000000 +0100
|
||||
@@ -2322,6 +2322,11 @@
|
||||
# A language-specific compiler.
|
||||
CC=$CC
|
||||
|
||||
+# Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+# to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+CC="\$CC $NIX_EXTRA_LDFLAGS"
|
||||
+
|
||||
# Is the compiler the GNU C compiler?
|
||||
with_gcc=$with_gcc
|
||||
|
||||
diff -ruN gcc-4.1.0/Makefile.in gcc-4.1.0.new/Makefile.in
|
||||
--- gcc-4.1.0/Makefile.in 2005-12-15 15:02:02.000000000 +0100
|
||||
+++ gcc-4.1.0.new/Makefile.in 2006-03-01 19:41:04.000000000 +0100
|
||||
@@ -286,7 +286,7 @@
|
||||
WINDRES = @WINDRES@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
-LDFLAGS =
|
||||
+LDFLAGS = $(NIX_EXTRA_LDFLAGS)
|
||||
LIBCFLAGS = $(CFLAGS)
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
|
||||
@@ -329,12 +329,12 @@
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(NIX_EXTRA_CFLAGS)
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(NIX_EXTRA_CFLAGS)
|
||||
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
-LDFLAGS_FOR_TARGET =
|
||||
+LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
|
||||
PICFLAG_FOR_TARGET =
|
||||
|
||||
# ------------------------------------
|
||||
21
pkgs/development/compilers/gcc-apple64/pass-cxxcpp.patch
Normal file
21
pkgs/development/compilers/gcc-apple64/pass-cxxcpp.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
|
||||
*** gcc-orig/Makefile.in Wed Jun 21 13:40:23 2006
|
||||
--- gcc-4.1.1/Makefile.in Wed Jun 21 14:19:44 2006
|
||||
***************
|
||||
*** 213,219 ****
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
--- 213,220 ----
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
|
||||
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
49
pkgs/development/compilers/haxe/default.nix
Normal file
49
pkgs/development/compilers/haxe/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
args: with args;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "haxe-cvs";
|
||||
|
||||
src = sourceByName "haxe";
|
||||
|
||||
buildInputs = [ocaml zlib makeWrapper];
|
||||
|
||||
inherit zlib;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p ocaml/{swflib,extc,extlib-dev,xml-light} neko/libs
|
||||
|
||||
# strange setup. install.ml seems to co the same repo again into haxe directory!
|
||||
tar xfz $src --strip-components=1 -C haxe
|
||||
|
||||
t(){ tar xfz $1 -C $2 --strip-components=2; }
|
||||
t ${sourceByName "haxe_swflib"} ocaml/swflib
|
||||
t ${sourceByName "haxe_extc"} ocaml/extc
|
||||
t ${sourceByName "haxe_extlib_dev"} ocaml/extlib-dev
|
||||
t ${sourceByName "haxe_xml_light"} ocaml/xml-light
|
||||
t ${sourceByName "haxe_neko_include"} neko/libs
|
||||
|
||||
sed -e '/download();/d' \
|
||||
-e "s@/usr/lib/@''${zlib}/lib/@g" \
|
||||
doc/install.ml > install.ml
|
||||
|
||||
ocaml install.ml
|
||||
'';
|
||||
|
||||
# probably rpath should be set properly
|
||||
installPhase = ''
|
||||
ensureDir $out/lib/haxe
|
||||
cp -r bin $out/bin
|
||||
wrapProgram "$out/bin/haxe" \
|
||||
--set "LD_LIBRARY_PATH" $zlib/lib \
|
||||
--set HAXE_LIBRARY_PATH "''${HAXE_LIBRARY_PATH}''${HAXE_LIBRARY_PATH:-:}:$out/lib/haxe/std:."
|
||||
cp -r std $out/lib/haxe/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "programming language targeting JavaScript, Flash, NekVM, PHP, C++";
|
||||
homepage = http://haxe.org;
|
||||
license = ["GPLv2" "BSD2" /*?*/ ]; # -> docs/license.txt
|
||||
maintainers = [args.lib.maintainers.marcweber];
|
||||
platforms = args.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
55
pkgs/development/compilers/neko/default.nix
Normal file
55
pkgs/development/compilers/neko/default.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
args: with args;
|
||||
|
||||
let
|
||||
|
||||
inherit (args.composableDerivation) composableDerivation edf wwf;
|
||||
|
||||
libs = [ mysql apacheHttpd zlib sqlite pcre apr gtk];
|
||||
|
||||
includes = lib.concatMapStrings (x: ''"${x}/include",'' ) libs + ''"{gkt}/include/gtk-2.0",'';
|
||||
|
||||
in
|
||||
|
||||
composableDerivation {} ( fixed : {
|
||||
|
||||
name = "neko-cvs";
|
||||
|
||||
src = sourceByName "neko";
|
||||
|
||||
# optionally remove apache mysql like gentoo does?
|
||||
# they just remove libs/{apache,mod_neko}
|
||||
buildInputs = [boehmgc pkgconfig makeWrapper] ++ libs;
|
||||
# apr should be in apacheHttpd propagatedBuildInputs
|
||||
|
||||
preConfigure = ''
|
||||
sed -i \
|
||||
-e 's@"/usr/include",@${includes}@' \
|
||||
src/tools/install.neko
|
||||
sed -i "s@/usr/local@$out@" Makefile
|
||||
ensureDir $out/{bin,lib}
|
||||
'';
|
||||
|
||||
inherit zlib;
|
||||
|
||||
meta = {
|
||||
description = "Neko is an high-level dynamicly typed programming language";
|
||||
homepage = http://nekovm.org;
|
||||
license = ["GPLv2" ]; # -> docs/license.txt
|
||||
maintainers = [args.lib.maintainers.marcweber];
|
||||
platforms = args.lib.platforms.linux;
|
||||
};
|
||||
|
||||
# if stripping was done neko and nekoc would be the same. ?!
|
||||
dontStrip = 1;
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/nekoc" \
|
||||
--set "LD_LIBRARY_PATH" $out/lib/neko \
|
||||
|
||||
wrapProgram "$out/bin/neko" \
|
||||
--set "LD_LIBRARY_PATH" $out/lib/neko \
|
||||
'';
|
||||
|
||||
# TODO make them optional and make them work
|
||||
patches = [ ./disable-modules.patch ];
|
||||
})
|
||||
59
pkgs/development/compilers/neko/disable-modules.patch
Normal file
59
pkgs/development/compilers/neko/disable-modules.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
diff --git a/src/tools/install.neko b/src/tools/install.neko
|
||||
index 4cffa5e..5702add 100644
|
||||
--- a/src/tools/install.neko
|
||||
+++ b/src/tools/install.neko
|
||||
@@ -39,26 +39,6 @@ buffer_string = $loader.loadprim("std@buffer_string",1);
|
||||
// LIBS DATAS
|
||||
|
||||
libs = {
|
||||
- mod_neko => {
|
||||
- src => $array("../../vm/stats","mod_neko","cgi"),
|
||||
- inc => "httpd.h",
|
||||
- incname => "Apache 1.3.x"
|
||||
- },
|
||||
- mod_neko2 => {
|
||||
- src => $array("../../vm/stats","mod_neko","cgi"),
|
||||
- inc => $array("httpd.h","apr.h"),
|
||||
- incname => "Apache 2.2.x",
|
||||
- cflags => "-D_LARGEFILE64_SOURCE",
|
||||
- realdir => "mod_neko",
|
||||
- apache2 => true,
|
||||
- },
|
||||
- mysql => {
|
||||
- src => $array("mysql"),
|
||||
- inc => "mysql.h",
|
||||
- incname => "MySQL 4.+"
|
||||
- lib => "libmysqlclient_r.a",
|
||||
- lparams => "-lz -lssl"
|
||||
- },
|
||||
mysql5 => {
|
||||
src => $array("../common/sha1","../common/socket","my_proto/my_proto","my_proto/my_api","mysql"),
|
||||
inc => $array(),
|
||||
@@ -83,27 +63,6 @@ libs = {
|
||||
incname => "Sqlite 3",
|
||||
lparams => "-lsqlite3",
|
||||
},
|
||||
- ui => {
|
||||
- src => $array("ui"),
|
||||
- inc => switch system { "Mac" => "Carbon.h" default => "gtk/gtk.h" },
|
||||
- incname => switch system { "Mac" => "Carbon" default => "GTK+2.0" },
|
||||
- cflags => switch system { "Mac" => "" default => "`pkg-config --cflags gtk+-2.0`" },
|
||||
- lparams => switch system { "Mac" => "-framework Carbon" default => "`pkg-config --libs gtk+-2.0` -lgthread-2.0" },
|
||||
- },
|
||||
- mod_tora => {
|
||||
- src => $array("../common/socket","protocol","mod_tora"),
|
||||
- inc => "httpd.h",
|
||||
- incname => "Apache 1.3.x",
|
||||
- cflags => "-I../common",
|
||||
- },
|
||||
- mod_tora2 => {
|
||||
- src => $array("../common/socket","protocol","mod_tora"),
|
||||
- inc => $array("httpd.h","apr.h"),
|
||||
- incname => "Apache 2.2.x",
|
||||
- cflags => "-D_LARGEFILE64_SOURCE -I../common",
|
||||
- realdir => "mod_tora",
|
||||
- apache2 => true,
|
||||
- },
|
||||
}
|
||||
|
||||
// PLATFORM
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, aterm, pkgconfig, getopt, jdk}:
|
||||
{stdenv, fetchurl, aterm, pkgconfig, getopt, jdk, readline, ncurses}:
|
||||
|
||||
rec {
|
||||
|
||||
@@ -43,6 +43,22 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
strategoShell = stdenv.mkDerivation rec {
|
||||
name = "stratego-shell-0.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.strategoxt.org/pub/stratego/StrategoXT/strategoxt-0.17/stratego-shell-0.7.tar.gz";
|
||||
sha256 = "0q21vks9gaw9v4rxz90wb0pxzb19l7gwi4nbjvk4zb1imdk7znck";
|
||||
};
|
||||
|
||||
buildInputs = [pkgconfig aterm sdf strategoxt getopt readline ncurses];
|
||||
|
||||
meta = {
|
||||
homepage = http://strategoxt.org/;
|
||||
meta = "A language and toolset for program transformation";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
javafront = stdenv.mkDerivation (rec {
|
||||
name = "java-front-0.9";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, aterm, pkgconfig, getopt, jdk, makeStaticBinaries}:
|
||||
{stdenv, fetchurl, aterm, pkgconfig, getopt, jdk, makeStaticBinaries, readline, ncurses}:
|
||||
|
||||
rec {
|
||||
|
||||
@@ -56,6 +56,21 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
strategoShell = stdenv.mkDerivation rec {
|
||||
name = "stratego-shell-0.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.strategoxt.org/pub/stratego/StrategoXT/strategoxt-0.17/stratego-shell-0.7.tar.gz";
|
||||
sha256 = "0q21vks9gaw9v4rxz90wb0pxzb19l7gwi4nbjvk4zb1imdk7znck";
|
||||
};
|
||||
|
||||
buildInputs = [pkgconfig aterm sdf strategoxt getopt readline ncurses];
|
||||
|
||||
meta = {
|
||||
homepage = http://strategoxt.org/;
|
||||
meta = "A language and toolset for program transformation";
|
||||
};
|
||||
};
|
||||
|
||||
javafront = stdenv.mkDerivation (rec {
|
||||
name = "java-front-0.9";
|
||||
@@ -78,6 +93,18 @@ rec {
|
||||
} // ( if stdenv.system == "i686-cygwin" then { CFLAGS = "-O2"; } else {} ) ) ;
|
||||
|
||||
|
||||
aspectjfront = stdenv.mkDerivation (rec {
|
||||
name = "aspectj-front-0.2pre20035";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://hydra.nixos.org/build/175690/download/1/aspectj-front-0.2pre20035.tar.gz";
|
||||
sha256 = "48f6cda6f9f19436e9553e8d27e6bb42500d08370332e3ad214affb49851e58e";
|
||||
};
|
||||
|
||||
buildInputs = [pkgconfig aterm sdf strategoxt javafront];
|
||||
|
||||
} // ( if stdenv.system == "i686-cygwin" then { CFLAGS = "-O2"; } else {} ) ) ;
|
||||
|
||||
dryad = stdenv.mkDerivation rec {
|
||||
name = "dryad-0.2pre1835518355";
|
||||
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib, libXinerama, libXft, libXpm, libSM, libXt }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "swi-prolog-5.6.51";
|
||||
name = "swi-prolog-5.6.64";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-5.6.51.tar.gz";
|
||||
sha256 = "d43862606284e659ec3acba9cddea53b772f9afb67d12aa36391d26fe1a05ad8";
|
||||
url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-5.6.64.tar.gz";
|
||||
sha256 = "b0e70c3c02b7753ed440359746e7729d21c93e42689c1f0f32b148167b1b2c66";
|
||||
};
|
||||
|
||||
buildInputs = [gmp readline openssl libjpeg unixODBC libXinerama libXft libXpm libSM libXt zlib];
|
||||
configureFlags = "--with-world --enable-gmp --enable-shared";
|
||||
makeFlags = "world";
|
||||
|
||||
meta = {
|
||||
homepage = http://www.swi-prolog.org/;
|
||||
description = "A Prolog compiler and interpreter";
|
||||
|
||||
Reference in New Issue
Block a user