1{
2 lib,
3 stdenv,
4 fetchgit,
5 bash,
6 openmodelica,
7 mkOpenModelicaDerivation,
8}:
9let
10 fakegit = import ./fakegit.nix {
11 inherit
12 lib
13 stdenv
14 fetchgit
15 bash
16 ;
17 };
18in
19mkOpenModelicaDerivation {
20 pname = "omlibrary";
21 omdir = "libraries";
22 omtarget = "omlibrary-all";
23 omdeps = [ openmodelica.omcompiler ];
24
25 postPatch = ''
26 patchShebangs --build libraries
27 cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh
28
29 # The EMOTH library is broken in OpenModelica 1.17.0
30 # Let's remove it from targets.
31 sed -i -e '/^OTHER_LIBS=/ s/EMOTH //' libraries/Makefile.libs
32 '';
33
34 meta = with lib; {
35 description = "Collection of Modelica libraries to use with OpenModelica,
36including Modelica Standard Library";
37 homepage = "https://openmodelica.org";
38 license = licenses.gpl3Only;
39 maintainers = with maintainers; [
40 balodja
41 smironov
42 ];
43 platforms = platforms.linux;
44 };
45}