pharo-vm: Add third-party libraries to LD_LIBRARY_PATH of legacy VM

This commit adds the third party libraries needed by the default Pharo
environment to the LD_LIBRARY_PATH, by using makeWrapper.
This commit is contained in:
Balletie 2017-05-10 21:15:20 +02:00
parent d55f8276ae
commit 96600d5770
No known key found for this signature in database
GPG Key ID: A728847A61ACE466
3 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xorg, alsaLib, cairo, ... }:
{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xorg, alsaLib, cairo, libuuid, makeWrapper, ... }:
{ name, src, ... }:
@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
cd build/
'';
resources = ./resources;
installPhase = ''
mkdir -p "$prefix/lib/$name"
@ -40,10 +41,15 @@ stdenv.mkDerivation rec {
chmod +x $prefix/bin/pharo-cog
# Add cairo library to the library path.
wrapProgram $prefix/bin/pharo-cog --prefix LD_LIBRARY_PATH : ${LD_LIBRARY_PATH}
ln -s "${pharo-share}/lib/"*.sources $prefix/lib/$name
'';
buildInputs = [ bash unzip cmake glibc openssl gcc mesa freetype xorg.libX11 xorg.libICE xorg.libSM alsaLib cairo pharo-share ];
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ cairo mesa freetype openssl libuuid alsaLib xorg.libICE xorg.libSM ];
nativeBuildInputs = [ unzip cmake gcc makeWrapper ];
buildInputs = [ bash glibc openssl mesa freetype xorg.libX11 xorg.libICE xorg.libSM alsaLib cairo pharo-share ];
meta = {
description = "Clean and innovative Smalltalk-inspired environment";

View File

@ -1,4 +1,4 @@
{ stdenv, callPackage, callPackage_i686, ...} @pkgs:
{ stdenv, callPackage, callPackage_i686, makeWrapper, ...} @pkgs:
let
i686 = callPackage_i686 ./vms.nix {};

View File

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