Merge branch 'master'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, dbus, mono, makeWrapper, nant
|
||||
, shared_mime_info, gtksourceview, gtk2
|
||||
, shared-mime-info, gtksourceview, gtk2
|
||||
, targetVersion ? "4.5" }:
|
||||
|
||||
let
|
||||
@@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
mono makeWrapper nant shared_mime_info gtksourceview
|
||||
mono makeWrapper nant shared-mime-info gtksourceview
|
||||
gtk2
|
||||
];
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
let
|
||||
options = rec {
|
||||
/* TODO: there are also MacOS, FreeBSD and Windows versions */
|
||||
/* TODO: there are also FreeBSD and Windows versions */
|
||||
x86_64-linux = {
|
||||
arch = "linuxx86";
|
||||
sha256 = "0hs1f3z7crgzvinpj990kv9gvbsipxvcvwbmk54n51nasvc5025q";
|
||||
@@ -21,6 +21,18 @@ let
|
||||
runtime = "armcl";
|
||||
kernel = "linuxarm";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
arch = "darwinx86";
|
||||
sha256 = "5adbea3d8b4a2e29af30d141f781c6613844f468c0ccfa11bae908c3e9641939";
|
||||
runtime = "dx86cl64";
|
||||
kernel = "darwinx8664";
|
||||
};
|
||||
i686-darwin = {
|
||||
arch = "darwinx86";
|
||||
sha256 = x86_64-darwin.sha256;
|
||||
runtime = "dx86cl";
|
||||
kernel = "darwinx8632";
|
||||
};
|
||||
armv6l-linux = armv7l-linux;
|
||||
};
|
||||
cfg = options.${stdenv.system};
|
||||
@@ -37,12 +49,22 @@ stdenv.mkDerivation rec {
|
||||
sha256 = cfg.sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ gcc glibc m4 ];
|
||||
buildInputs = if stdenv.isDarwin then [ m4 ] else [ gcc glibc m4 ];
|
||||
|
||||
CCL_RUNTIME = cfg.runtime;
|
||||
CCL_KERNEL = cfg.kernel;
|
||||
|
||||
postPatch = ''
|
||||
postPatch = if stdenv.isDarwin then ''
|
||||
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
|
||||
--replace "M4 = gm4" "M4 = m4" \
|
||||
--replace "dtrace" "/usr/sbin/dtrace" \
|
||||
--replace "mig" "/usr/bin/mig" \
|
||||
--replace "/bin/rm" "${coreutils}/bin/rm" \
|
||||
--replace "/bin/echo" "${coreutils}/bin/echo"
|
||||
|
||||
substituteInPlace lisp-kernel/m4macros.m4 \
|
||||
--replace "/bin/pwd" "${coreutils}/bin/pwd"
|
||||
'' else ''
|
||||
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
|
||||
--replace "/bin/rm" "${coreutils}/bin/rm" \
|
||||
--replace "/bin/echo" "${coreutils}/bin/echo"
|
||||
@@ -63,7 +85,7 @@ stdenv.mkDerivation rec {
|
||||
cp -r . "$out/share/ccl-installation"
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
|
||||
echo -e '#!${stdenv.shell}\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
|
||||
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
|
||||
ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
|
||||
'';
|
||||
|
||||
@@ -11,11 +11,12 @@ let
|
||||
, name ? ""
|
||||
, developerProgram ? false
|
||||
, python ? python27
|
||||
, runPatches ? []
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-${version}";
|
||||
inherit (args) version;
|
||||
inherit version runPatches;
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
@@ -27,7 +28,7 @@ let
|
||||
This nix expression requires that ${args.name} is already part of the store.
|
||||
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
|
||||
at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
|
||||
nix-prefetch-url file://${args.name}
|
||||
nix-prefetch-url file://\$PWD/${args.name}
|
||||
'';
|
||||
inherit (args) name sha256;
|
||||
}
|
||||
@@ -48,35 +49,34 @@ let
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
|
||||
cd pkg/run_files
|
||||
sh cuda-linux*.run --keep --noexec
|
||||
sh cuda-samples*.run --keep --noexec
|
||||
cd pkg
|
||||
'';
|
||||
mv pkg ../../$(basename $src)
|
||||
cd ../..
|
||||
rm -rf pkg
|
||||
|
||||
buildPhase = ''
|
||||
chmod -R u+w .
|
||||
while IFS= read -r -d ''$'\0' i; do
|
||||
if ! isELF "$i"; then continue; fi
|
||||
echo "patching $i..."
|
||||
if [[ ! $i =~ \.so ]]; then
|
||||
patchelf \
|
||||
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
|
||||
fi
|
||||
if [[ $i =~ libcudart ]]; then
|
||||
rpath2=
|
||||
else
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
fi
|
||||
patchelf --set-rpath $rpath2 --force-rpath $i
|
||||
done < <(find . -type f -print0)
|
||||
for patch in $runPatches; do
|
||||
sh $patch --keep --noexec
|
||||
mv pkg $(basename $patch)
|
||||
done
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cd $(basename $src)
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
cd ..
|
||||
for patch in $runPatches; do
|
||||
cd $(basename $patch)
|
||||
perl ./install_patch.pl --silent --accept-eula --installdir="$out"
|
||||
cd ..
|
||||
done
|
||||
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
|
||||
|
||||
@@ -117,6 +117,23 @@ let
|
||||
echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
while IFS= read -r -d ''$'\0' i; do
|
||||
if ! isELF "$i"; then continue; fi
|
||||
echo "patching $i..."
|
||||
if [[ ! $i =~ \.so ]]; then
|
||||
patchelf \
|
||||
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
|
||||
fi
|
||||
if [[ $i =~ libcudart ]]; then
|
||||
rpath2=
|
||||
else
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
fi
|
||||
patchelf --set-rpath $rpath2 --force-rpath $i
|
||||
done < <(find $out $lib $doc -type f -print0)
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
cc = gcc;
|
||||
majorVersion =
|
||||
@@ -163,16 +180,28 @@ in {
|
||||
};
|
||||
|
||||
cudatoolkit8 = common {
|
||||
version = "8.0.61";
|
||||
version = "8.0.61.2";
|
||||
url = "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run";
|
||||
sha256 = "1i4xrsqbad283qffvysn88w2pmxzxbbby41lw0j1113z771akv4w";
|
||||
runPatches = [
|
||||
(fetchurl {
|
||||
url = "https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda_8.0.61.2_linux-run";
|
||||
sha256 = "1iaz5rrsnsb1p99qiqvxn6j3ksc7ry8xlr397kqcjzxqbljbqn9d";
|
||||
})
|
||||
];
|
||||
gcc = gcc5;
|
||||
};
|
||||
|
||||
cudatoolkit9 = common {
|
||||
version = "9.0.176";
|
||||
url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run";
|
||||
sha256 = "0308rmmychxfa4inb1ird9bpgfppgr9yrfg1qp0val5azqik91ln";
|
||||
version = "9.1.85.1";
|
||||
url = "https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux";
|
||||
sha256 = "0lz9bwhck1ax4xf1fyb5nicb7l1kssslj518z64iirpy2qmwg5l4";
|
||||
runPatches = [
|
||||
(fetchurl {
|
||||
url = "https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/1/cuda_9.1.85.1_linux";
|
||||
sha256 = "1f53ij5nb7g0vb5pcpaqvkaj1x4mfq3l0mhkfnqbk8sfrvby775g";
|
||||
})
|
||||
];
|
||||
gcc = gcc6;
|
||||
};
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
, curl, tzdata, gdb, darwin
|
||||
, callPackage
|
||||
, bootstrapVersion ? false
|
||||
, version ? "2.078.2"
|
||||
, dmdSha256 ? "0x9q4aw4jl36dz7m5111y2sm8jdaj3zg36zhj6vqg1lqpdn3bhls"
|
||||
, druntimeSha256 ? "0nfqjcmwqc490bzi3582x1c3zigkf306g4nyd1cyd3vs8lfm6x66"
|
||||
, phobosSha256 ? "08ircpf4ilznz638kra272hz8fi5ccvw2cswj5hqckssl1lyqzs8"
|
||||
, version ? "2.079.0"
|
||||
, dmdSha256 ? "1k6cky71pqnss6h6391p1ich2mjs598f5fda018aygnxg87qgh4y"
|
||||
, druntimeSha256 ? "183pqygj5w4105czs5kswyjn9mrcybx3wmkynz3in0m3ylzzjmvl"
|
||||
, phobosSha256 ? "0y9i86ggmf41ww2xk2bsrlsv9b1blj5dbyan6q6r6xp8dmgrd79w"
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -80,17 +80,6 @@ let
|
||||
"phobos/std/datetime/timezone.d";
|
||||
|
||||
phobosPatches = ''
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "import core.time;" "import core.time;import std.path;"
|
||||
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
|
||||
# Ugly hack so the dlopen call has a chance to succeed.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace phobos/std/net/curl.d \
|
||||
@@ -102,15 +91,29 @@ let
|
||||
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion) ''
|
||||
# Can be removed when https://github.com/dlang/phobos/pull/6224 is included.
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth))" "import std.path : baseName; foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth))"
|
||||
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion) ''
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "import std.traits;" "import std.traits;import std.path;"
|
||||
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "tzName == \"+VERSION\"" "baseName(tzName) == \"leapseconds\" || tzName == \"+VERSION\""
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
+ stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isLinux) ''
|
||||
# See https://github.com/dlang/phobos/pull/5960
|
||||
substituteInPlace phobos/std/path.d \
|
||||
--replace "\"/root" "\"${ROOT_HOME_DIR}"
|
||||
@@ -122,9 +125,6 @@ let
|
||||
"dmd";
|
||||
|
||||
postPatch = ''
|
||||
# Use proper C++ compiler
|
||||
substituteInPlace ${dmdPath}/posix.mak \
|
||||
--replace g++ $CXX
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion) ''
|
||||
@@ -132,6 +132,12 @@ let
|
||||
--replace "DFLAGS:=" "DFLAGS:=${usePIC} "
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion) ''
|
||||
# Use proper C++ compiler
|
||||
substituteInPlace ${dmdPath}/posix.mak \
|
||||
--replace g++ $CXX
|
||||
''
|
||||
|
||||
+ phobosPatches
|
||||
|
||||
+ stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
|
||||
@@ -145,9 +151,9 @@ let
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin && bootstrapVersion) ''
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace ${dmdPath}/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace ${dmdPath}/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which gdb ]
|
||||
@@ -176,7 +182,7 @@ let
|
||||
cd ../druntime
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
|
||||
cd ../phobos
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
|
||||
cd ..
|
||||
'';
|
||||
|
||||
@@ -260,7 +266,7 @@ let
|
||||
|
||||
buildPhase = ''
|
||||
cd phobos
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${dmdBuild}/bin/dmd BUILD=release
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${dmdBuild}/bin/dmd BUILD=release TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gambit-bootstrap-${version}";
|
||||
version = "4.8.8";
|
||||
tarball_version = "v4_8_8";
|
||||
version = "4.8.9";
|
||||
tarball_version = "v4_8_9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-${tarball_version}-devel.tgz";
|
||||
sha256 = "075k2z04d6svxqf9paj3xvp0mm0xzy0vbma1y61s0lkywdim8xjz";
|
||||
sha256 = "b7f86c794711792ca556ce41f8bc7043dffc395c01bb6d8d119bc2f454f89fbf";
|
||||
};
|
||||
|
||||
buildInputs = [ autoconf ];
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gambit-${version}";
|
||||
version = "4.8.8-435-gd1991ba7";
|
||||
version = "4.8.9";
|
||||
bootstrap = import ./bootstrap.nix ( pkgs );
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/feeley/gambit.git";
|
||||
rev = "d1991ba7e90ed0149964320f7cafa1a8289e61f0";
|
||||
sha256 = "02harwcsqxxcxgn2yc1y9kyxdp32mampyvnbxrzg2jzfmnp5g6cm";
|
||||
rev = "dd54a71dfc0bd09813592f1645d755867a02195d";
|
||||
sha256 = "120kg73k39gshrwas8a3xcrxgnq1c7ww92wgy4d3mmrwy3j9nzzc";
|
||||
};
|
||||
|
||||
# Use makeStaticLibraries to enable creation of statically linked binaries
|
||||
|
||||
@@ -317,8 +317,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
# Trick that should be taken out once we have a mips64el-linux not loongson2f
|
||||
optional (targetPlatform == hostPlatform && stdenv.system == "mips64el-linux") "--with-arch=loongson2f"
|
||||
# Trick that should be taken out once we have a mipsel-linux not loongson2f
|
||||
optional (targetPlatform == hostPlatform && stdenv.system == "mipsel-linux") "--with-arch=loongson2f"
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gerbil-${version}";
|
||||
|
||||
version = "0.12-DEV-1404-g0a266db";
|
||||
version = "0.12-RELEASE";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/vyzo/gerbil.git";
|
||||
rev = "0a266db5e2e241272711bc150cc2607204bf2b78";
|
||||
sha256 = "1lvawqn8havfyxkkgfqffc213zq2pgm179l42yj49fy3fhpzia4m";
|
||||
rev = "5618892d7939e1cb4ef5247912e0bc1ec99f6b52";
|
||||
sha256 = "0b2valahf5k81r4sp6y12d44fb286p92s7k6dphij0kmvg0dp818";
|
||||
};
|
||||
|
||||
# Use makeStaticLibraries to enable creation of statically linked binaries
|
||||
|
||||
@@ -138,7 +138,7 @@ stdenv.mkDerivation rec {
|
||||
targetPrefix = "";
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.0.4";
|
||||
};
|
||||
|
||||
meta.license = stdenv.lib.licenses.bsd3;
|
||||
|
||||
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
|
||||
targetPrefix = "";
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.0.4";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -171,7 +171,7 @@ stdenv.mkDerivation rec {
|
||||
inherit llvmPackages;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.10.3";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -140,7 +140,7 @@ stdenv.mkDerivation rec {
|
||||
targetPrefix = "";
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.4.2";
|
||||
};
|
||||
|
||||
meta.license = stdenv.lib.licenses.bsd3;
|
||||
|
||||
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
|
||||
targetPrefix = "";
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.4.2";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -86,7 +86,7 @@ in stdenv.mkDerivation rec {
|
||||
targetPrefix = "";
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.6.3";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
|
||||
targetPrefix = "";
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-7.8.4";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -172,7 +172,7 @@ stdenv.mkDerivation rec {
|
||||
inherit llvmPackages;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-8.0.2";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -191,7 +191,7 @@ stdenv.mkDerivation rec {
|
||||
inherit llvmPackages;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-8.2.2";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
# platform). Static libs are always built.
|
||||
enableShared ? true
|
||||
|
||||
, version ? "8.4.0.20180204"
|
||||
, version ? "8.4.0.20180224"
|
||||
, # Whether to backport https://phabricator.haskell.org/D4388 for
|
||||
# deterministic profiling symbol names, at the cost of a slightly
|
||||
# non-standard GHC API
|
||||
@@ -77,8 +77,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.haskell.org/ghc.git";
|
||||
rev = "111737cd218751f06ea58d3cf2c7c144265b5dfc";
|
||||
sha256 = "0ksp0k3sp928aq2cv6whgbfmjnr7l2j10diha13nncksp4byf0s9";
|
||||
rev = "a1e15c8f59092ef2d11be7966bd20688d8dc01e6";
|
||||
sha256 = "1pimf5ryl76r3vwnc2n0qzk4yh7zckp2r2g5rlz8nbddsws2v893";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -190,7 +190,7 @@ stdenv.mkDerivation rec {
|
||||
inherit llvmPackages;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-8.4.1";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -180,7 +180,7 @@ stdenv.mkDerivation rec {
|
||||
inherit llvmPackages;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc";
|
||||
haskellCompilerName = "ghc-8.5";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
206
pkgs/development/compilers/graalvm/default.nix
Normal file
206
pkgs/development/compilers/graalvm/default.nix
Normal file
@@ -0,0 +1,206 @@
|
||||
{ stdenv, lib, fetchFromGitHub, fetchhg, fetchurl, mercurial, python27, zlib, makeWrapper, oraclejdk8 }:
|
||||
|
||||
let
|
||||
# pre-download some cache entries ('mx' will not be able to download under nixbld1)
|
||||
makeMxCache = list:
|
||||
stdenv.mkDerivation {
|
||||
name = "mx-cache";
|
||||
buildCommand = ''
|
||||
mkdir $out
|
||||
${lib.concatMapStrings ({url, name, sha1}: ''
|
||||
ln -s ${fetchurl { inherit url sha1; }} $out/${name}
|
||||
echo -n ${sha1} > $out/${name}.sha1
|
||||
'') list}
|
||||
'';
|
||||
};
|
||||
|
||||
jvmci8-mxcache = [
|
||||
rec { sha1 = "66215826a684eb6866d4c14a5a4f9c344f1d1eef"; name = "JACOCOCORE_${sha1}.jar"; url = mirror://maven/org/jacoco/org.jacoco.core/0.7.9/org.jacoco.core-0.7.9.jar; }
|
||||
rec { sha1 = "a365ee459836b2aa18028929923923d15f0c3af9"; name = "JACOCOCORE.sources_${sha1}.jar"; url = mirror://maven/org/jacoco/org.jacoco.core/0.7.9/org.jacoco.core-0.7.9-sources.jar; }
|
||||
rec { sha1 = "8a7f78fdf2a4e58762890d8e896a9298c2980c10"; name = "JACOCOREPORT_${sha1}.jar"; url = mirror://maven/org/jacoco/org.jacoco.report/0.7.9/org.jacoco.report-0.7.9.jar; }
|
||||
rec { sha1 = "e6703ef288523a8e63fa756d8adeaa70858d41b0"; name = "JACOCOREPORT.sources_${sha1}.jar"; url = mirror://maven/org/jacoco/org.jacoco.report/0.7.9/org.jacoco.report-0.7.9-sources.jar; }
|
||||
rec { sha1 = "306816fb57cf94f108a43c95731b08934dcae15c"; name = "JOPTSIMPLE_4_6_${sha1}.jar"; url = mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar; }
|
||||
rec { sha1 = "9cd14a61d7aa7d554f251ef285a6f2c65caf7b65"; name = "JOPTSIMPLE_4_6.sources_${sha1}.jar"; url = mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-sources.jar; }
|
||||
rec { sha1 = "b852fb028de645ad2852bbe998e084d253f450a5"; name = "JMH_GENERATOR_ANNPROCESS_1_18_${sha1}.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.18/jmh-generator-annprocess-1.18.jar; }
|
||||
rec { sha1 = "d455b0dc6108b5e6f1fb4f6cf1c7b4cbedbecc97"; name = "JMH_GENERATOR_ANNPROCESS_1_18.sources_${sha1}.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.18/jmh-generator-annprocess-1.18-sources.jar; }
|
||||
rec { sha1 = "702b8525fcf81454235e5e2fa2a35f15ffc0ec7e"; name = "ASM_DEBUG_ALL_${sha1}.jar"; url = mirror://maven/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar; }
|
||||
rec { sha1 = "ec2544ab27e110d2d431bdad7d538ed509b21e62"; name = "COMMONS_MATH3_3_2_${sha1}.jar"; url = mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar; }
|
||||
rec { sha1 = "cd098e055bf192a60c81d81893893e6e31a6482f"; name = "COMMONS_MATH3_3_2.sources_${sha1}.jar"; url = mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2-sources.jar; }
|
||||
rec { sha1 = "0174aa0077e9db596e53d7f9ec37556d9392d5a6"; name = "JMH_1_18_${sha1}.jar"; url = mirror://maven/org/openjdk/jmh/jmh-core/1.18/jmh-core-1.18.jar; }
|
||||
rec { sha1 = "7ff1e1aafea436b6aa8b29a8b8f1c2d66be26f5b"; name = "JMH_1_18.sources_${sha1}.jar"; url = mirror://maven/org/openjdk/jmh/jmh-core/1.18/jmh-core-1.18-sources.jar; }
|
||||
rec { sha1 = "2973d150c0dc1fefe998f834810d68f278ea58ec"; name = "JUNIT_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/junit-4.12.jar; }
|
||||
rec { sha1 = "a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa"; name = "JUNIT.sources_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/junit-4.12-sources.jar; }
|
||||
rec { sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0"; name = "HAMCREST_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hamcrest-core-1.3.jar; }
|
||||
rec { sha1 = "1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b"; name = "HAMCREST.sources_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hamcrest-core-1.3-sources.jar; }
|
||||
rec { sha1 = "0d031013db9a80d6c88330c42c983fbfa7053193"; name = "hsdis_${sha1}.so"; url = https://lafo.ssw.uni-linz.ac.at/pub/hsdis/intel/hsdis-amd64-linux-0d031013db9a80d6c88330c42c983fbfa7053193.so; }
|
||||
];
|
||||
|
||||
graal-mxcache = jvmci8-mxcache ++ [
|
||||
rec { sha1 = "f2cfb09cee12469ff64f0d698b13de19903bb4f7"; name = "NanoHTTPD-WebSocket_${sha1}.jar"; url = mirror://maven/org/nanohttpd/nanohttpd-websocket/2.3.1/nanohttpd-websocket-2.3.1.jar; }
|
||||
rec { sha1 = "a8d54d1ca554a77f377eff6bf9e16ca8383c8f6c"; name = "NanoHTTPD_${sha1}.jar"; url = mirror://maven/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.jar; }
|
||||
rec { sha1 = "aca5eb39e2a12fddd6c472b240afe9ebea3a6733"; name = "org.json_${sha1}.jar"; url = mirror://maven/org/json/json/20160810/json-20160810.jar; }
|
||||
rec { sha1 = "fdedd5f2522122102f0b3db85fe7aa563a009926"; name = "JLINE_${sha1}.jar"; url = mirror://maven/jline/jline/2.14.5/jline-2.14.5.jar; }
|
||||
rec { sha1 = "476d9a44cd19d6b55f81571077dfa972a4f8a083"; name = "JAVA_ALLOCATION_INSTRUMENTER_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/java-allocation-instrumenter/java-allocation-instrumenter-8f0db117e64e.jar; }
|
||||
rec { sha1 = "0da08b8cce7bbf903602a25a3a163ae252435795"; name = "ASM5_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-5.0.4.jar; }
|
||||
rec { sha1 = "396ce0c07ba2b481f25a70195c7c94922f0d1b0b"; name = "ASM_TREE5_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-tree-5.0.4.jar; }
|
||||
rec { sha1 = "280c265b789e041c02e5c97815793dfc283fb1e6"; name = "LIBFFI_${sha1}.tar.gz"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/libffi-3.2.1.tar.gz; }
|
||||
rec { sha1 = "616a4fca49c5d610a3354e78cd97e7627024bb66"; name = "GSON_SHADOWED_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/gson-shadowed-2.2.4.jar; }
|
||||
rec { sha1 = "b13337a4ffd095c2e27ea401dc6edfca0d23a6e4"; name = "GSON_SHADOWED.sources_${sha1}.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/gson-shadowed-2.2.4-sources.jar; }
|
||||
];
|
||||
|
||||
in rec {
|
||||
|
||||
mx = stdenv.mkDerivation {
|
||||
name = "mx";
|
||||
src = fetchFromGitHub {
|
||||
owner = "graalvm";
|
||||
repo = "mx";
|
||||
rev = "22557cf7ec417c49aca20c13a9123045005d72d0"; # HEAD at 2018-02-16
|
||||
sha256 = "070647ih2qzcssj7yripbg1w9bjwi1rcp1blx5z3jbp1shrr6563";
|
||||
};
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildPhase = ''
|
||||
substituteInPlace mx --replace /bin/pwd pwd
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -dpR * $out/bin
|
||||
wrapProgram $out/bin/mx --prefix PATH : ${lib.makeBinPath [ python27 mercurial ]}
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/graalvm/mx;
|
||||
description = "Command-line tool used for the development of Graal projects";
|
||||
license = licenses.unfree;
|
||||
platforms = python27.meta.platforms;
|
||||
};
|
||||
};
|
||||
|
||||
# copy of pkgs.oraclejvm8 with JVMCI interface (TODO: it should work with pkgs.openjdk8 too)
|
||||
jvmci8 = stdenv.mkDerivation rec {
|
||||
version = "0.41";
|
||||
name = let
|
||||
n = "jvmci8u161-${version}";
|
||||
in if (lib.stringLength n) == (lib.stringLength oraclejdk8.name) then
|
||||
n
|
||||
else
|
||||
throw "length of string `${n}' must be equal to the length of `${oraclejdk8.name}'";
|
||||
src = fetchFromGitHub {
|
||||
owner = "graalvm";
|
||||
repo = "graal-jvmci-8";
|
||||
rev = "jvmci-${version}";
|
||||
sha256 = "0pajf114l8lzczfdzz968c3s1ardiy4q5ya8p2kmwxl06giy95qr";
|
||||
};
|
||||
buildInputs = [ mx mercurial ];
|
||||
postUnpack = ''
|
||||
# a fake mercurial dir to prevent mx crash and supply the version to mx
|
||||
( cd $sourceRoot
|
||||
hg init
|
||||
hg add
|
||||
hg commit -m 'dummy commit'
|
||||
hg tag ${lib.escapeShellArg src.rev}
|
||||
hg checkout ${lib.escapeShellArg src.rev}
|
||||
)
|
||||
'';
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-error=format-overflow" # newly detected by gcc7
|
||||
];
|
||||
buildPhase = ''
|
||||
cp -dpR ${oraclejdk8} writable-copy-of-jdk
|
||||
chmod +w -R writable-copy-of-jdk
|
||||
|
||||
export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild
|
||||
export MX_CACHE_DIR=${makeMxCache jvmci8-mxcache}
|
||||
mx --java-home $(pwd)/writable-copy-of-jdk build
|
||||
'';
|
||||
installPhase = ''
|
||||
mv jdk1.8.0_*/linux-amd64/product $out
|
||||
find $out -type f -exec sed -i "s#${oraclejdk8}#$out#g" {} \;
|
||||
'';
|
||||
dontStrip = true; # why? see in oraclejdk derivation
|
||||
inherit (oraclejdk8) meta;
|
||||
};
|
||||
|
||||
graalvm8 = stdenv.mkDerivation rec {
|
||||
version = "0.31";
|
||||
name = let
|
||||
n = "graal-vm-8-${version}";
|
||||
in if (lib.stringLength n) == (lib.stringLength jvmci8.name) then
|
||||
n
|
||||
else
|
||||
throw "length of string `${n}' must be equal to the length of `${jvmci8.name}'";
|
||||
src = fetchFromGitHub {
|
||||
owner = "oracle";
|
||||
repo = "graal";
|
||||
rev = "vm-enterprise-${version}";
|
||||
sha256 = "0rhd6dk2jpbxgdprqvdk991b2k177jrjgyjabdnmv5lzlhczy676";
|
||||
};
|
||||
buildInputs = [ mx zlib mercurial jvmci8 ];
|
||||
postUnpack = ''
|
||||
# a fake mercurial dir to prevent mx crash and supply the version to mx
|
||||
( cd $sourceRoot
|
||||
hg init
|
||||
hg add
|
||||
hg commit -m 'dummy commit'
|
||||
hg tag ${lib.escapeShellArg src.rev}
|
||||
hg checkout ${lib.escapeShellArg src.rev}
|
||||
)
|
||||
'';
|
||||
buildPhase = ''
|
||||
# make a copy of jvmci8
|
||||
cp -dpR ${jvmci8} $out
|
||||
chmod +w -R $out
|
||||
find $out -type f -exec sed -i "s#${jvmci8}#$out#g" {} \;
|
||||
|
||||
export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild
|
||||
export MX_CACHE_DIR=${makeMxCache graal-mxcache}
|
||||
( cd substratevm; mx --java-home $out build --no-daemon )
|
||||
'';
|
||||
installPhase = ''
|
||||
# add graal files
|
||||
mkdir -p $out/jre/tools/{profiler,chromeinspector}
|
||||
cp -pR substratevm/svmbuild/native-image-root/linux-amd64/bin/* $out/jre/bin/
|
||||
cp -pLR substratevm/svmbuild/native-image-root/lib/* $out/jre/lib/ || true # ignore "same file" error when dereferencing symlinks
|
||||
cp -pLR substratevm/svmbuild/native-image-root/tools/* $out/jre/tools/
|
||||
cp -pR $MX_ALT_OUTPUT_ROOT/truffle/dists/* $out/jre/lib/truffle/
|
||||
cp -pR $MX_ALT_OUTPUT_ROOT/tools/dists/truffle-profiler* $out/jre/tools/profiler/
|
||||
cp -pR $MX_ALT_OUTPUT_ROOT/tools/dists/chromeinspector* $out/jre/tools/chromeinspector/
|
||||
echo "name=GraalVM ${version}" > $out/jre/lib/amd64/server/vm.properties
|
||||
ln -s --relative $out/jre/bin/native-image $out/bin/native-image
|
||||
cp $out/jre/tools/nfi/bin/libtrufflenfi.so $out/jre/lib/amd64/
|
||||
cp -dpR $out/jre/lib/svm/clibraries $out/jre/lib/svm/builder/
|
||||
|
||||
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
|
||||
substituteInPlace $out/jre/lib/security/java.security \
|
||||
--replace file:/dev/random file:/dev/./urandom \
|
||||
--replace NativePRNGBlocking SHA1PRNG
|
||||
'';
|
||||
dontStrip = true; # why? see in oraclejdk derivation
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
echo ${lib.escapeShellArg ''
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World");
|
||||
}
|
||||
}
|
||||
''} > HelloWorld.java
|
||||
$out/bin/javac HelloWorld.java
|
||||
|
||||
# run on JVM with Graal Compiler
|
||||
$out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld
|
||||
$out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
|
||||
|
||||
# Ahead-Of-Time compilation
|
||||
$out/bin/native-image -no-server HelloWorld
|
||||
./helloworld
|
||||
./helloworld | fgrep 'Hello World'
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/oracle/graal;
|
||||
description = "High-Performance Polyglot VM";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ volth ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
|
||||
|
||||
let
|
||||
version = "1.2.21";
|
||||
version = "1.2.30";
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit version;
|
||||
name = "kotlin-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
|
||||
sha256 = "08mg0xl6n5kl71rn4ix6innqa7dlirmw1rlj9qwmqv5abp9wpwn5";
|
||||
sha256 = "0wg08cncwfajxfx8860wdf5dr4h92j069qvdr90l5m01ff3nasad";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ jre ] ;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import ./generic.nix {
|
||||
major_version = "4";
|
||||
minor_version = "06";
|
||||
patch_version = "0";
|
||||
sha256 = "1dy542yfnnw10zvh5s9qzswliq11mg7l0bcyss3501qw3vwvadhj";
|
||||
patch_version = "1";
|
||||
sha256 = "1n3pygfssd6nkrq876wszm5nm3v4605q4k16a66h1nmq9wvf01vg";
|
||||
|
||||
# If the executable is stipped it does not work
|
||||
dontStrip = true;
|
||||
|
||||
@@ -145,7 +145,6 @@ let
|
||||
url = "https://github.com/apple/swift-llbuild/commit/303a89bc6da606c115560921a452686aa0655f5e.diff";
|
||||
sha256 = "04sw7ym1grzggj1v3xrzr2ljxz8rf9rnn9n5fg1xjbwlrdagkc7m";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "swift-${version_friendly}";
|
||||
@@ -247,6 +246,9 @@ stdenv.mkDerivation rec {
|
||||
# https://bugs.swift.org/browse/SR-5779
|
||||
sed -i -e 's|"-latomic"|"-Wl,-rpath,${clang.cc.gcc.lib}/lib" "-L${clang.cc.gcc.lib}/lib" "-latomic"|' swift/cmake/modules/AddSwift.cmake
|
||||
|
||||
# https://bugs.swift.org/browse/SR-4838
|
||||
sed -i -e '30i#include <functional>' lldb/include/lldb/Utility/TaskPool.h
|
||||
|
||||
substituteInPlace clang/lib/Driver/ToolChains.cpp \
|
||||
--replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \
|
||||
' addPathIfExists(D, SysRoot + "/usr/lib", Paths); addPathIfExists(D, "${glibc}/lib", Paths);'
|
||||
@@ -287,7 +289,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# TODO: Use wrappers to get these on the PATH for swift tools, instead
|
||||
ln -s ${clang}/bin/* $out/bin/
|
||||
ln -s ${targetPackages.stdenv.cc.bintools}/bin/ar $out/bin/ar
|
||||
ln -s ${targetPackages.stdenv.cc.bintools.bintools_bin}/bin/ar $out/bin/ar
|
||||
|
||||
wrapProgram $out/bin/swift \
|
||||
--suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \
|
||||
|
||||
Reference in New Issue
Block a user