Merge staging-next into staging
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
, fetchurl, perl, gcc
|
||||
, ncurses6, gmp, glibc, libiconv, numactl
|
||||
, llvmPackages
|
||||
|
||||
# minimal = true; will remove files that aren't strictly necessary for
|
||||
# regular builds and GHC bootstrapping.
|
||||
# This is "useful" for staying within hydra's output limits for at least the
|
||||
# aarch64-linux architecture.
|
||||
# Examples of unnecessary files are the bundled documentation and files that
|
||||
# are only needed for profiling builds.
|
||||
, minimal ? false
|
||||
}:
|
||||
|
||||
# Prebuilt only does native
|
||||
@@ -172,6 +180,13 @@ stdenv.mkDerivation rec {
|
||||
for file in $(find "$out" -name setup-config); do
|
||||
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
|
||||
done
|
||||
'' +
|
||||
stdenv.lib.optionalString minimal ''
|
||||
# Remove profiling objects
|
||||
find $out -type f -name '*.p_o' -delete
|
||||
rm $out/lib/ghc-*/bin/ghc-iserv-prof
|
||||
# Remove docs
|
||||
rm -r $out/share/{doc,man}
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
@@ -195,11 +210,18 @@ stdenv.mkDerivation rec {
|
||||
enableShared = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = let
|
||||
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
|
||||
in {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
|
||||
|
||||
# The minimal variation can not be distributed because it removes the
|
||||
# documentation, including licensing information that is required for
|
||||
# distribution.
|
||||
inherit platforms;
|
||||
hydraPlatforms = stdenv.lib.optionals (!minimal) platforms;
|
||||
maintainers = with stdenv.lib.maintainers; [ lostnet ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "gleam";
|
||||
version = "0.11.2";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gleam-lang";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1g8yfp1xpkv1lqz8azam40cvrs5cggxlyrb72h8k88br75qmi6hj";
|
||||
sha256 = "1hlbskpfqdh5avmqnry69s7x0wj6l6yaqkayx7lj6z99p58p9zrz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
|
||||
buildInputs = [ openssl ] ++
|
||||
stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
cargoSha256 = "1gfr6c4i5kx8x3q23s4b4n25z2k6xkxpk12acr4ry97pyj2lr5wq";
|
||||
cargoSha256 = "1djznh7v6ha4ks8l8arwwn301qclmb7iih774q5y7sbzqrv7sw0q";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A statically typed language for the Erlang VM";
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
{ stdenv, fetchurl, perl, unzip, glibc, zlib, setJavaClassPath }:
|
||||
|
||||
let
|
||||
common = javaVersion:
|
||||
let
|
||||
graalvmXXX-ce = stdenv.mkDerivation rec {
|
||||
pname = "graalvm${javaVersion}-ce";
|
||||
version = "20.2.0";
|
||||
srcs = [
|
||||
(fetchurl {
|
||||
sha256 = { "8" = "1s64zkkrns1ykh6dwpjrqy0hs9m1bb08cf7ss7msx33h9ivir5b0";
|
||||
"11" = "0aaf0sjsnlckhgsh3j4lph0shahw6slf4yndqcm2swc8i1dlpdsx";
|
||||
}.${javaVersion};
|
||||
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/graalvm-ce-java${javaVersion}-linux-amd64-${version}.tar.gz";
|
||||
})
|
||||
(fetchurl {
|
||||
sha256 = { "8" = "1cisyyzab4pdvzavnivhy9w6dwn36ybaxw40w767m142fbi06m3b";
|
||||
"11" = "0p4j6mxajmb0xl41c79154pk4vb8bffgg1nmwislahqjky9jkd4j";
|
||||
}.${javaVersion};
|
||||
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/native-image-installable-svm-java${javaVersion}-linux-amd64-${version}.jar";
|
||||
})
|
||||
(fetchurl {
|
||||
sha256 = { "8" = "0rwwvk1mkfnl0b50xg7kh6015kjmsw2ra0ckrzmabl88z4bnzh2y";
|
||||
"11" = "0lc9as2a00j74lp7jby4p10vn5bbkiydzvzk28zfcbsp28p4wvwn";
|
||||
}.${javaVersion};
|
||||
url = "https://github.com/oracle/truffleruby/releases/download/vm-${version}/ruby-installable-svm-java${javaVersion}-linux-amd64-${version}.jar";
|
||||
})
|
||||
(fetchurl {
|
||||
sha256 = { "8" = "0mj8p72qgvvrwpsbk0bsqldynlz1wq07icf951wq5xdbr0whj1gz";
|
||||
"11" = "1lkszqn4islsza011iabayv6riym0dwnkv83pkmk06b230qjfhzb";
|
||||
}.${javaVersion};
|
||||
url = "https://github.com/graalvm/graalpython/releases/download/vm-${version}/python-installable-svm-java${javaVersion}-linux-amd64-${version}.jar";
|
||||
})
|
||||
(fetchurl {
|
||||
sha256 = { "8" = "1br7camk7y8ych43ws57096100f9kzjvqznh2flmws78ipcrrb66";
|
||||
"11" = "10swxspjvzh0j82lbpy38dckk69lw1pawqkhnj1hxd05ls36fwq5";
|
||||
}.${javaVersion};
|
||||
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/wasm-installable-svm-java${javaVersion}-linux-amd64-${version}.jar";
|
||||
})
|
||||
];
|
||||
nativeBuildInputs = [ unzip perl ];
|
||||
unpackPhase = ''
|
||||
unpack_jar() {
|
||||
jar=$1
|
||||
unzip -o $jar -d $out
|
||||
perl -ne 'use File::Path qw(make_path);
|
||||
use File::Basename qw(dirname);
|
||||
if (/^(.+) = (.+)$/) {
|
||||
make_path dirname("$ENV{out}/$1");
|
||||
system "ln -s $2 $ENV{out}/$1";
|
||||
}' $out/META-INF/symlinks
|
||||
perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) {
|
||||
my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) +
|
||||
($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) +
|
||||
($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0);
|
||||
chmod $mode, "$ENV{out}/$1";
|
||||
}' $out/META-INF/permissions
|
||||
rm -rf $out/META-INF
|
||||
}
|
||||
|
||||
mkdir -p $out
|
||||
arr=($srcs)
|
||||
tar xf ''${arr[0]} -C $out --strip-components=1
|
||||
unpack_jar ''${arr[1]}
|
||||
unpack_jar ''${arr[2]}
|
||||
unpack_jar ''${arr[3]}
|
||||
unpack_jar ''${arr[4]}
|
||||
'';
|
||||
|
||||
installPhase = {
|
||||
"8" = ''
|
||||
# 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
|
||||
|
||||
# provide libraries needed for static compilation
|
||||
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
|
||||
ln -s $f $out/jre/lib/svm/clibraries/linux-amd64/$(basename $f)
|
||||
done
|
||||
|
||||
# allow using external truffle-api.jar and languages not included in the distrubution
|
||||
rm $out/jre/lib/jvmci/parentClassLoader.classpath
|
||||
'';
|
||||
"11" = ''
|
||||
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
|
||||
substituteInPlace $out/conf/security/java.security \
|
||||
--replace file:/dev/random file:/dev/./urandom \
|
||||
--replace NativePRNGBlocking SHA1PRNG
|
||||
|
||||
# provide libraries needed for static compilation
|
||||
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
|
||||
ln -s $f $out/lib/svm/clibraries/linux-amd64/$(basename $f)
|
||||
done
|
||||
'';
|
||||
}.${javaVersion};
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
# copy-paste openjdk's preFixup
|
||||
preFixup = ''
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
rpath="${ { "8" = "$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64";
|
||||
"11" = "$out/lib/jli:$out/lib/server:$out/lib";
|
||||
}.${javaVersion}
|
||||
}:${
|
||||
stdenv.lib.makeLibraryPath [
|
||||
stdenv.cc.cc.lib # libstdc++.so.6
|
||||
zlib # libz.so.1
|
||||
]}"
|
||||
|
||||
for f in $(find $out -type f -perm -0100); do
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" || true
|
||||
patchelf --set-rpath "$rpath" "$f" || true
|
||||
|
||||
if ldd "$f" | fgrep 'not found'; then echo "in file $f"; fi
|
||||
done
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ setJavaClassPath zlib ]; # $out/bin/native-image needs zlib to build native executables
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
echo ${stdenv.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 | fgrep 'Hello World'
|
||||
|
||||
# Ahead-Of-Time compilation
|
||||
$out/bin/native-image --no-server HelloWorld
|
||||
./helloworld | fgrep 'Hello World'
|
||||
|
||||
# Ahead-Of-Time compilation with --static
|
||||
$out/bin/native-image --no-server --static HelloWorld
|
||||
./helloworld | fgrep 'Hello World'
|
||||
'';
|
||||
|
||||
passthru.home = graalvmXXX-ce;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://www.graalvm.org/";
|
||||
description = "High-Performance Polyglot VM";
|
||||
license = with licenses; [ upl gpl2Classpath bsd3 ];
|
||||
maintainers = with maintainers; [ bandresen volth hlolli glittershark ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
graalvmXXX-ce;
|
||||
in {
|
||||
graalvm8-ce = common "8";
|
||||
graalvm11-ce = common "11";
|
||||
}
|
||||
@@ -1,42 +1,43 @@
|
||||
{ llvmPackages, lib, fetchFromGitHub, cmake
|
||||
, libpng, libjpeg, mesa, eigen
|
||||
, openblas, blas, lapack
|
||||
{ llvmPackages
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, libpng
|
||||
, libjpeg
|
||||
, mesa
|
||||
, eigen
|
||||
, openblas
|
||||
, blas
|
||||
, lapack
|
||||
}:
|
||||
|
||||
assert blas.implementation == "openblas" && lapack.implementation == "openblas";
|
||||
|
||||
let
|
||||
version = "2019_08_27";
|
||||
|
||||
in llvmPackages.stdenv.mkDerivation {
|
||||
|
||||
name = "halide-${builtins.replaceStrings ["_"] ["."] version}";
|
||||
llvmPackages.stdenv.mkDerivation rec {
|
||||
pname = "halide";
|
||||
version = "10.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "halide";
|
||||
repo = "Halide";
|
||||
rev = "release_${version}";
|
||||
sha256 = "09xf8v9zyxx2fn6s1yzjkyzcf9zyzrg3x5vivgd2ljzbfhm8wh7n";
|
||||
rev = "v${version}";
|
||||
sha256 = "0il71rppjp76m7zd420siidvhs76sqiq26h60ywk812sj9mmgxj6";
|
||||
};
|
||||
|
||||
patches = [ ./nix.patch ];
|
||||
|
||||
# clang fails to compile intermediate code because
|
||||
# of unused "--gcc-toolchain" option
|
||||
postPatch = ''
|
||||
sed -i "s/-Werror//" src/CMakeLists.txt
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DWARNINGS_AS_ERRORS=OFF" ];
|
||||
cmakeFlags = [ "-DWARNINGS_AS_ERRORS=OFF" "-DWITH_PYTHON_BINDINGS=OFF" ];
|
||||
|
||||
# To handle the lack of 'local' RPATH; required, as they call one of
|
||||
# their built binaries requiring their libs, in the build process.
|
||||
preBuild = ''
|
||||
export LD_LIBRARY_PATH="$(pwd)/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
export LD_LIBRARY_PATH="$(pwd)/src''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Note: only openblas and not atlas part of this Nix expression
|
||||
# see pkgs/development/libraries/science/math/liblapack/3.5.0.nix
|
||||
# to get a hint howto setup atlas instead of openblas
|
||||
@@ -44,24 +45,11 @@ in llvmPackages.stdenv.mkDerivation {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
# No install target for cmake available.
|
||||
# Calling install target in Makefile causes complete rebuild
|
||||
# and the library rpath is broken, because libncursesw.so.6 is missing.
|
||||
# Another way is using "make halide_archive", but the tarball is not easy
|
||||
# to disassemble.
|
||||
installPhase = ''
|
||||
find
|
||||
mkdir -p "$out/lib" "$out/bin"
|
||||
cp bin/HalideTrace* "$out/bin"
|
||||
cp lib/libHalide.so "$out/lib"
|
||||
cp -r include "$out"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ based language for image processing and computational photography";
|
||||
homepage = "https://halide-lang.org";
|
||||
license = licenses.mit;
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
|
||||
maintainers = [ maintainers.ck3d ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4ba384324..7e23038f7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -75,10 +75,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
set(LLVM_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}")
|
||||
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-as${CMAKE_EXECUTABLE_SUFFIX}" LLVM_AS)
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-nm${CMAKE_EXECUTABLE_SUFFIX}" LLVM_NM)
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" CLANG)
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-config${CMAKE_EXECUTABLE_SUFFIX}" LLVM_CONFIG)
|
||||
+find_program(LLVM_AS llvm-as HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
+find_program(LLVM_NM llvm-nm HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
+find_program(CLANG clang HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
+find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
|
||||
# LLVM doesn't appear to expose --system-libs via its CMake interface,
|
||||
# so we must shell out to llvm-config to find this info
|
||||
diff --git a/apps/linear_algebra/CMakeLists.txt b/apps/linear_algebra/CMakeLists.txt
|
||||
index 132c80e6a..36ce865f2 100644
|
||||
--- a/apps/linear_algebra/CMakeLists.txt
|
||||
+++ b/apps/linear_algebra/CMakeLists.txt
|
||||
@@ -26,7 +26,7 @@ if (CBLAS_FOUND)
|
||||
# Atlas requires also linking against its provided libcblas for cblas symbols
|
||||
set(ATLAS_EXTRA_LIBS cblas) # XXX fragile
|
||||
set(OpenBLAS_EXTRA_LIBS)
|
||||
- set(BLAS_VENDORS OpenBLAS ATLAS)
|
||||
+ set(BLAS_VENDORS OpenBLAS)
|
||||
|
||||
# TODO
|
||||
# there are more vendors we could add here that support the cblas interface
|
||||
@@ -41,6 +41,7 @@ if (CBLAS_FOUND)
|
||||
message(STATUS " ${BLAS_VENDOR}: Missing")
|
||||
else()
|
||||
message(STATUS " ${BLAS_VENDOR}: Found")
|
||||
+ set(BLAS_LIBRARIES "${BLAS_LIBRARIES}" CACHE FILEPATH "BLAS library to use")
|
||||
list(APPEND BLAS_VENDORS ${NAME})
|
||||
endif()
|
||||
endforeach()
|
||||
diff --git a/apps/linear_algebra/tests/CMakeLists.txt b/apps/linear_algebra/tests/CMakeLists.txt
|
||||
index cc02eb0a4..c20419a0d 100644
|
||||
--- a/apps/linear_algebra/tests/CMakeLists.txt
|
||||
+++ b/apps/linear_algebra/tests/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ target_compile_options(test_halide_blas PRIVATE -Wno-unused-variable)
|
||||
target_link_libraries(test_halide_blas
|
||||
PRIVATE
|
||||
halide_blas
|
||||
- cblas # XXX fragile
|
||||
+ ${BLAS_LIBRARIES}
|
||||
${HALIDE_COMPILER_LIB}
|
||||
)
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "owl-lisp";
|
||||
version = "0.1.19";
|
||||
version = "0.1.23";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "owl-lisp";
|
||||
repo = "owl";
|
||||
rev = "v${version}";
|
||||
sha256 = "1bgjd2gkr5risfcc401rlr5fc82gwm4r2gpp9gzkg9h64acivkjx";
|
||||
sha256 = "1indcbicqcdlk9sinkdyhk50fi1b4cb7yrr14vr874gjzmwr2l3i";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ which ];
|
||||
|
||||
Reference in New Issue
Block a user