Add the Pharo language and IDE package

http://pharo.org

I'm one of the developers of Pharo and the creator and maintainer of the
Ubuntu PPA : https://launchpad.net/~pharo/+archive/stable.

authored by

Damien Cassou and committed by
Rob Vermaas
8efdaa0a b6e2a52b

+222
+79
pkgs/development/pharo/vm/default.nix
··· 1 + { stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xlibs, alsaLib }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "pharo-vm-core-i386-2014.06.25"; 5 + system = "x86_32-linux"; 6 + src = fetchurl { 7 + url = http://files.pharo.org/vm/src/vm-unix-sources/pharo-vm-2014.06.25.tar.bz2; 8 + md5 = "4d80d8169c2f2f0355c43ee90bbad23f"; 9 + }; 10 + 11 + sources10Zip = fetchurl { 12 + url = http://files.pharo.org/sources/PharoV10.sources.zip; 13 + md5 = "3476222a0345a6f8f8b6093b5e3b30fb"; 14 + }; 15 + 16 + sources20Zip = fetchurl { 17 + url = http://files.pharo.org/sources/PharoV20.sources.zip; 18 + md5 = "a145b0733f9d68d9ce6a76270b6b9ec8"; 19 + }; 20 + 21 + sources30Zip = fetchurl { 22 + url = http://files.pharo.org/sources/PharoV30.sources.zip; 23 + md5 = "bb0a66b8968ef7d0da97ec86331f68c8"; 24 + }; 25 + 26 + # Building 27 + preConfigure = '' 28 + cd build/ 29 + ''; 30 + resources = ./resources; 31 + installPhase = '' 32 + echo Current directory $(pwd) 33 + echo Creating prefix "$prefix" 34 + mkdir -p "$prefix/lib/pharo-vm" 35 + 36 + cd ../../results 37 + 38 + mv vm-display-null vm-display-null.so 39 + mv vm-display-X11 vm-display-X11.so 40 + mv vm-sound-null vm-sound-null.so 41 + mv vm-sound-ALSA vm-sound-ALSA.so 42 + mv pharo pharo-vm 43 + 44 + cp * "$prefix/lib/pharo-vm" 45 + 46 + cp -R "$resources"/* "$prefix/" 47 + 48 + mkdir $prefix/bin 49 + 50 + chmod u+w $prefix/bin 51 + cat > $prefix/bin/pharo-vm-x <<EOF 52 + #!${bash}/bin/bash 53 + 54 + # disable parameter expansion to forward all arguments unprocessed to the VM 55 + set -f 56 + 57 + exec $prefix/lib/pharo-vm/pharo-vm "\$@" 58 + EOF 59 + 60 + cat > $prefix/bin/pharo-vm-nox <<EOF 61 + #!${bash}/bin/bash 62 + 63 + # disable parameter expansion to forward all arguments unprocessed to the VM 64 + set -f 65 + 66 + exec $prefix/lib/pharo-vm/pharo-vm -vm-display-null "\$@" 67 + EOF 68 + 69 + chmod +x $prefix/bin/pharo-vm-x $prefix/bin/pharo-vm-nox 70 + 71 + unzip ${sources10Zip} -d $prefix/lib/pharo-vm/ 72 + unzip ${sources20Zip} -d $prefix/lib/pharo-vm/ 73 + unzip ${sources30Zip} -d $prefix/lib/pharo-vm/ 74 + ''; 75 + 76 + patches = [ patches/pharo-is-not-squeak.patch patches/fix-executable-name.patch patches/fix-cmake-root-directory.patch ]; 77 + 78 + buildInputs = [ bash unzip cmake glibc openssl gcc mesa freetype xlibs.libX11 xlibs.libICE xlibs.libSM alsaLib ]; 79 + }
+84
pkgs/development/pharo/vm/patches/fix-cmake-root-directory.patch
··· 1 + From: Damien Cassou <damien.cassou@gmail.com> 2 + Subject: Fix use of absolute paths in cmake files 3 + 4 + * build/directories.cmake 5 + * build/CMakeLists.txt 6 + * build/vm-sound-ALSA/CMakeLists.txt 7 + * build/vm-sound-null/CMakeLists.txt 8 + * build/vm-display-null/CMakeLists.txt 9 + * build/vm-display-X11/CMakeLists.txt 10 + --- a/build/CMakeLists.txt 11 + +++ b/build/CMakeLists.txt 12 + @@ -71,7 +71,7 @@ 13 + list(APPEND LINKLIBS m) 14 + list(APPEND LINKLIBS dl) 15 + list(APPEND LINKLIBS pthread) 16 + -set(EXECUTABLE_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results") 17 + +set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results") 18 + add_subdirectory("vm-display-null") 19 + add_subdirectory("vm-display-X11") 20 + add_subdirectory("vm-sound-ALSA") 21 + --- a/build/directories.cmake 22 + +++ b/build/directories.cmake 23 + @@ -1,12 +1,12 @@ 24 + -set(topDir "/builds/workspace/Pharo-vm-unix-sources/cog") 25 + -set(buildDir "/builds/workspace/Pharo-vm-unix-sources/cog/build") 26 + +set(topDir "${CMAKE_SOURCE_DIR}/..") 27 + +set(buildDir "${CMAKE_SOURCE_DIR}/../build") 28 + set(thirdpartyDir "${buildDir}/thirdParty") 29 + -set(platformsDir "/builds/workspace/Pharo-vm-unix-sources/cog/platforms") 30 + -set(srcDir "/builds/workspace/Pharo-vm-unix-sources/cog/src") 31 + +set(platformsDir "${CMAKE_SOURCE_DIR}/../platforms") 32 + +set(srcDir "${CMAKE_SOURCE_DIR}/../src") 33 + set(srcPluginsDir "${srcDir}/plugins") 34 + set(srcVMDir "${srcDir}/vm") 35 + set(platformName "unix") 36 + set(targetPlatform ${platformsDir}/${platformName}) 37 + set(crossDir "${platformsDir}/Cross") 38 + set(platformVMDir "${targetPlatform}/vm") 39 + -set(outputDir "/builds/workspace/Pharo-vm-unix-sources/cog/results") 40 + +set(outputDir "${CMAKE_SOURCE_DIR}/../results") 41 + --- a/build/vm-display-X11/CMakeLists.txt 42 + +++ b/build/vm-display-X11/CMakeLists.txt 43 + @@ -11,7 +11,7 @@ 44 + include_directories(${crossDir}/plugins/FilePlugin) 45 + include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin) 46 + include_directories(${crossDir}/plugins/B3DAcceleratorPlugin) 47 + -set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results") 48 + +set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results") 49 + list(APPEND LINKLIBS SM) 50 + list(APPEND LINKLIBS ICE) 51 + list(APPEND LINKLIBS GL) 52 + --- a/build/vm-display-null/CMakeLists.txt 53 + +++ b/build/vm-display-null/CMakeLists.txt 54 + @@ -11,7 +11,7 @@ 55 + include_directories(${crossDir}/plugins/FilePlugin) 56 + include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin) 57 + include_directories(${crossDir}/plugins/B3DAcceleratorPlugin) 58 + -set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results") 59 + +set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results") 60 + target_link_libraries(vm-display-null ${LINKLIBS}) 61 + set_target_properties(vm-display-null PROPERTIES PREFIX "" SUFFIX "" 62 + LINK_FLAGS -m32) 63 + --- a/build/vm-sound-ALSA/CMakeLists.txt 64 + +++ b/build/vm-sound-ALSA/CMakeLists.txt 65 + @@ -11,7 +11,7 @@ 66 + include_directories(${crossDir}/plugins/FilePlugin) 67 + include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin) 68 + include_directories(${crossDir}/plugins/B3DAcceleratorPlugin) 69 + -set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results") 70 + +set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results") 71 + target_link_libraries(vm-sound-ALSA ${LINKLIBS}) 72 + set_target_properties(vm-sound-ALSA PROPERTIES PREFIX "" SUFFIX "" 73 + LINK_FLAGS -m32) 74 + --- a/build/vm-sound-null/CMakeLists.txt 75 + +++ b/build/vm-sound-null/CMakeLists.txt 76 + @@ -11,7 +11,7 @@ 77 + include_directories(${crossDir}/plugins/FilePlugin) 78 + include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin) 79 + include_directories(${crossDir}/plugins/B3DAcceleratorPlugin) 80 + -set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results") 81 + +set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results") 82 + target_link_libraries(vm-sound-null ${LINKLIBS}) 83 + set_target_properties(vm-sound-null PROPERTIES PREFIX "" SUFFIX "" 84 + LINK_FLAGS -m32)
+14
pkgs/development/pharo/vm/patches/fix-executable-name.patch
··· 1 + Change the name of the executable file from Squeak to Pharo 2 + --- a/platforms/unix/vm-display-X11/sqUnixX11.c 3 + +++ b/platforms/unix/vm-display-X11/sqUnixX11.c 4 + @@ -153,8 +153,8 @@ 5 + /*** Variables -- X11 Related ***/ 6 + 7 + /* name of Squeak windows in Xrm and the WM */ 8 + -#define xResClass "Squeak" 9 + -#define xResName "squeak" 10 + +#define xResClass "pharo-vm" 11 + +#define xResName "Pharo" 12 + 13 + char *displayName= 0; /* name of display, or 0 for $DISPLAY */ 14 + Display *stDisplay= null; /* Squeak display */
+23
pkgs/development/pharo/vm/patches/pharo-is-not-squeak.patch
··· 1 + pharo --help must talk about Pharo and not about Squeak 2 + --- a/platforms/unix/vm-display-X11/sqUnixX11.c 3 + +++ b/platforms/unix/vm-display-X11/sqUnixX11.c 4 + @@ -7075,8 +7075,8 @@ 5 + printf(" -lazy go to sleep when main window unmapped\n"); 6 + printf(" -mapdelbs map Delete key onto Backspace\n"); 7 + printf(" -nointl disable international keyboard support\n"); 8 + - printf(" -notitle disable the Squeak window title bar\n"); 9 + - printf(" -title <t> use t as the Squeak window title instead of the image name\n"); 10 + + printf(" -notitle disable the Pharo window title bar\n"); 11 + + printf(" -title <t> use t as the Pharo window title instead of the image name\n"); 12 + printf(" -ldtoms <n> launch drop timeout milliseconds\n"); 13 + printf(" -noxdnd disable X drag-and-drop protocol support\n"); 14 + printf(" -optmod <n> map Mod<n> to the Option key\n"); 15 + @@ -7095,7 +7095,7 @@ 16 + static void display_printUsageNotes(void) 17 + { 18 + printf(" Using `unix:0' for <dpy> may improve local display performance.\n"); 19 + - printf(" -xshm only works when Squeak is running on the X server host.\n"); 20 + + printf(" -xshm only works when Pharo is running on the X server host.\n"); 21 + } 22 + 23 +
+11
pkgs/development/pharo/vm/resources/share/applications/pharo-vm.desktop
··· 1 + [Desktop Entry] 2 + Name=Pharo VM 3 + GenericName=Pharo Virtual Machine 4 + Exec=pharo-vm-x %F 5 + Icon=pharo 6 + Terminal=false 7 + Type=Application 8 + StartupNotify=false 9 + Categories=Development; 10 + MimeType=application/x-pharo-image; 11 + NoDisplay=true
pkgs/development/pharo/vm/resources/share/icons/hicolor/16x16/apps/pharo.png

This is a binary file and will not be displayed.

pkgs/development/pharo/vm/resources/share/icons/hicolor/256x256/apps/pharo.png

This is a binary file and will not be displayed.

pkgs/development/pharo/vm/resources/share/icons/hicolor/32x32/apps/pharo.png

This is a binary file and will not be displayed.

pkgs/development/pharo/vm/resources/share/icons/hicolor/48x48/apps/pharo.png

This is a binary file and will not be displayed.

+9
pkgs/development/pharo/vm/resources/share/mime/packages/pharo-image.xml
··· 1 + <?xml version="1.0" encoding="UTF-8"?> 2 + <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> 3 + <mime-type type="application/x-pharo-image"> 4 + <comment>Pharo image file</comment> 5 + <comment xml:lang="fr">Fichier d'image Pharo</comment> 6 + <glob pattern="*.image"/> 7 + <icon name="pharo"/> 8 + </mime-type> 9 + </mime-info>
+2
pkgs/top-level/all-packages.nix
··· 3719 3719 3720 3720 guile-xcb = callPackage ../development/guile-modules/guile-xcb { }; 3721 3721 3722 + pharo-vm = callPackage_i686 ../development/pharo/vm { }; 3723 + 3722 3724 srecord = callPackage ../development/tools/misc/srecord { }; 3723 3725 3724 3726 windowssdk = (