1{
2 stdenv,
3 lib,
4 openmodelica,
5 symlinkJoin,
6 gnumake,
7 blas,
8 lapack,
9 makeWrapper,
10}:
11symlinkJoin {
12 name = "openmodelica-combined";
13 paths = with openmodelica; [
14 omcompiler
15 omsimulator
16 omplot
17 omparser
18 omedit
19 omlibrary
20 omshell
21 ];
22
23 nativeBuildInputs = [ makeWrapper ];
24
25 postBuild = ''
26 wrapProgram $out/bin/OMEdit \
27 --prefix PATH : ${
28 lib.makeBinPath [
29 gnumake
30 stdenv.cc
31 ]
32 } \
33 --prefix LIBRARY_PATH : "${
34 lib.makeLibraryPath [
35 blas
36 lapack
37 ]
38 }" \
39 --set-default OPENMODELICALIBRARY "${openmodelica.omlibrary}/lib/omlibrary"
40 '';
41
42 meta = with lib; {
43 description = "Open-source Modelica-based modeling and simulation environment intended for industrial and academic usage";
44 homepage = "https://openmodelica.org";
45 license = licenses.gpl3Only;
46 maintainers = with maintainers; [
47 balodja
48 smironov
49 ];
50 platforms = platforms.linux;
51 };
52}