summary refs log tree commit diff
path: root/pkgs/applications/science/misc/openmodelica/combined/default.nix
blob: 459a325111e21e281ab8f909af4ff629dbf8309f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, lib, openmodelica, symlinkJoin, gnumake, blas, lapack, makeWrapper }:
symlinkJoin {
  name = "openmodelica-combined";
  paths = with openmodelica; [
    omcompiler
    omsimulator
    omplot
    omparser
    omedit
    omlibrary
    omshell
  ];

  buildInputs = [ gnumake makeWrapper ];

  postBuild = ''
    wrapProgram $out/bin/OMEdit \
      --prefix PATH : ${lib.makeBinPath [ gnumake stdenv.cc ]} \
      --prefix LIBRARY_PATH : "${lib.makeLibraryPath [ blas lapack ]}" \
      --set-default OPENMODELICALIBRARY "${openmodelica.omlibrary}/lib/omlibrary"
  '';

  meta = with lib; {
    description = "An open-source Modelica-based modeling and simulation environment intended for industrial and academic usage";
    homepage = "https://openmodelica.org";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ smironov ];
    platforms = platforms.linux;
  };
}