diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 593298af9fd..85a6d4599fb 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -114,6 +114,8 @@ - The default `kops` version is now 1.27.0 and support for 1.24 and older has been dropped. +- `pharo` has been updated to latest stable (PharoVM 10.0.5), which is compatible with the latest stable and oldstable images (Pharo 10 and 11). The VM in question is the 64bit Spur. The 32bit version has been dropped due to lack of maintenance. The Cog VM has been deleted because it is severily outdated. Finally, the `pharo-launcher` package has been deleted because it was not compatible with the newer VM, and due to lack of maintenance. + ## Other Notable Changes {#sec-release-23.11-notable-changes} - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration. diff --git a/pkgs/development/pharo/default.nix b/pkgs/development/pharo/default.nix new file mode 100644 index 00000000000..6e83a31d5dd --- /dev/null +++ b/pkgs/development/pharo/default.nix @@ -0,0 +1,99 @@ +{ cairo +, cmake +, fetchurl +, freetype +, gcc +, git +, gnumake +, lib +, libffi +, libgit2 +, libpng +, libuuid +, makeBinaryWrapper +, openssl +, pixman +, runtimeShell +, SDL2 +, stdenv +, unzip +}: +let + inherit (lib.strings) makeLibraryPath; + pharo-sources = fetchurl { + # It is necessary to download from there instead of from the repository because that archive + # also contains artifacts necessary for the bootstrapping. + url = "https://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/source/PharoVM-10.0.5-2757766-Linux-x86_64-c-src.zip"; + hash = "sha256-i6WwhdVdyzmqGlx1Fn12mCq5+HnRORT65HEiJo0joCE="; + }; + library_path = makeLibraryPath [ + libgit2 + SDL2 + cairo + "$out" + ]; +in +stdenv.mkDerivation { + pname = "pharo"; + version = "10.0.5"; + src = pharo-sources; + + buildInputs = [ + cairo + libgit2 + libpng + pixman + SDL2 + ]; + + nativeBuildInputs = [ + cmake + freetype + gcc + git + gnumake + libffi + libuuid + makeBinaryWrapper + openssl + pixman + SDL2 + unzip + ]; + + cmakeFlags = [ + # Necessary to perform the bootstrapping without already having Pharo available. + "-DGENERATED_SOURCE_DIR=." + "-DGENERATE_SOURCES=OFF" + # Prevents CMake from trying to download stuff. + "-DBUILD_BUNDLE=OFF" + ]; + + installPhase = '' + runHook preInstall + + cmake --build . --target=install + mkdir -p "$out/lib" + mkdir "$out/bin" + cp build/vm/*.so* "$out/lib/" + cp build/vm/pharo "$out/bin/pharo" + patchelf --allowed-rpath-prefixes /nix/store --shrink-rpath "$out/bin/pharo" + wrapProgram "$out/bin/pharo" --set LD_LIBRARY_PATH "${library_path}" + + runHook postInstall + ''; + + meta = with lib; { + description = "Clean and innovative Smalltalk-inspired environment"; + homepage = "https://pharo.org"; + license = licenses.mit; + longDescription = '' + Pharo's goal is to deliver a clean, innovative, free open-source + Smalltalk-inspired environment. By providing a stable and small core + system, excellent dev tools, and maintained releases, Pharo is an + attractive platform to build and deploy mission critical applications. + ''; + maintainers = [ ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/development/pharo/launcher/default.nix b/pkgs/development/pharo/launcher/default.nix deleted file mode 100644 index d8d3bcb2cdd..00000000000 --- a/pkgs/development/pharo/launcher/default.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ lib, stdenv, fetchurl, bash, pharo, unzip, makeDesktopItem }: - -stdenv.mkDerivation rec { - version = "2017.02.28"; - pname = "pharo-launcher"; - src = fetchurl { - url = "http://files.pharo.org/platform/launcher/PharoLauncher-user-stable-${version}.zip"; - sha256 = "1hfwjyx0c47s6ivc1zr2sf5mk1xw2zspsv0ns8mj3kcaglzqwiq0"; - }; - - executable-name = "pharo-launcher"; - - desktopItem = makeDesktopItem { - name = "Pharo"; - exec = executable-name; - icon = "pharo"; - comment = "Launcher for Pharo distributions"; - desktopName = "Pharo"; - genericName = "Pharo"; - categories = [ "Development" ]; - }; - - # because upstream tarball has no top-level directory. - sourceRoot = "."; - - nativeBuildInputs = [ unzip ]; - buildInputs = [ bash pharo ]; - - installPhase = '' - mkdir -p $prefix/share/pharo-launcher - mkdir -p $prefix/bin - - mv PharoLauncher.image $prefix/share/pharo-launcher/pharo-launcher.image - mv PharoLauncher.changes $prefix/share/pharo-launcher/pharo-launcher.changes - - mkdir -p $prefix/share/applications - cp "${desktopItem}/share/applications/"* $out/share/applications - - cat > $prefix/bin/${executable-name} < $prefix/bin/pharo-cog <= 4.9 produces a - # binary that crashes when forking a child process. See: - # http://forum.world.st/OSProcess-fork-issue-with-Debian-built-VM-td4947326.html - # - # (stack protection is disabled above for gcc 4.8 compatibility.) - nativeBuildInputs = [ autoreconfHook unzip ]; - buildInputs = [ - bash - glibc - openssl - gcc48 - libGLU libGL - freetype - xorg.libX11 - xorg.libICE - xorg.libSM - alsa-lib - cairo - pharo-share - libuuid - ]; - - enableParallelBuilding = true; - - # Regenerate the configure script. - # Unnecessary? But the build breaks without this. - autoreconfPhase = '' - pushd platforms/unix/config - make - popd - ''; - - # Configure with options modeled on the 'mvm' build script from the vm. - configureScript = "platforms/unix/config/configure"; - configureFlags = [ "--without-npsqueak" - "--with-vmversion=5.0" - "--with-src=${vm}" ]; - - # -fcommon is a workaround build failure on -fno-common toolchains like upstream - # gcc-10. Otherwise build fails as: - # ld: vm/vm.a(cogit.o):/build/source/spur64src/vm/cointerp.h:358: multiple definition of `checkAllocFiller'; - # vm/vm.a(gcc3x-cointerp.o):/build/source/spur64src/vm/cointerp.h:358: first defined here - env.NIX_CFLAGS_COMPILE = "-fcommon"; - - CFLAGS = "-DPharoVM -DIMMUTABILITY=1 -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -g -O2 -DNDEBUG -DDEBUGVM=0"; - LDFLAGS = "-Wl,-z,now"; - - # VM sources require some patching before build. - prePatch = '' - patchShebangs build.${flavor} - # Fix hard-coded path to /bin/rm in a script - sed -i -e 's:/bin/rm:rm:' platforms/unix/config/mkmf - # Fill in mandatory metadata about the VM source version - sed -i -e 's!\$Date\$!$Date: ${source-date} $!' \ - -e 's!\$Rev\$!$Rev: ${version} $!' \ - -e 's!\$URL\$!$URL: ${source-url} $!' \ - platforms/Cross/vm/sqSCCSVersion.h - ''; - - # Note: --with-vmcfg configure option is broken so copy plugin specs to ./ - preConfigure = '' - cp build."${flavor}"/pharo.cog.spur/plugins.{ext,int} . - ''; - - # (No special build phase.) - - installPhase = let - libs = [ - cairo - libgit2 - libGLU libGL - freetype - openssl - libuuid - alsa-lib - xorg.libICE - xorg.libSM - ]; - in '' - # Install in working directory and then copy - 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" - - # 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" - - # Note: include ELF rpath in LD_LIBRARY_PATH for finding libc. - libs=$out:$(patchelf --print-rpath "$out/pharo"):${lib.makeLibraryPath libs} - - # Create the script - cat > "$out/bin/${cmd}" < -# -# Select a VM and run an image based on the image format number - -PATH=$PATH:@file@/bin - -# Search for the image filename in the command line arguments -for arg in $* $SQUEAK_IMAGE; do - case ${arg} in - -*) # ignore - ;; - *) # either an option argument or the image name - if test -e ${arg}; then - magic=$(file -L -b -m @magic@ "$arg") - case "$magic" in - "Smalltalk image V3 32b"*) - image=${arg} - vm=@cog32@/bin/pharo-cog - ;; - "Smalltalk image Spur 32b"*) - image=${arg} - vm=@spur32@/bin/pharo-spur - ;; - "Smalltalk image Spur 64b"*) - if [ "@spur64vm@" == "none" ]; then - echo "error: detected 64-bit image but 64-bit VM is not available" >&2 - exit 1 - fi - image=${arg} - vm=@spur64@/bin/pharo-spur64 - ;; - esac - fi - ;; - esac -done - -# Print a message to explain our DWIM'ery. -if [ -n "$image" ]; then - echo "using VM selected by image type." - echo " image: $image" - echo " type: $magic" - echo " vm: $vm" -else - echo "using default vm; image type not detected" - vm=@cog32@/bin/pharo-cog -fi - -# Run the VM -set -f -exec -- "${vm}" "$@" - diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b68a0f55dad..f3b8e512013 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1278,6 +1278,10 @@ mapAliases ({ pg_tmp = throw "'pg_tmp' has been renamed to/replaced by 'ephemeralpg'"; # Converted to throw 2022-02-22 phantomjs = throw "phantomjs 1.9.8 has been dropped due to lack of maintenance and security issues"; # Added 2022-02-20 phantomjs2 = throw "phantomjs2 has been dropped due to lack of maintenance"; # Added 2022-04-22 + pharo-spur64 = pharo; # Added 2022-08-03 + pharo-spur32 = throw "pharo on 32bits is currently not supported due to lack of maintenance"; # Added 2022-08-03 + pharo-cog32 = throw "the cog32 VM has been outdated for about a decade now, time to move on"; # Added 2022-08-03 + pharo-launcher = throw "pharo launcher has been dropped due to lack of maintenance"; # Added 2022-08-03 philter = throw "philter has been removed: abandoned by upstream"; # Added 2022-04-26 phodav_2_0 = throw "'phodav_2_0' has been renamed to/replaced by 'phodav'"; # Added 2023-02-21 photoflow = throw "photoflow was removed because it was broken and unmaintained by upstream"; # Added 2023-03-10 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e1993a961c..67e9c52a6b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18086,12 +18086,7 @@ with pkgs; rappel = callPackage ../development/misc/rappel { }; - pharo-vms = callPackage ../development/pharo/vm { }; - pharo = pharo-vms.multi-vm-wrapper; - pharo-cog32 = pharo-vms.cog32; - pharo-spur32 = pharo-vms.spur32; - pharo-spur64 = assert stdenv.is64bit; pharo-vms.spur64; - pharo-launcher = callPackage ../development/pharo/launcher { }; + pharo = callPackage ../development/pharo { }; protege-distribution = callPackage ../development/web/protege-distribution { };