pharo: Simple fix for Iceberg (#52466)

* Simple fix for Iceberg
* Avoiding explicit libgit2 version assumption and removed libgit2 from buildInputs
This commit is contained in:
Jose San Leandro 2018-12-19 12:16:06 +01:00 committed by Jörg Thalheim
parent e5db0df0b5
commit 857853d5f1
2 changed files with 67 additions and 5 deletions

View File

@ -1,4 +1,19 @@
{ stdenv, fetchurl, bash, unzip, glibc, openssl, libGLU_combined, freetype, xorg, alsaLib, cairo, libuuid, autoreconfHook, gcc48, ... }:
{ stdenv
, fetchurl
, bash
, unzip
, glibc
, openssl
, libgit2
, libGLU_combined
, freetype
, xorg
, alsaLib
, cairo
, libuuid
, autoreconfHook
, gcc48
, ... }:
{ name, src, version, source-date, source-url, ... }:
@ -65,7 +80,19 @@ stdenv.mkDerivation rec {
# (No special build phase.)
installPhase = ''
installPhase = let
libs = [
cairo
libgit2
libGLU_combined
freetype
openssl
libuuid
alsaLib
xorg.libICE
xorg.libSM
];
in ''
# Install in working directory and then copy
make install-squeak install-plugins prefix=$(pwd)/products
@ -83,7 +110,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin"
# Note: include ELF rpath in LD_LIBRARY_PATH for finding libc.
libs=$out:$(patchelf --print-rpath "$out/pharo"):${cairo}/lib:${libGLU_combined}/lib:${freetype}/lib:${openssl}/lib:${libuuid}/lib:${alsaLib}/lib:${xorg.libICE}/lib:${xorg.libSM}/lib
libs=$out:$(patchelf --print-rpath "$out/pharo"):${stdenv.lib.makeLibraryPath libs}
# Create the script
cat > "$out/bin/${cmd}" <<EOF
@ -92,6 +119,7 @@ stdenv.mkDerivation rec {
LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:$libs" exec $out/pharo "\$@"
EOF
chmod +x "$out/bin/${cmd}"
ln -s ${libgit2}/lib/libgit2.so* "$out/"
'';
enableParallelBuilding = true;
@ -104,7 +132,22 @@ stdenv.mkDerivation rec {
#
# (stack protection is disabled above for gcc 4.8 compatibility.)
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ bash unzip glibc openssl gcc48 libGLU_combined freetype xorg.libX11 xorg.libICE xorg.libSM alsaLib cairo pharo-share libuuid ];
buildInputs = [
bash
unzip
glibc
openssl
gcc48
libGLU_combined
freetype
xorg.libX11
xorg.libICE
xorg.libSM
alsaLib
cairo
pharo-share
libuuid
];
meta = with stdenv.lib; {
description = "Clean and innovative Smalltalk-inspired environment";

View File

@ -1,4 +1,23 @@
{ cmake, stdenv, fetchurl, bash, unzip, glibc, openssl, gcc, libGLU_combined, freetype, xorg, alsaLib, cairo, libuuid, autoreconfHook, gcc48, fetchFromGitHub, makeWrapper} @args:
{ cmake
, stdenv
, fetchurl
, bash
, unzip
, glibc
, openssl
, gcc
, libgit2
, libGLU_combined
, freetype
, xorg
, alsaLib
, cairo
, libuuid
, autoreconfHook
, gcc48
, fetchFromGitHub
, makeWrapper
} @args:
let
pharo-vm-build = import ./build-vm.nix args;