Skip to content

nextflow: add version 23.04.1 #239

Merged
merged 1 commit into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 86 additions & 0 deletions nextflow-23.04.1-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#! /bin/bash

set -xe
umask 022

PKG=nextflow
VERSION=23.04.1
BUILD=0
JDK=/pkg/openjdk-17.0.2.8-0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$USER/$PKG-$VERSION-$BUILD ; fi

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ; fi
EOF
. $PREFIX/profile

BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD-$USER.build.tmp
test -d $BUILD_TMPDIR && rm -r $BUILD_TMPDIR
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
mkdir -p $HOME

BUILDDIR=$PREFIX/build
mkdir -p $BUILDDIR

cd $BUILDDIR

source /pkg/openjdk-17.0.2.8-0/profile

# the '-all' file is a zip archive ...
# orig: https://github.com/nextflow-io/nextflow/releases/download/v23.04.1/nextflow-23.04.1-all
BEEHIVE=https://beehive.molgen.mpg.de/95c40ead6d16a7a0dc12fdf6c2bfe557/nextflow-23.04.1-all
test -e nextflow-$VERSION-all || wget -nv $BEEHIVE

# effect: this extracts to $HOME/.nextflow/capsule/apps/nextflow-all_23.04.1
bash nextflow-$VERSION-all info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not build it from source?


# 'install' jars under $PREFIX/lib
cd $PREFIX
rm -fr bin lib
mkdir bin lib
mv $HOME/.nextflow/capsule/apps/nextflow-all_$VERSION lib

# create a straightforward launcher
cat <<- LAUNCHER > bin/nextflow
#! /bin/bash

NF_XTMPDIR=\${NF_XTMPDIR:-/scratch/local2/\$USER/nextflow_tmp}

mkdir -vp "\$NF_XTMPDIR"

exec $JDK/bin/java \\
--add-opens=java.base/java.lang=ALL-UNNAMED \\
--add-opens=java.base/java.io=ALL-UNNAMED \\
--add-opens=java.base/java.nio=ALL-UNNAMED \\
--add-opens=java.base/java.net=ALL-UNNAMED \\
--add-opens=java.base/java.util=ALL-UNNAMED \\
--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED \\
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \\
--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED \\
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \\
--add-opens=java.base/sun.nio.fs=ALL-UNNAMED \\
--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED \\
--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED \\
--add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED \\
--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED \\
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED \\
--add-opens=java.base/java.util.regex=ALL-UNNAMED \\
\\
-Djava.io.tmpdir="\$NF_XTMPDIR" \\
-Dfile.encoding=UTF-8 \\
-Djava.awt.headless=true \\
-Dcom.sun.security.enableAIAcaIssuers=true \\
-classpath '$PREFIX/lib/nextflow-all_$VERSION/*' \\
nextflow.cli.Launcher \\
"\${@+\$@}"

LAUNCHER

chmod -c +x bin/nextflow

exit