Skip to content

Commit

Permalink
pharo-vm: Add third-party libraries to LD_LIBRARY_PATH of legacy VM
Browse files Browse the repository at this point in the history
This commit adds the third party libraries needed by the default Pharo
environment to the LD_LIBRARY_PATH, by using makeWrapper.
  • Loading branch information
Balletie committed Jun 30, 2017
1 parent d55f827 commit 96600d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions pkgs/development/pharo/vm/build-vm-legacy.nix
Original file line number Diff line number Diff line change
@@ -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, ... }:

Expand All @@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
cd build/
'';
resources = ./resources;

installPhase = ''
mkdir -p "$prefix/lib/$name"
Expand All @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/pharo/vm/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, callPackage, callPackage_i686, ...} @pkgs:
{ stdenv, callPackage, callPackage_i686, makeWrapper, ...} @pkgs:

let
i686 = callPackage_i686 ./vms.nix {};
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/pharo/vm/vms.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 96600d5

Please sign in to comment.