Merge staging-next into staging
This commit is contained in:
@@ -17,36 +17,71 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
nativeBuildInputs = [ graalvm11-ce glibcLocales ];
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
BABASHKA_JAR = src;
|
||||
BABASHKA_BINARY = "bb";
|
||||
BABASHKA_XMX = "-J-Xmx4500m";
|
||||
|
||||
buildPhase = ''
|
||||
native-image \
|
||||
-jar ${src} \
|
||||
-H:Name=bb \
|
||||
${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \
|
||||
-H:+ReportExceptionStackTraces \
|
||||
-J-Dclojure.spec.skip-macros=true \
|
||||
-J-Dclojure.compiler.direct-linking=true \
|
||||
"-H:IncludeResources=BABASHKA_VERSION" \
|
||||
"-H:IncludeResources=SCI_VERSION" \
|
||||
-H:ReflectionConfigurationFiles=${reflectionJson} \
|
||||
--initialize-at-build-time \
|
||||
-H:Log=registerResource: \
|
||||
-H:EnableURLProtocols=http,https \
|
||||
--enable-all-security-services \
|
||||
-H:+JNI \
|
||||
--verbose \
|
||||
--no-fallback \
|
||||
--no-server \
|
||||
--report-unsupported-elements-at-runtime \
|
||||
"--initialize-at-run-time=org.postgresql.sspi.SSPIClient" \
|
||||
"-J-Xmx4500m"
|
||||
runHook preBuild
|
||||
|
||||
# https://github.com/babashka/babashka/blob/77daea7362d8e2562c89c315b1fbcefde6fa56a5/script/compile
|
||||
args=("-jar" "$BABASHKA_JAR"
|
||||
"-H:Name=$BABASHKA_BINARY"
|
||||
"${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''}"
|
||||
"-H:+ReportExceptionStackTraces"
|
||||
"-J-Dclojure.spec.skip-macros=true"
|
||||
"-J-Dclojure.compiler.direct-linking=true"
|
||||
"-H:IncludeResources=BABASHKA_VERSION"
|
||||
"-H:IncludeResources=SCI_VERSION"
|
||||
"-H:ReflectionConfigurationFiles=${reflectionJson}"
|
||||
"--initialize-at-build-time"
|
||||
# "-H:+PrintAnalysisCallTree"
|
||||
# "-H:+DashboardAll"
|
||||
# "-H:DashboardDump=reports/dump"
|
||||
# "-H:+DashboardPretty"
|
||||
# "-H:+DashboardJson"
|
||||
"-H:Log=registerResource:"
|
||||
"-H:EnableURLProtocols=http,https,jar"
|
||||
"--enable-all-security-services"
|
||||
"-H:+JNI"
|
||||
"--verbose"
|
||||
"--no-fallback"
|
||||
"--no-server"
|
||||
"--report-unsupported-elements-at-runtime"
|
||||
"--initialize-at-run-time=org.postgresql.sspi.SSPIClient"
|
||||
"--native-image-info"
|
||||
"--verbose"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileReader"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.MidiFileReader"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.MixerProvider"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.FormatConversionProvider"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileWriter"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.MidiDeviceProvider"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.SoundbankReader"
|
||||
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.MidiFileWriter"
|
||||
"$BABASHKA_XMX")
|
||||
|
||||
native-image ''${args[@]}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp bb $out/bin/bb
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/bb --version | grep '${version}'
|
||||
$out/bin/bb '(+ 1 2)' | grep '3'
|
||||
$out/bin/bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' | grep '[1 2]'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, fetchurl, glibc, libX11, libXt, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rebol-nightly";
|
||||
version = "3-alpha";
|
||||
src = fetchFromGitHub {
|
||||
rev = "bd45d0de512ff5953e098301c3d610f6024515d6";
|
||||
owner = "earl";
|
||||
repo = "r3";
|
||||
sha256 = "0pirn6936rxi894xxdvj7xdwlwmmxq2wz36jyjnj26667v2n543c";
|
||||
};
|
||||
|
||||
r3 = fetchurl {
|
||||
url = "http://rebolsource.net/downloads/experimental/r3-linux-x64-gbf237fc";
|
||||
sha256 = "0cm86kn4lcbvyy6pqg67x53y0wz353y0vg7pfqv65agxj1ynxnrx";
|
||||
name = "r3";
|
||||
};
|
||||
|
||||
buildInputs = [ glibc libX11 libXt perl ];
|
||||
|
||||
configurePhase = ''
|
||||
cp ${r3} make/r3-make
|
||||
chmod 777 make/r3-make
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./make/r3-make
|
||||
cd make
|
||||
perl -pi -e 's#-m32##g' makefile
|
||||
perl -pi -e 's#sudo .*#echo#g' makefile
|
||||
make prep
|
||||
'';
|
||||
buildPhase = ''
|
||||
make
|
||||
mkdir -p $out/bin
|
||||
cp r3 $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Relative expression based object language, a language where code is data";
|
||||
maintainers = with maintainers; [ vrthra ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.asl20;
|
||||
homepage = "http://www.rebol.com/";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user