pharo6: Minor fixes and cleanups

This commit is contained in:
Luke Gorrie 2017-06-29 18:09:06 +00:00
parent fdb90f6df7
commit 54be67dbd0
3 changed files with 15 additions and 16 deletions

View file

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
cat > $prefix/bin/${executable-name} <<EOF
#!${bash}/bin/bash
exec ${pharo}/bin/pharo $prefix/share/pharo-launcher/pharo-launcher.image
exec "${pharo}/bin/pharo" $prefix/share/pharo-launcher/pharo-launcher.image
EOF
chmod +x $prefix/bin/${executable-name}
'';
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
secs=5
echo -n "Running headless Pharo for $secs seconds to check for a crash... "
timeout $secs \
${pharo}/bin/pharo -nodisplay PharoLauncher.image --no-quit eval 'true'
"${pharo}/bin/pharo" -nodisplay PharoLauncher.image --no-quit eval 'true'
test "$?" == 124 && echo "ok")
'';

View file

@ -31,7 +31,9 @@ stdenv.mkDerivation rec {
# Regenerate the configure script.
# Unnecessary? But the build breaks without this.
autoreconfPhase = ''
(cd opensmalltalk-vm/platforms/unix/config && make)
pushd opensmalltalk-vm/platforms/unix/config
make
popd
'';
# Configure with options modeled on the 'mvm' build script from the vm.
@ -67,30 +69,28 @@ stdenv.mkDerivation rec {
make install-squeak install-plugins prefix=$(pwd)/products
# Copy binaries & rename from 'squeak' to 'pharo'
mkdir -p $out
cp products/lib/squeak/5.0-*/squeak $out/pharo
cp -r products/lib/squeak/5.0-*/*.so $out
ln -s "${pharo-share}/lib/"*.sources $out
mkdir -p "$out"
cp products/lib/squeak/5.0-*/squeak "$out/pharo"
cp -r products/lib/squeak/5.0-*/*.so "$out"
ln -s "${pharo-share}/lib/"*.sources "$out"
# Create a shell script to run the VM in the proper environment.
#
#
# These wrapper puts all relevant libraries into the
# LD_LIBRARY_PATH. This is important because various C code in the VM
# and Smalltalk code in the image will search for them there.
mkdir -p $out/bin
chmod u+w $out/bin
mkdir -p "$out/bin"
# Note: include ELF rpath in LD_LIBRARY_PATH for finding libc.
libs=$out:$(patchelf --print-rpath $out/pharo):${cairo}/lib:${mesa}/lib:${freetype}/lib:${openssl}/lib:${libuuid}/lib:${alsaLib}/lib:${xorg.libICE}/lib:${xorg.libSM}/lib
libs=$out:$(patchelf --print-rpath "$out/pharo"):${cairo}/lib:${mesa}/lib:${freetype}/lib:${openssl}/lib:${libuuid}/lib:${alsaLib}/lib:${xorg.libICE}/lib:${xorg.libSM}/lib
# Create the script
cat > $out/bin/${cmd} <<EOF
cat > "$out/bin/${cmd}" <<EOF
#!/bin/sh
set -f
LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:$libs" exec $out/pharo "\$@"
EOF
chmod +x $prefix/bin/${cmd}
chmod +x "$out/bin/${cmd}"
'';
enableParallelBuilding = true;
@ -98,7 +98,6 @@ stdenv.mkDerivation rec {
# Note: Force gcc6 because gcc5 crashes when compiling the VM.
buildInputs = [ bash unzip glibc openssl gcc6 mesa freetype xorg.libX11 xorg.libICE xorg.libSM alsaLib cairo pharo-share libuuid autoreconfHook ];
meta = {
description = "Clean and innovative Smalltalk-inspired environment";
longDescription = ''

View file

@ -1,7 +1,7 @@
{ stdenv, file, makeDesktopItem, cog32, spur32, spur64 ? "none" }:
stdenv.mkDerivation rec {
name = "pharo-vm";
name = "pharo";
src = ./.;
inherit cog32 spur32 spur64 file;
magic = ./magic;