17 stdenv.mkDerivation (finalAttrs: {
19 version = "10.3.1-6cdb1e5";
22 # It is necessary to download from there instead of from the repository because that archive
23 # also contains artifacts necessary for the bootstrapping.
24 url = "https://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/source/PharoVM-${finalAttrs.version}-Linux-x86_64-c-src.zip";
25 hash = "sha256-Oskbo0ZMh2Wr8uY9BjA54AhFVDEuzs4AN8cpO02gdfY=";
48 # Necessary to perform the bootstrapping without already having Pharo available.
49 "-DGENERATED_SOURCE_DIR=."
50 "-DALWAYS_INTERACTIVE=ON"
51 "-DBUILD_IS_RELEASE=ON"
52 "-DGENERATE_SOURCES=OFF"
53 # Prevents CMake from trying to download stuff.
60 cmake --build . --target=install
63 cp build/vm/*.so* "$out/lib/"
64 cp build/vm/pharo "$out/bin/pharo"
70 libPath = lib.makeLibraryPath (finalAttrs.buildInputs ++ [
75 patchelf --allowed-rpath-prefixes "$NIX_STORE" --shrink-rpath "$out/bin/pharo"
76 ln -s "${libgit2}/lib/libgit2.so" $out/lib/libgit2.so.1.1
77 wrapProgram "$out/bin/pharo" --argv0 $out/bin/pharo --prefix LD_LIBRARY_PATH ":" "${libPath}"
81 description = "Clean and innovative Smalltalk-inspired environment";
82 homepage = "https://pharo.org";
83 changelog = "https://github.com/pharo-project/pharo/releases/";
84 license = lib.licenses.mit;
86 Pharo's goal is to deliver a clean, innovative, free open-source
87 Smalltalk-inspired environment. By providing a stable and small core
88 system, excellent dev tools, and maintained releases, Pharo is an
89 attractive platform to build and deploy mission critical applications.
91 maintainers = with lib.maintainers; [ ehmry ];
92 mainProgram = "pharo";
93 platforms = lib.platforms.linux;