Merge branch 'master' into staging
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{stdenv, fetchurl
|
||||
, libtool, autoconf, automake
|
||||
, gmp, mpfr, libffi
|
||||
, noUnicode ? false,
|
||||
}:
|
||||
@@ -13,10 +14,10 @@ let
|
||||
sha256="13wlxkd5prm93gcm2dhm7v52fl803yx93aa97lrb39z0y6xzziid";
|
||||
};
|
||||
buildInputs = [
|
||||
libffi
|
||||
libtool autoconf automake
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
gmp mpfr
|
||||
libffi gmp mpfr
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
@@ -25,8 +26,18 @@ stdenv.mkDerivation {
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
patches = [ ./libffi-prefix.patch ];
|
||||
preConfigure = ''
|
||||
(cd src ; libtoolize -f)
|
||||
(cd src ; autoheader -f)
|
||||
(cd src ; aclocal)
|
||||
(cd src ; automake --add-missing -c)
|
||||
(cd src ; autoconf -f)
|
||||
'';
|
||||
configureFlags = [
|
||||
"--enable-threads"
|
||||
"--with-gmp-prefix=${gmp}"
|
||||
"--with-libffi-prefix=${libffi}"
|
||||
]
|
||||
++
|
||||
(stdenv.lib.optional (! noUnicode)
|
||||
|
||||
39
pkgs/development/compilers/ecl/libffi-prefix.patch
Normal file
39
pkgs/development/compilers/ecl/libffi-prefix.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
diff --git a/src/configure.in b/src/configure.in
|
||||
index 434da49..642c66c 100644
|
||||
--- ecl-15.3.7.orig/src/configure.ac
|
||||
+++ ecl-15.3.7/src/configure.ac
|
||||
@@ -191,6 +191,11 @@ AC_ARG_WITH(dffi,
|
||||
[(system|included|auto|no, default=AUTO if libffi available)]),
|
||||
[enable_libffi=${withval}], [enable_libffi=auto])
|
||||
|
||||
+AC_ARG_WITH(libffi-prefix,
|
||||
+ AS_HELP_STRING( [--with-libffi-prefix=path],
|
||||
+ [prefix for system LIBFFI includes and libraries] ),
|
||||
+ [LIBFFI_INCDIR="$withval/include"; LIBFFI_LIBDIR="$withval/lib"], [])
|
||||
+
|
||||
AC_ARG_WITH(fpe,
|
||||
AS_HELP_STRING( [--with-fpe],
|
||||
[detect floating point exceptions]
|
||||
@@ -368,6 +373,22 @@ else
|
||||
INFOEXT=info
|
||||
fi
|
||||
|
||||
+dnl libffi
|
||||
+
|
||||
+if test "x$LIBFFI_INCDIR" != "x"; then
|
||||
+ LIBFFI_CPPFLAGS="-I$LIBFFI_INCDIR"
|
||||
+fi
|
||||
+if test "x$LIBFFI_LIBDIR" != "x"; then
|
||||
+ LIBFFI_LDFLAGS="-L$LIBFFI_LIBDIR"
|
||||
+ if test "$enable_rpath" = "yes"; then
|
||||
+ if (echo "$ECL_LDRPATH" | grep '~A') > /dev/null; then
|
||||
+ LIBFFI_LDFLAGS=`echo $ECL_LDRPATH | sed "s,~A,$LIBFFI_LIBDIR,"`" $LIBFFI_LDFLAGS"
|
||||
+ fi
|
||||
+ fi
|
||||
+fi
|
||||
+CPPFLAGS="$CPPFLAGS $LIBFFI_CPPFLAGS"
|
||||
+LDFLAGS="$LDFLAGS $LIBFFI_LDFLAGS"
|
||||
+
|
||||
dnl ======================================================================
|
||||
dnl GNU multiprecision library
|
||||
dnl
|
||||
@@ -28,7 +28,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# We patch Cabal for GHCJS. See: https://github.com/haskell/cabal/issues/2454
|
||||
preConfigure = ''
|
||||
sed -i 's/HcPkg.useSingleFileDb = .*/HcPkg.useSingleFileDb = False/' libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs
|
||||
echo >mk/build.mk "${buildMK}"
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
|
||||
@@ -1,64 +1,91 @@
|
||||
{ nodejs, cabal, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm
|
||||
, testFramework, testFrameworkHunit, testFrameworkQuickcheck2, time
|
||||
, zlib, aeson, attoparsec, bzlib, dataDefault, ghcPaths, hashable
|
||||
, haskellSrcExts, haskellSrcMeta, lens, optparseApplicative
|
||||
, parallel, safe, shelly, split, stringsearch, syb, systemFileio
|
||||
, systemFilepath, tar, terminfo, textBinary, unorderedContainers
|
||||
, vector, wlPprintText, yaml, fetchgit, Cabal, cabalInstall
|
||||
, regexPosix, alex, happy, git, gnumake, gcc, autoconf, patch
|
||||
, automake, libtool, gmp, base16Bytestring
|
||||
, cryptohash, executablePath, transformersCompat, haddockApi
|
||||
, haddock, hspec, xhtml, primitive, cacert, pkgs, ghc
|
||||
{ mkDerivation
|
||||
, test-framework
|
||||
, test-framework-hunit
|
||||
, test-framework-quickcheck2
|
||||
, data-default
|
||||
, ghc-paths
|
||||
, haskell-src-exts
|
||||
, haskell-src-meta
|
||||
, optparse-applicative
|
||||
, system-fileio
|
||||
, system-filepath
|
||||
, text-binary
|
||||
, unordered-containers
|
||||
, cabal-install
|
||||
, wl-pprint-text
|
||||
, base16-bytestring
|
||||
, executable-path
|
||||
, transformers-compat
|
||||
, haddock-api
|
||||
, ghcjs-prim
|
||||
, regex-posix
|
||||
|
||||
, ghc, gmp
|
||||
, jailbreak-cabal
|
||||
|
||||
, nodejs, stdenv, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm
|
||||
, time
|
||||
, zlib, aeson, attoparsec, bzlib, hashable
|
||||
, lens
|
||||
, parallel, safe, shelly, split, stringsearch, syb
|
||||
, tar, terminfo
|
||||
, vector, yaml, fetchgit, Cabal
|
||||
, alex, happy, git, gnumake, autoconf, patch
|
||||
, automake, libtool
|
||||
, cryptohash
|
||||
, haddock, hspec, xhtml, primitive, cacert, pkgs
|
||||
, coreutils
|
||||
, ghcjsPrim
|
||||
, libiconv
|
||||
}:
|
||||
let
|
||||
version = "0.1.0";
|
||||
libDir = "share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.ghc.version}/ghcjs";
|
||||
libDir = "share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.version}/ghcjs";
|
||||
ghcjsBoot = fetchgit {
|
||||
url = git://github.com/ghcjs/ghcjs-boot.git;
|
||||
rev = "5c7a71472d5a797e895914d3b82cea447a058793";
|
||||
sha256 = "0dp97bgbnlr3sd9yfnk27p6dfv46fi26sn6y6qv1wxs5i29kmjav";
|
||||
rev = "8cd6144870470258fb037b3e04a0a2a98c2b6551"; # 7.10 branch
|
||||
sha256 = "16cbncx179n5khf8hkj9r221wf73rc8isffk8rv3n9psshv1jiji";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
shims = fetchgit {
|
||||
url = git://github.com/ghcjs/shims.git;
|
||||
rev = "99bbd4bed584ec42bfcc5ea61c3808a2c670053d";
|
||||
sha256 = "1my3gqkln7hgm0bpy32pnhwjfza096alh0n9x9ny8xfpxhmzz4h6";
|
||||
rev = "6ada4bf1a084d1b80b993303d35ed863d219b031"; # master branch
|
||||
sha256 = "0dhfnjj3rxdbb2m1pbnjc2yp4xcgsfdrsinljgdmg0hpqkafp4vc";
|
||||
};
|
||||
in cabal.mkDerivation (self: rec {
|
||||
in mkDerivation (rec {
|
||||
pname = "ghcjs";
|
||||
inherit version;
|
||||
src = fetchgit {
|
||||
url = git://github.com/ghcjs/ghcjs.git;
|
||||
rev = "4b9461e8be646d5152a0ae7ece5b3616bf938637";
|
||||
sha256 = "19g62j1kkdwcgp0042ppmskwbvfk7qkf1fjs8bpjc6wwd19ipiar";
|
||||
rev = "35a59743c4027f26a227635cb24a6246bd851f8d"; # master branch
|
||||
sha256 = "107sh36ji3psdl3py84vxgqbywjyzglj3p0akzpvcmbarxwfr1mw";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
jailbreak = true;
|
||||
noHaddock = true;
|
||||
doHaddock = false;
|
||||
doCheck = false;
|
||||
buildDepends = [
|
||||
filepath HTTP mtl network random stm time zlib aeson attoparsec
|
||||
bzlib dataDefault ghcPaths hashable haskellSrcExts haskellSrcMeta
|
||||
lens optparseApplicative parallel safe shelly split
|
||||
stringsearch syb systemFileio systemFilepath tar terminfo textBinary
|
||||
unorderedContainers vector wlPprintText yaml
|
||||
alex happy git gnumake gcc autoconf automake libtool patch gmp
|
||||
base16Bytestring cryptohash executablePath haddockApi
|
||||
transformersCompat QuickCheck haddock hspec xhtml
|
||||
ghcjsPrim regexPosix
|
||||
bzlib data-default ghc-paths hashable haskell-src-exts haskell-src-meta
|
||||
lens optparse-applicative parallel safe shelly split
|
||||
stringsearch syb system-fileio system-filepath tar terminfo text-binary
|
||||
unordered-containers vector wl-pprint-text yaml
|
||||
alex happy git gnumake autoconf automake libtool patch gmp
|
||||
base16-bytestring cryptohash executable-path haddock-api
|
||||
transformers-compat QuickCheck haddock hspec xhtml
|
||||
ghcjs-prim regex-posix libiconv
|
||||
];
|
||||
buildTools = [ nodejs git ];
|
||||
testDepends = [
|
||||
HUnit testFramework testFrameworkHunit
|
||||
HUnit test-framework test-framework-hunit
|
||||
];
|
||||
patches = [ ./ghcjs.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace Setup.hs --replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||
substituteInPlace src/Compiler/Info.hs --replace "@PREFIX@" "$out"
|
||||
substituteInPlace src-bin/Boot.hs --replace "@PREFIX@" "$out"
|
||||
substituteInPlace src-bin/Boot.hs \
|
||||
--replace "@PREFIX@" "$out" \
|
||||
--replace "@CC@" "${stdenv.cc}/bin/cc"
|
||||
'';
|
||||
preBuild = ''
|
||||
local topDir=$out/${libDir}
|
||||
@@ -69,23 +96,33 @@ in cabal.mkDerivation (self: rec {
|
||||
|
||||
cp -r ${shims} $topDir/shims
|
||||
chmod -R u+w $topDir/shims
|
||||
|
||||
# Make the patches be relative their corresponding package's directory.
|
||||
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
|
||||
for patch in $topDir/ghcjs-boot/patches/*.patch; do
|
||||
echo "fixing patch: $patch"
|
||||
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
|
||||
done
|
||||
'';
|
||||
postInstall = ''
|
||||
PATH=$out/bin:${Cabal}/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${gcc.cc}/lib64:$LD_LIBRARY_PATH \
|
||||
PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \
|
||||
env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \
|
||||
--dev \
|
||||
--with-cabal ${cabalInstall}/bin/cabal \
|
||||
--with-cabal ${cabal-install}/bin/cabal \
|
||||
--with-gmp-includes ${gmp}/include \
|
||||
--with-gmp-libraries ${gmp}/lib
|
||||
'';
|
||||
passthru = {
|
||||
inherit libDir;
|
||||
isGhcjs = true;
|
||||
nativeGhc = ghc;
|
||||
};
|
||||
meta = {
|
||||
homepage = "https://github.com/ghcjs/ghcjs";
|
||||
description = "GHCJS is a Haskell to JavaScript compiler that uses the GHC API";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
maintainers = [ self.stdenv.lib.maintainers.jwiegley ];
|
||||
};
|
||||
|
||||
homepage = "https://github.com/ghcjs/ghcjs";
|
||||
description = "GHCJS is a Haskell to JavaScript compiler that uses the GHC API";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = ghc.meta.platforms;
|
||||
maintainers = with stdenv.lib.maintainers; [
|
||||
jwiegley cstrahan
|
||||
];
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
|
||||
index 988955b..a55f07b 100644
|
||||
index 3c68dcf..64f3cf7 100644
|
||||
--- a/src-bin/Boot.hs
|
||||
+++ b/src-bin/Boot.hs
|
||||
@@ -512,9 +512,7 @@ initPackageDB :: B ()
|
||||
@@ -46,9 +46,11 @@ index 988955b..a55f07b 100644
|
||||
mapM_ patchPackage =<< allPackages
|
||||
preparePrimops
|
||||
buildGenPrim
|
||||
@@ -1086,7 +1077,9 @@ cabalInstallFlags parmakeGhcjs = do
|
||||
@@ -1085,8 +1076,11 @@ cabalInstallFlags parmakeGhcjs = do
|
||||
, "--avoid-reinstalls"
|
||||
, "--builddir", "dist"
|
||||
, "--with-compiler", ghcjs ^. pgmLocText
|
||||
+ , "--with-gcc", "@CC@"
|
||||
, "--with-hc-pkg", ghcjsPkg ^. pgmLocText
|
||||
- , "--prefix", toTextI instDir
|
||||
+ , "--prefix", "@PREFIX@"
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{ stdenv, fetchurl, builderDefs, unzip, clisp }:
|
||||
let localDefs = builderDefs.passthru.function {
|
||||
src = /* put a fetchurl here */
|
||||
fetchurl {
|
||||
url = http://www.lambdassociates.org/Download/Qi9.1.zip;
|
||||
sha256 = "1j584i7pj38rnlf7v9njfdwc6gc296v5friw2887dsw34dmwyg3f";
|
||||
};
|
||||
buildInputs = [ unzip clisp];
|
||||
configureFlags = [];
|
||||
};
|
||||
in with localDefs;
|
||||
let
|
||||
shell=stdenv.shell;
|
||||
in
|
||||
let
|
||||
allBuild = fullDepEntry ("
|
||||
(sleep 0.1; echo ) | clisp install.txt;
|
||||
(sleep 0.1; echo -e '1\n(quit)\n' ) | sh Qi-Linux-CLisp
|
||||
mkdir -p \$out/share
|
||||
mkdir -p \$out/bin
|
||||
cp -r . \$out/share/Qi-9.1
|
||||
echo -e '#! ${shell}
|
||||
arg1=\${1:-'\$out'/share/Qi-9.1/startup.txt}
|
||||
shift
|
||||
clisp -M '\$out'/share/Qi-9.1/lispinit.mem \$arg1 \"\$@\"\\n' > \$out/bin/qi
|
||||
chmod a+x \$out/bin/qi
|
||||
") [ addInputs minInit doUnpack defEnsureDir];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "Qi-9.1";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [allBuild doForceShare doPropagate]);
|
||||
meta = {
|
||||
description = "Functional programming language, built top of Common Lisp";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user