summary refs log tree commit diff
path: root/pkgs/development/pharo
diff options
context:
space:
mode:
authorLuke Gorrie <luke@snabb.co>2017-06-29 18:09:06 +0000
committerLuke Gorrie <luke@snabb.co>2017-06-29 18:09:06 +0000
commit54be67dbd03b0ede6dccce34581367995d3c1fd8 (patch)
tree5affacffba80ed25c969e29da4ecf81adcbe04e6 /pkgs/development/pharo
parentfdb90f6df720b44f0475e42657a2f6c09797b42a (diff)
downloadnixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.tar
nixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.tar.gz
nixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.tar.bz2
nixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.tar.lz
nixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.tar.xz
nixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.tar.zst
nixpkgs-54be67dbd03b0ede6dccce34581367995d3c1fd8.zip
pharo6: Minor fixes and cleanups
Diffstat (limited to 'pkgs/development/pharo')
-rw-r--r--pkgs/development/pharo/launcher/default.nix4
-rw-r--r--pkgs/development/pharo/vm/build-vm.nix25
-rw-r--r--pkgs/development/pharo/wrapper/default.nix2
3 files changed, 15 insertions, 16 deletions
diff --git a/pkgs/development/pharo/launcher/default.nix b/pkgs/development/pharo/launcher/default.nix
index a54a6671d7f..9cec6e81ae6 100644
--- a/pkgs/development/pharo/launcher/default.nix
+++ b/pkgs/development/pharo/launcher/default.nix
@@ -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")
   '';
 
diff --git a/pkgs/development/pharo/vm/build-vm.nix b/pkgs/development/pharo/vm/build-vm.nix
index 02399ecb9c2..e2ed4dcb239 100644
--- a/pkgs/development/pharo/vm/build-vm.nix
+++ b/pkgs/development/pharo/vm/build-vm.nix
@@ -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 = ''
diff --git a/pkgs/development/pharo/wrapper/default.nix b/pkgs/development/pharo/wrapper/default.nix
index bd37c31df6a..f60b8a6d203 100644
--- a/pkgs/development/pharo/wrapper/default.nix
+++ b/pkgs/development/pharo/wrapper/default.nix
@@ -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;