openmodelica: Fix runtime PATHs using wrapProgram, fixes #8949

authored by Sergey Mironov and committed by Rok Garbas 80d6b708 9bb0fee4

+10 -2
+10 -2
pkgs/applications/science/misc/openmodelica/default.nix
··· 1 1 {stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake, 2 2 hwloc, jre, liblapack, blas, hdf5, expat, ncurses, readline, qt4, webkit, which, 3 3 lp_solve, omniorb, sqlite, libatomic_ops, pkgconfig, file, gettext, flex, bison, 4 - doxygen, boost, openscenegraph, gnome, pangox_compat, xlibs, git, bash, gtk }: 4 + doxygen, boost, openscenegraph, gnome, pangox_compat, xlibs, git, bash, gtk, makeWrapper }: 5 5 6 6 let 7 7 ··· 18 18 hwloc jre liblapack blas hdf5 expat ncurses readline qt4 webkit which 19 19 lp_solve omniorb sqlite libatomic_ops pkgconfig file gettext flex bison 20 20 doxygen boost openscenegraph gnome.gtkglext pangox_compat xlibs.libXmu 21 - git gtk]; 21 + git gtk makeWrapper]; 22 22 23 23 patchPhase = '' 24 24 cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh ··· 28 28 configurePhase = '' 29 29 autoconf 30 30 ./configure CC=${clang}/bin/clang CXX=${clang}/bin/clang++ --prefix=$out 31 + ''; 32 + 33 + postFixup = '' 34 + for e in $(cd $out/bin && ls); do 35 + wrapProgram $out/bin/$e \ 36 + --prefix PATH : "${gnumake}/bin" \ 37 + --prefix LIBRARY_PATH : "${liblapack}/lib:${blas}/lib" 38 + done 31 39 ''; 32 40 33 41 meta = with stdenv.lib; {