summary refs log tree commit diff
path: root/pkgs/applications/science/misc/openmodelica
diff options
context:
space:
mode:
authorSergey Mironov <Sergey.Mironov@kaspersky.com>2015-07-22 16:43:01 +0300
committerRok Garbas <rok@garbas.si>2015-07-23 20:42:42 +0200
commit80d6b708ac4d6573c361eedf64ebbe87ec3ce53e (patch)
tree0e99abf81f58dd4cf7d803e7decae7a311f4b534 /pkgs/applications/science/misc/openmodelica
parent9bb0fee487f639671768bbaa2412cd9c8956c493 (diff)
downloadnixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.tar
nixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.tar.gz
nixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.tar.bz2
nixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.tar.lz
nixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.tar.xz
nixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.tar.zst
nixlib-80d6b708ac4d6573c361eedf64ebbe87ec3ce53e.zip
openmodelica: Fix runtime PATHs using wrapProgram, fixes #8949
Diffstat (limited to 'pkgs/applications/science/misc/openmodelica')
-rw-r--r--pkgs/applications/science/misc/openmodelica/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/applications/science/misc/openmodelica/default.nix b/pkgs/applications/science/misc/openmodelica/default.nix
index 8420d445e099..3741187067dd 100644
--- a/pkgs/applications/science/misc/openmodelica/default.nix
+++ b/pkgs/applications/science/misc/openmodelica/default.nix
@@ -1,7 +1,7 @@
 {stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake,
 hwloc, jre, liblapack, blas, hdf5, expat, ncurses, readline, qt4, webkit, which,
 lp_solve, omniorb, sqlite, libatomic_ops, pkgconfig, file, gettext, flex, bison,
-doxygen, boost, openscenegraph, gnome, pangox_compat, xlibs, git, bash, gtk }:
+doxygen, boost, openscenegraph, gnome, pangox_compat, xlibs, git, bash, gtk, makeWrapper }:
 
 let
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     hwloc jre liblapack blas hdf5 expat ncurses readline qt4 webkit which
     lp_solve omniorb sqlite libatomic_ops pkgconfig file gettext flex bison
     doxygen boost openscenegraph gnome.gtkglext pangox_compat xlibs.libXmu
-    git gtk];
+    git gtk makeWrapper];
 
   patchPhase = ''
     cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh
@@ -30,6 +30,14 @@ stdenv.mkDerivation {
     ./configure CC=${clang}/bin/clang CXX=${clang}/bin/clang++ --prefix=$out
   '';
 
+  postFixup = ''
+    for e in $(cd $out/bin && ls); do
+      wrapProgram $out/bin/$e \
+        --prefix PATH : "${gnumake}/bin" \
+        --prefix LIBRARY_PATH : "${liblapack}/lib:${blas}/lib"
+    done
+  '';
+
   meta = with stdenv.lib; {
     description = "OpenModelica is an open-source Modelica-based modeling and simulation environment";
     homepage    = "https://openmodelica.org";