summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-07-25 09:24:25 +0700
committerGitHub <noreply@github.com>2021-07-25 09:24:25 +0700
commit0f34985134fee2e36ecd78f32317ab27b52f0dc5 (patch)
tree922c0ed4f6aa0b99a23d6460e2111ff1ce54ac26 /pkgs/applications
parentecaf3da9340231e5493eccc3db87604a3705da42 (diff)
parent5c8561f11aac6250d787b35ba71f80ac1ab80a5c (diff)
downloadnixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.tar
nixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.tar.gz
nixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.tar.bz2
nixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.tar.lz
nixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.tar.xz
nixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.tar.zst
nixpkgs-0f34985134fee2e36ecd78f32317ab27b52f0dc5.zip
Merge pull request #122828 from balodja/openmodelica
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/misc/openmodelica/combined/default.nix30
-rw-r--r--pkgs/applications/science/misc/openmodelica/default.nix70
-rw-r--r--pkgs/applications/science/misc/openmodelica/fakegit.nix81
-rw-r--r--pkgs/applications/science/misc/openmodelica/mkderivation/default.nix101
-rw-r--r--pkgs/applications/science/misc/openmodelica/mkderivation/src-main.nix7
-rw-r--r--pkgs/applications/science/misc/openmodelica/omcompiler/default.nix63
-rw-r--r--pkgs/applications/science/misc/openmodelica/omedit/default.nix38
-rw-r--r--pkgs/applications/science/misc/openmodelica/omlibrary/default.nix37
-rw-r--r--pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix49
-rw-r--r--pkgs/applications/science/misc/openmodelica/omlibrary/src-libs.nix83
-rwxr-xr-xpkgs/applications/science/misc/openmodelica/omlibrary/update-src-libs.sh39
-rw-r--r--pkgs/applications/science/misc/openmodelica/omparser/Makefile.in.patch22
-rw-r--r--pkgs/applications/science/misc/openmodelica/omparser/default.nix28
-rw-r--r--pkgs/applications/science/misc/openmodelica/omplot/default.nix34
-rw-r--r--pkgs/applications/science/misc/openmodelica/omshell/default.nix40
-rw-r--r--pkgs/applications/science/misc/openmodelica/omsimulator/default.nix26
-rw-r--r--pkgs/applications/science/misc/openmodelica/src-libs-git.nix71
-rw-r--r--pkgs/applications/science/misc/openmodelica/src-libs-svn.nix5
-rw-r--r--pkgs/applications/science/misc/openmodelica/src-main.nix6
-rwxr-xr-xpkgs/applications/science/misc/openmodelica/update-src-libs-git.sh64
-rwxr-xr-xpkgs/applications/science/misc/openmodelica/update-src-libs-svn.sh50
21 files changed, 614 insertions, 330 deletions
diff --git a/pkgs/applications/science/misc/openmodelica/combined/default.nix b/pkgs/applications/science/misc/openmodelica/combined/default.nix
new file mode 100644
index 00000000000..459a325111e
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/combined/default.nix
@@ -0,0 +1,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;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/default.nix b/pkgs/applications/science/misc/openmodelica/default.nix
index cab0fa5ff5c..10fccfdf6da 100644
--- a/pkgs/applications/science/misc/openmodelica/default.nix
+++ b/pkgs/applications/science/misc/openmodelica/default.nix
@@ -1,53 +1,17 @@
-{lib, stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake,
-hwloc, jre, lapack, blas, hdf5, expat, ncurses, readline, qt4, webkitgtk, which,
-lp_solve, omniorb, sqlite, libatomic_ops, pkg-config, file, gettext, flex, bison,
-doxygen, boost, openscenegraph, gnome2, xorg, git, bash, gtk2, makeWrapper }:
-
-let
-
-  fakegit = import ./fakegit.nix { inherit lib stdenv fetchgit fetchsvn bash; };
-
-in
-
-stdenv.mkDerivation {
-  name = "openmodelica";
-
-  src = fetchgit (import ./src-main.nix);
-
-  buildInputs = [autoconf cmake automake libtool gfortran clang gnumake
-    hwloc jre lapack blas hdf5 expat ncurses readline qt4 webkitgtk which
-    lp_solve omniorb sqlite libatomic_ops pkg-config file gettext flex bison
-    doxygen boost openscenegraph gnome2.gtkglext xorg.libXmu
-    git gtk2 makeWrapper];
-
-  hardeningDisable = [ "format" ];
-
-  patchPhase = ''
-    cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh
-    cp -fv ${fakegit}/bin/checkout-svn.sh libraries/checkout-svn.sh
-  '';
-
-  configurePhase = ''
-    export NIX_LDFLAGS="$NIX_LDFLAGS -L${gfortran.cc.lib}/lib"
-
-    autoconf
-    ./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 : "${lib.makeLibraryPath [ lapack blas ]}"
-    done
-  '';
-
-  meta = with lib; {
-    description = "An open-source Modelica-based modeling and simulation environment";
-    homepage    = "https://openmodelica.org";
-    license     = licenses.gpl3;
-    maintainers = with maintainers; [ smironov ];
-    platforms   = platforms.linux;
-    broken      = true;
-  };
-}
+{ lib, newScope, libsForQt5, clangStdenv }:
+lib.makeScope newScope (self:
+  let
+    callPackage = self.newScope { stdenv = clangStdenv; };
+    callQtPackage = self.newScope (libsForQt5 // { stdenv = clangStdenv; });
+  in
+  {
+    mkOpenModelicaDerivation = callPackage ./mkderivation { };
+    omcompiler = callPackage ./omcompiler { };
+    omplot = callQtPackage ./omplot { };
+    omsimulator = callPackage ./omsimulator { };
+    omparser = callPackage ./omparser { };
+    omedit = callQtPackage ./omedit { };
+    omlibrary = callPackage ./omlibrary { };
+    omshell = callQtPackage ./omshell { };
+    combined = callPackage ./combined { };
+  })
diff --git a/pkgs/applications/science/misc/openmodelica/fakegit.nix b/pkgs/applications/science/misc/openmodelica/fakegit.nix
deleted file mode 100644
index 47cca7c7491..00000000000
--- a/pkgs/applications/science/misc/openmodelica/fakegit.nix
+++ /dev/null
@@ -1,81 +0,0 @@
-{ lib, stdenv, fetchgit, fetchsvn, bash }:
-
-let
-  mkscript = path : text : ''
-    mkdir -pv `dirname ${path}`
-    cat > ${path} <<"EOF"
-    #!${bash}/bin/bash
-    ME=`basename ${path}`
-    ${text}
-    EOF
-    sed -i "s@%out@$out@g" ${path}
-    chmod +x ${path}
-  '';
-
-  hashname = r: let
-    rpl = lib.replaceChars [":" "/"] ["_" "_"];
-  in
-    (rpl r.url) + "-" + (rpl r.rev);
-
-in
-
-stdenv.mkDerivation {
-  name = "fakegit";
-
-  buildCommand = ''
-    mkdir -pv $out/repos
-    ${lib.concatMapStrings
-       (r : ''
-        cp -r ${fetchgit r} $out/repos/${hashname r}
-       ''
-       ) (import ./src-libs-git.nix)
-    }
-
-    ${mkscript "$out/bin/checkout-git.sh" ''
-      if test "$#" -ne 4; then
-        echo "Usage: $0 DESTINATION URL GITBRANCH HASH"
-        exit 1
-      fi
-      DEST=$1
-      URL=`echo $2 | tr :/ __`
-      GITBRANCH=$3
-      REVISION=$4
-
-      L=`echo $REVISION | wc -c`
-      if expr $L '<' 10 >/dev/null; then
-        REVISION=refs/tags/$REVISION
-      fi
-
-      REVISION=`echo $REVISION | tr :/ __`
-
-      rm -rf $DEST
-      mkdir -pv $DEST
-      echo "FAKEGIT cp -r %out/repos/$URL-$REVISION $DEST" >&2
-      cp -r %out/repos/$URL-$REVISION/* $DEST
-      chmod u+w -R $DEST
-    ''}
-
-    ${lib.concatMapStrings
-       (r : ''
-        cp -r ${fetchsvn r} $out/repos/${hashname r}
-       ''
-       ) (import ./src-libs-svn.nix)
-    }
-
-    ${mkscript "$out/bin/checkout-svn.sh" ''
-      if test "$#" -ne 3; then
-        echo "Usage: $0 DESTINATION URL REVISION"
-        exit 1
-      fi
-      DEST=$1
-      URL=`echo $2 | tr :/ __`
-      REVISION=`echo $4 | tr :/ __`
-
-      rm -rf $DEST
-      mkdir -pv $DEST
-      echo "FAKE COPY %out/repos/$URL-$REVISION $DEST"
-      cp -r %out/repos/$URL-$REVISION/* $DEST
-      chmod u+w -R $DEST
-    ''}
-  '';
-}
diff --git a/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix b/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix
new file mode 100644
index 00000000000..94029fead48
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix
@@ -0,0 +1,101 @@
+# mkOpenModelicaDerivation is an mkDerivation function for packages
+# from OpenModelica suite.
+
+{ stdenv, lib, fetchgit, autoconf, automake, libtool, cmake, autoreconfHook, symlinkJoin }:
+pkg:
+let
+  inherit (builtins) hasAttr getAttr length elemAt;
+  inherit (lib) attrByPath concatStringsSep;
+
+
+  # A few helpers functions:
+
+  # getAttrDef is just a getAttr with default fallback
+  getAttrDef = attr: default: x: attrByPath [ attr ] default x;
+
+  # getAttr-like helper for optional append to string:
+  # "Hello" + appendByAttr "a" " " {a = "world";} = "Hello world"
+  # "Hello" + appendByAttr "a" " " {} = "Hello"
+  appendByAttr = attr: sep: x: if hasAttr attr x then sep + (getAttr attr x) else "";
+
+  # Are there any OM dependencies at all?
+  ifDeps = length pkg.omdeps != 0;
+
+  # Dependencies of current OpenModelica-target joined in one file tree.
+  # Return the dep itself in case it is a single one.
+  joinedDeps =
+    if length pkg.omdeps == 1
+    then elemAt pkg.omdeps 0
+    else
+      symlinkJoin {
+        name = pkg.pname + "-omhome";
+        paths = pkg.omdeps;
+      };
+
+  # Should we run ./configure for the target pkg?
+  omautoconf = getAttrDef "omautoconf" false pkg;
+
+  # Name of the make target
+  omtarget = getAttrDef "omtarget" pkg.pname pkg;
+
+  # Directory of target sources
+  omdir = getAttrDef "omdir" pkg.pname pkg;
+
+  # Simple to to m4 configuration scripts
+  postPatch = lib.optionalString ifDeps ''
+    sed -i ''$(find -name omhome.m4) -e 's|if test ! -z "$USINGPRESETBUILDDIR"|if test ! -z "$USINGPRESETBUILDDIR" -a -z "$OMHOME"|'
+  '' +
+  appendByAttr "postPatch" "\n" pkg;
+
+  # Update shebangs in the scripts before running configuration.
+  preAutoreconf = "patchShebangs --build common" +
+    appendByAttr "preAutoreconf" "\n" pkg;
+
+  # Tell OpenModelica where built dependencies are located.
+  configureFlags = lib.optional ifDeps "--with-openmodelicahome=${joinedDeps}" ++
+    getAttrDef "configureFlags" [ ] pkg;
+
+  # Our own configurePhase that accounts for omautoconf
+  configurePhase = ''
+    runHook preConfigure
+    export configureFlags="''${configureFlags} --with-ombuilddir=$PWD/build --prefix=$prefix"
+    ./configure --no-recursion $configureFlags
+    ${lib.optionalString omautoconf "(cd ${omdir}; ./configure $configureFlags)"}
+    runHook postConfigure
+  '';
+
+  # Targets that we want to build ourselves:
+  deptargets = lib.forEach pkg.omdeps (dep: dep.omtarget);
+
+  # ... so we ask openmodelica makefile to skip those targets.
+  preBuild = ''
+    for target in ${concatStringsSep " " deptargets}; do
+      touch ''${target}.skip;
+    done
+  '' +
+  appendByAttr "preBuild" "\n" pkg;
+
+  makeFlags = "${omtarget}" +
+    appendByAttr "makeFlags" " " pkg;
+
+  installFlags = "-i " +
+    appendByAttr "installFlags" " " pkg;
+
+
+in
+stdenv.mkDerivation (pkg // {
+  inherit omtarget postPatch preAutoreconf configureFlags configurePhase preBuild makeFlags installFlags;
+
+  src = fetchgit (import ./src-main.nix);
+  version = "1.17.0";
+
+  nativeBuildInputs = getAttrDef "nativeBuildInputs" [ ] pkg
+    ++ [ autoconf automake libtool cmake autoreconfHook ];
+
+  buildInputs = getAttrDef "buildInputs" [ ] pkg
+    ++ lib.optional ifDeps joinedDeps;
+
+  dontUseCmakeConfigure = true;
+
+  hardeningDisable = [ "format" ];
+})
diff --git a/pkgs/applications/science/misc/openmodelica/mkderivation/src-main.nix b/pkgs/applications/science/misc/openmodelica/mkderivation/src-main.nix
new file mode 100644
index 00000000000..c31b23d2f94
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/mkderivation/src-main.nix
@@ -0,0 +1,7 @@
+{
+  url = "https://github.com/OpenModelica/OpenModelica/";
+  rev = "08fd3f9144235f209a4ed7602bfadb32b1823628";
+  sha256 = "0clgqk9ilnr43iyl5sdzwfzqpnw9amfy1npdgkpgm1wfnsvz6xrw";
+  fetchSubmodules = true;
+}
+# Update with: nix run -f ./nixpkgs/default.nix nix-prefetch-git -c nix-prefetch-git 'https://github.com/OpenModelica/OpenModelica/' 'v1.17.0' --fetch-submodules
diff --git a/pkgs/applications/science/misc/openmodelica/omcompiler/default.nix b/pkgs/applications/science/misc/openmodelica/omcompiler/default.nix
new file mode 100644
index 00000000000..b49c0f0f60c
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omcompiler/default.nix
@@ -0,0 +1,63 @@
+{ stdenv
+, lib
+, gfortran
+, flex
+, bison
+, jre8
+, blas
+, lapack
+, curl
+, readline
+, expat
+, pkg-config
+, buildPackages
+, targetPackages
+, libffi
+, binutils
+, mkOpenModelicaDerivation
+}:
+let
+  isCross = stdenv.buildPlatform != stdenv.hostPlatform;
+  nativeOMCompiler = buildPackages.openmodelica.omcompiler;
+in
+mkOpenModelicaDerivation ({
+  pname = "omcompiler";
+  omtarget = "omc";
+  omdir = "OMCompiler";
+  omdeps = [ ];
+  omautoconf = true;
+
+  nativeBuildInputs = [
+    jre8
+    gfortran
+    flex
+    bison
+    pkg-config
+  ] ++ lib.optional isCross nativeOMCompiler;
+
+  buildInputs = [ targetPackages.stdenv.cc.cc blas lapack curl readline expat libffi binutils ];
+
+  postPatch = ''
+    sed -i -e '/^\s*AR=ar$/ s/ar/${stdenv.cc.targetPrefix}ar/
+               /^\s*ar / s/ar /${stdenv.cc.targetPrefix}ar /
+               /^\s*ranlib/ s/ranlib /${stdenv.cc.targetPrefix}ranlib /' \
+        $(find ./OMCompiler -name 'Makefile*')
+  '';
+
+  preFixup = ''
+    for entry in $(find $out -name libipopt.so); do
+      patchelf --shrink-rpath --allowed-rpath-prefixes /nix/store $entry
+      patchelf --set-rpath '$ORIGIN':"$(patchelf --print-rpath $entry)" $entry
+    done
+  '';
+
+  meta = with lib; {
+    description = "Modelica compiler from OpenModelica suite";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+} // lib.optionalAttrs isCross {
+  configureFlags = [ "--with-omc=${nativeOMCompiler}/bin/omc" ];
+})
diff --git a/pkgs/applications/science/misc/openmodelica/omedit/default.nix b/pkgs/applications/science/misc/openmodelica/omedit/default.nix
new file mode 100644
index 00000000000..b0cc530ba37
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omedit/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, jre8
+, qmake
+, qtbase
+, qttools
+, qtwebkit
+, qtxmlpatterns
+, binutils
+, wrapQtAppsHook
+, openmodelica
+, mkOpenModelicaDerivation
+}:
+with openmodelica;
+mkOpenModelicaDerivation rec {
+  pname = "omedit";
+  omdir = "OMEdit";
+  omdeps = [ omcompiler omplot omparser omsimulator ];
+  omautoconf = true;
+
+  nativeBuildInputs = [ jre8 qmake qtbase qttools wrapQtAppsHook ];
+
+  buildInputs = [ qtwebkit qtxmlpatterns binutils ];
+
+  postPatch = ''
+    sed -i ''$(find -name qmake.m4) -e '/^\s*LRELEASE=/ s|LRELEASE=.*$|LRELEASE=${lib.getDev qttools}/bin/lrelease|'
+  '';
+
+  dontUseQmakeConfigure = true;
+  QMAKESPEC = "linux-clang";
+
+  meta = with lib; {
+    description = "A Modelica connection editor for OpenModelica";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix b/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix
new file mode 100644
index 00000000000..006daf18812
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchgit
+, bash
+, pkg-config
+, jre8
+, libuuid
+, openmodelica
+, mkOpenModelicaDerivation
+}:
+let
+  fakegit = import ./fakegit.nix { inherit lib stdenv fetchgit bash; };
+in
+mkOpenModelicaDerivation {
+  pname = "omlibrary";
+  omdir = "libraries";
+  omtarget = "omlibrary-all";
+  omdeps = [ openmodelica.omcompiler ];
+
+  postPatch = ''
+    patchShebangs --build libraries
+    cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh
+
+    # The EMOTH library is broken in OpenModelica 1.17.0
+    # Let's remove it from targets.
+    sed -i -e '/^OTHER_LIBS=/ s/EMOTH //' libraries/Makefile.libs
+  '';
+
+  meta = with lib; {
+    description = "A collection of Modelica libraries to use with OpenModelica,
+including Modelica Standard Library";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix b/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix
new file mode 100644
index 00000000000..fdbc79aae59
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchgit, bash }:
+let
+  mkscript = path: text: ''
+    mkdir -pv `dirname ${path}`
+    cat > ${path} <<"EOF"
+    #!${bash}/bin/bash
+    ME=$(basename ${path})
+    ${text}
+    EOF
+    sed -i "s@%out@$out@g" ${path}
+    chmod +x ${path}
+  '';
+
+  hashname = r:
+    let
+      rpl = lib.replaceChars [ ":" "/" ] [ "_" "_" ];
+    in
+    (rpl r.url) + "-" + (rpl r.rev);
+
+in
+stdenv.mkDerivation {
+  name = "fakegit";
+
+  buildCommand = ''
+    mkdir -pv $out/repos
+    ${lib.concatMapStrings
+      (r: "cp -r ${fetchgit r} $out/repos/${hashname r}\n")
+      (import ./src-libs.nix)}
+
+    ${mkscript "$out/bin/checkout-git.sh" ''
+      if test "$#" -ne 4; then
+        echo "Usage: $0 DESTINATION URL GITBRANCH HASH"
+        exit 1
+      fi
+      DEST=$1
+      URL=`echo $2 | tr :/ __`
+      GITBRANCH=$3
+      REVISION=$4
+
+      REVISION=`echo $REVISION | tr :/ __`
+
+      rm -rf $DEST
+      mkdir -pv $DEST
+      echo "FAKEGIT cp -r %out/repos/$URL-$REVISION $DEST" >&2
+      cp -r %out/repos/$URL-$REVISION/* $DEST
+      chmod u+w -R $DEST
+    ''}
+  '';
+}
diff --git a/pkgs/applications/science/misc/openmodelica/omlibrary/src-libs.nix b/pkgs/applications/science/misc/openmodelica/omlibrary/src-libs.nix
new file mode 100644
index 00000000000..c91addf7804
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omlibrary/src-libs.nix
@@ -0,0 +1,83 @@
+[
+  { url = "https://github.com/modelica-3rdparty/AdvancedNoise.git"; rev = "5ce57acd279dadd0d25b76a6b02d3f9e9d061246"; sha256 = "07jjbj0y6bak269md3xniqb5lgc33m92ar5qixqxj5yxdjaahfs2"; fetchSubmodules = true; }
+  { url = "https://github.com/RWTH-EBC/AixLib.git"; rev = "b00e01d911e2e54e148f24e36ee387a8b457d89c"; sha256 = "1sljddxkx208nill0975sz9b1xd701n97aia4wxihr140dgs4dgb"; fetchSubmodules = true; }
+  { url = "https://github.com/RWTH-EBC/AixLib.git"; rev = "v0.4.0"; sha256 = "0dw34mjq29n55xh51g1c9a9d0d8gbpn16gj309dfxn4v2hbnfvzx"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/AlgebraTestSuite.git"; rev = "b937e1a7f447138c59abec9b2092f84f16bf02e8"; sha256 = "0406inasx61dk7vcnziiyhxkna7g61a5hn0znnbxj817hz6q11zn"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ApproxSpline.git"; rev = "28420f5c1a88c9cd069defbd8c05e4a78a090675"; sha256 = "07gpyi2brj5zpvrlsnflqjnhbrgxvpqbdshp8lp4lh9mnj5jv95d"; fetchSubmodules = true; }
+  { url = "https://github.com/OpenModelica/BioChem.git"; rev = "v1.0.2"; sha256 = "037bvj2lqrslg8k5r0rjgdzccslj9bj25b55k4g440vabm5p05qm"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/BondGraph.git"; rev = "20c23e60d12989bd4668ccac47659d82d39d29cc"; sha256 = "0yrkk708v4bvf423xb4zgpmnaj8qhq5primdg758ayddgli23wa9"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/BrineProp.git"; rev = "c2f564ae284726a2df6252a8561856691681572b"; sha256 = "01c2i2rlry7b4a6f2skkvzphcrfg5a2waxv4i7zgx5q275fg06i1"; fetchSubmodules = true; }
+  { url = "https://github.com/EDF-TREE/BuildSysPro.git"; rev = "v3.3.0"; sha256 = "1cvcany3q9p1xndarxa2d8mmqxdnqk22476q8l61nayz5qy25x61"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/BuildingControlLib.git"; rev = "v1.0.0"; sha256 = "0ckdxway0m755mbrl94k4458sijzgknlzsrf7xs5bjymxchm8r2m"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/BuildingSystems.git"; rev = "1e07bb475b921a4eedc6155c5310d1f9f3ef7550"; sha256 = "1xg831vqh6zw88cxxcb3sjgz44l7ygsgxddl05fp6xvz5sjpfcna"; fetchSubmodules = true; }
+  { url = "https://github.com/lbl-srg/modelica-buildings.git"; rev = "v6.0.0"; sha256 = "0rnnk1clji0myzr7adggki6knbl6v8381vwnqgiz8mkxbmzdwm4f"; fetchSubmodules = true; }
+  { url = "https://github.com/lbl-srg/modelica-buildings.git"; rev = "v7.0.0"; sha256 = "04n04pp4zvyg8n8h7h79c3wyk7lmn940mh7qzs0lv76g1ybypnlz"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Chemical.git"; rev = "5645573fced862430b7b598b4d7ec1a39c7aa0fa"; sha256 = "1kh7kpmjfz55pb8553srlnrh8l00nw21xf5mjzh7nx9b1rndnmyg"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/DeployStructLib.git"; rev = "v1.0"; sha256 = "1k4zw9lnd0javw4zigxc15l58yf7xdz36b7808g65qxy89w6ksr2"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/DisHeatLib.git"; rev = "b11f53379c122870a52f2da9b1705d2c911cd21d"; sha256 = "1vm96a4z0b40r0nisxrrzyvan4yphjdkx4ad655phva2636xb5rr"; fetchSubmodules = true; }
+  { url = "https://github.com/AHaumer/DriveControl.git"; rev = "b7233fd97a92867bb4ec2c3647c7f7e888398644"; sha256 = "0nyp1n8wrkjzfypsmjjzac0g9p4wbc1cxxr040fj20bqdg9l3h1b"; fetchSubmodules = true; }
+  # A broken one. The revision is lost.
+  # { url = "https://github.com/AHaumer/EMOTH.git"; rev = "fa890c8c2781f0c0b2f8efe955ed8a27875dd9ac"; sha256 = ""; fetchSubmodules = true; }
+  { url = "https://github.com/christiankral/ElectroMechanicalDrives.git"; rev = "v2.2.0"; sha256 = "0012phmn1y9fgpph45lwbjk0yhm5czidf2z6khm8lddvk93wf31b"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ExternData.git"; rev = "v2.5.0"; sha256 = "19dsyq1mk5vl54fqaffzqafm5w94l011cy7pg16c7i933dbqnkki"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/ExternalMedia.git"; rev = "159518edd538b64e28cd70983a9cc47730323cc4"; sha256 = "0qjd5fk65bln3s1jhs0cqcv54c22m6x2akbmxj09y4x0lkd1kgqn"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ExternalMemoryLib.git"; rev = "6488d5815bda23c665123baa916789e283e16d2c"; sha256 = "06y1i5w690b3b9x23nzls8y67fl7yd7bn4xl5j0dmyi4qx33aqda"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/FMITest.git"; rev = "a67a276083f4010b249802ad8fc70dc30c09adfd"; sha256 = "0mg8jlvlwql2nsjiy7c3rdibv73bkfk149ac0450d5pc0hfn9mln"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/FailureModes.git"; rev = "v1.2.1"; sha256 = "1z8bwrld1rkydgssab5gnrd76frrbky8qxi1lvlaf2jidj6bzn1l"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/FaultTriggering.git"; rev = "v0.6.6"; sha256 = "0a08yyrbg4a49s0bgqgyds6pidx9xr47yspvl9bdak1mq34qibip"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/FeedDriveLibrary.git"; rev = "1.0.1"; sha256 = "15fi9dj6zgl0fr90cwxqjbpphj0dwrrmk74hf25j6zd85w2ycqdz"; fetchSubmodules = true; }
+  { url = "https://github.com/DLR-SR/FractionalOrder.git"; rev = "99918820e346c362c3ad52d782c8215e5deeac4c"; sha256 = "1pycss6fqh86frfdbdfffjhaz09fz1558f9azgckhf8drx6ry1qs"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Greenhouses-Library.git"; rev = "89ae0e8097eb0751abce2013d304fa5f9c09b885"; sha256 = "1q77xj6aysqsn3d7kjmcq7dihbw18iqm35ifzdi75xgf3cgwla4f"; fetchSubmodules = true; }
+  { url = "https://github.com/christiankral/HanserModelica.git"; rev = "v1.1.0"; sha256 = "0zwkrhg2y42m18p4z51izrickiv1vikgz0z7fpjia4dbppckav8i"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/HelmholtzMedia.git"; rev = "3b4a4bca94d388744b2d045344ea2f9b0b4d405b"; sha256 = "17fzpan89075vb5vbhw5ylgxcdsmj2vjnmmka7cgzh06izb69nvh"; fetchSubmodules = true; }
+  { url = "https://github.com/ibpsa/modelica-ibpsa.git"; rev = "v3.0.0"; sha256 = "0xwgfndlw76zfmiiqadl85l9na9igsqlmfcawx526sdw2lhhgics"; fetchSubmodules = true; }
+  { url = "https://github.com/open-ideas/IDEAS.git"; rev = "v2.1.0"; sha256 = "0xp0zg6ib5536d5vl361lsn5w5faqdf6djhcmfxns629wjima8rn"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/IndustrialControlSystems.git"; rev = "v1.1.0"; sha256 = "1nvgx94iy1pws0768anrl7ssjlzslb5mbp21j7xvf6wpqfmj0npc"; fetchSubmodules = true; }
+  { url = "https://github.com/christiankral/KeyWordIO.git"; rev = "v0.9.0"; sha256 = "10kvj6zn2r6m3403ja8nkkxbfcchkz0pfk3g70ibr76zivxb5nim"; fetchSubmodules = true; }
+  { url = "https://github.com/FishSim/LibRAS.git"; rev = "fca9de50a484a2213f3ca1b39e275c237c471688"; sha256 = "0w1c87sifq8klq0f2l70qxjrlvahyxy1cx9rln80rni4d427yc1k"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/LinearMPC.git"; rev = "v1.0"; sha256 = "1crj60i5f33l9pgip0xbv6ankcga7px0644cj7c2wnzn1fjmn2k8"; fetchSubmodules = true; }
+  { url = "https://github.com/looms-polimi/MEV.git"; rev = "v1.0.1"; sha256 = "1a7ih9lc01wzaq8a8aznggpi4aqnczyzq49q5hc4fqvmfwl7l0j3"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ModPowerSystems.git"; rev = "df3afce27d5e935c4111f392275744a655abe216"; sha256 = "1b1fikm92lv6gj82imka3hxbjwv04i4h33y69yhcxdpqa6z6hm4z"; fetchSubmodules = true; }
+  { url = "https://github.com/OpenModelica/OpenModelica-ModelicaStandardLibrary.git"; rev = "614a148f61c1ab5d6788d8c11197803132ec7c2f"; sha256 = "0fg0pbahybx3srv5npk8pw49k23kaw2ns6c00f15iy93mvfrmfsk"; fetchSubmodules = true; }
+  { url = "https://github.com/OpenModelica/OpenModelica-ModelicaStandardLibrary.git"; rev = "34fe8cf3c7127ae09ca5f41e26b48fb6044e1e34"; sha256 = "0yz82k9dsp9d1jxqgxcm27fw1jz718km43qfginmgg0m9kfh2336"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Modelica-Arduino.git"; rev = "v0.1.0"; sha256 = "1n34dksqhrn1synv2mp2ifk4dxyhp15f5v1jb1b3dbw9n19951qb"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Modelica-GNU_ScientificLibrary.git"; rev = "9235ab28bdd7f0fe3e7abba48af53d73332858ec"; sha256 = "168g9gg12lfa863ifs41bnx6yd0yyjnal6986dgpm51dj5arw6id"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Modelica-MVEM.git"; rev = "v1.0.1"; sha256 = "1p68691dnl06lgwm4bl9g036brn4vl7m5x3gq4rxc291339frixk"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ModelicaADS.git"; rev = "v1.0.1"; sha256 = "0fhxrl07d7v3wa79d30psm1gxydc0p7s2akfirdx6dai0633skp9"; fetchSubmodules = true; }
+  { url = "https://github.com/xogeny/ModelicaBook.git"; rev = "v0.6.0"; sha256 = "0yqbll6p738yvpi1x11cjngpz2glda07mljrkjlm23p7l53x63dc"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-compliance/compliance.git"; rev = "8a91e75d8a26acc4de30fc0e5d5e9db83c970bd6"; sha256 = "1cym1wlgsvfrryq8zqzzrgs4wam1l7pc20q07hk3d615nhq21lg6"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ModelicaDFR.git"; rev = "37a441934d05330cf3d13e9ec551954d27eca84c"; sha256 = "13rpcs8cl9x15vi655150zmhmg1iaxpzvxrl3rqif46zpl5dhlj2"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/Modelica_DeviceDrivers.git"; rev = "v1.8.2"; sha256 = "16c0p9zn0qrraz59ivinibmikdd251plm1vqngznzhksjwvz6bja"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/Modelica_LinearSystems2.git"; rev = "v2.3.5"; sha256 = "0rzicynqgayydxqynnairxk7ybg4alv1xnfz8cgkrpicl2g9bacg"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Modelica_Requirements.git"; rev = "a427b5cb7997e9036c577d219e6b8a5d0c28389a"; sha256 = "1ihx46kifnfi9kw1g8nmd9sarl766whbzdk6a44alczsya4gg45k"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/Modelica_Synchronous.git"; rev = "c8350276bfd945086962cf4150ba941b9c57ed13"; sha256 = "12ad7fpjy50ky3lvl65r9d5xvlzvw5yqdnbp4rsgl3qw7s3wrmja"; fetchSubmodules = true; }
+  { url = "https://github.com/jwindahlModelon/MultiPhaseMixtureMedia.git"; rev = "0bda0c58af6384f8e0edf7aa7520afb369af3e38"; sha256 = "11bqm69504bh4h05dxlwdmjfxwls06mr49cz47kl8jmrygkfi4i2"; fetchSubmodules = true; }
+  { url = "https://github.com/OpenIPSL/OpenIPSL.git"; rev = "v1.5.0"; sha256 = "09xrcz0rdxdy220ki5zyl7920y0a4lg24p0aibna4ad15vszhhwj"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Optimisers.git"; rev = "e33c69edaad6dad8029167b0ca00533964a6fe37"; sha256 = "0hcxsrr2n4fzaxdjvgvqayz38kpfk86cclvg5pzcfmjc5bznb8bs"; fetchSubmodules = true; }
+  { url = "https://github.com/lochel/PNlib.git"; rev = "ab9b6b8527c0c78140365e7b105ae469d4954a64"; sha256 = "0y7bfbnvzv9bnz4v8wvmy42dji3cqpy5b2fmd2jj0rhlzs1infzh"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/PVSystems.git"; rev = "v0.6.2"; sha256 = "0vcgvdaqfbn46lpzk0kvsif3d55wf8yzhkbdpf5zv04kv7zw25w9"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/PhotoVoltaics.git"; rev = "v1.6.0"; sha256 = "0zqx77z217iln3vfxn2v3c2jl0jz5kgcd96ylvimjnwr30mxr09n"; fetchSubmodules = true; }
+  { url = "https://github.com/MarekMatejak/Physiolibrary.git"; rev = "v2.3.1"; sha256 = "0nxfw63m278gaff18zz29n2s1vk4kwdbv2qvbjmcq86fl1i5b3bg"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Physiomodel.git"; rev = "v1.0.0"; sha256 = "1sdhv5qgjqv3zdq57pkkrh04ainwv9n5zqd8mb9a3ybjmwdjf6f9"; fetchSubmodules = true; }
+  { url = "https://github.com/dzimmer/PlanarMechanics.git"; rev = "55224a9e76de8aa7f708236bd4d7dee624ecba50"; sha256 = "0hf7vi44adss86x5ahk5if7bdjgw773d8mb3d8ianq12g8azycyd"; fetchSubmodules = true; }
+  { url = "https://github.com/PowerGrids/PowerGrids.git"; rev = "v1.0.0"; sha256 = "06bx8mqvmizhfwg99djdfgh2mblc4wzmg0zq4ilrp586jwfninmz"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/PowerSystems.git"; rev = "v1.0.0"; sha256 = "1xwhwich7gi6vl33zl2r78xdjklchgkjcnvww6390j20l1wjznkn"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/PowerSystems.git"; rev = "7369976265a9d7b62097340aba5e463c62cc5061"; sha256 = "1f0h148v2g057l6ixf646d8ymsx1jzqn14xlram8h62la2k6nmvw"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/RealTimeCoordinationLibrary.git"; rev = "v1.0.2"; sha256 = "0ch4la04hm059ii5wzph9gsbvqhnfqrvvpqi57qn27bm10c4la0m"; fetchSubmodules = true; }
+  { url = "https://github.com/casella/ScalableTestSuite.git"; rev = "v1.11.5"; sha256 = "0bhj1q9b8d29nrbr253zszy1w1yvyizvyr3law1pqjj6mhbqmg4i"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Servomechanisms.git"; rev = "3bf82ba5d3f31b4a0ae05f99ae690037358e153e"; sha256 = "1swka7d58wkg5pqv59lqgfi7gv6rg5vra4j6r76pn9czx9ddal8w"; fetchSubmodules = true; }
+  { url = "https://github.com/SolarTherm/SolarTherm.git"; rev = "d80fc335d1fa5d1628c45c2e73204bcb8a614b21"; sha256 = "18d8cqlh0ic2yfcxzkz0ar9z19486z9x4sc7c9mpggxib28p39aa"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/Soltermica.git"; rev = "9f7224bd89335f95dffe1ccdaa094df5a3279fdf"; sha256 = "1bif3cnwjas6x7b8ahwkm7dbrqrfdqwwa26zmdc6zrpfncl3kqd0"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/SystemDynamics.git"; rev = "2f6bd9382c5aac2aff9148cd9113a418767734b6"; sha256 = "0ii2mj6ngwjir3gzyad8wsj86pvd6wzal91nz2y7gzwj1djchb3x"; fetchSubmodules = true; }
+  { url = "https://github.com/thom-marx/ThermalSeparation.git"; rev = "ffa0495ba829ecab105be4bfb3b7652625ec9c03"; sha256 = "1czm97bcrpp2jv0a0kd31a929wqlrlzdhdxvyy4w499dn20jzv1l"; fetchSubmodules = true; }
+  { url = "https://github.com/casella/ThermoPower.git"; rev = "82d21eba0d330005899dd50a6a0ceb7d09c4caeb"; sha256 = "0n83b40hjisy7lpnbz692947d2q3hw5hk4rak7fg0w5dbm4i719p"; fetchSubmodules = true; }
+  { url = "https://openmodelica.org/git/ThermoSysPro.git"; rev = "db81ae1b5a6a85f6c6c7693244cafa6087e18ff5"; sha256 = "12fsf0xxxc1ja6vmm9ff85f8j5sg1lb7w4g57s2w3fkf4d3a7d0c"; fetchSubmodules = true; }
+  { url = "https://openmodelica.org/git/ThermoSysPro.git"; rev = "5cef9acb4dedf8af6f4638a4448f08a544ebd30b"; sha256 = "0ihnz1s4rs42yis9zym9nw29ia2lqz2yx2wblc50p6f221w7q78s"; fetchSubmodules = true; }
+  { url = "https://github.com/lenaRB/VVDRlib.git"; rev = "eae4981674642eddffc7f2aa3690320fcaddee0e"; sha256 = "0qxxk2xlas5mqyc1h8ndic208qj1sm5mr5y8664kv3py7i8jdqi4"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica/VehicleInterfaces.git"; rev = "v1.2.5"; sha256 = "044k17cpc88wprrvw03p6crm6dy6x9a6xj5104d5nln71lqz5sdq"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/WasteWater.git"; rev = "v2.1.0"; sha256 = "1dxr4m9j7b5266daj4klbrhvnkqr73sximdw9bk9v5qf0s28li99"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/WindPowerPlants.git"; rev = "v1.2.0"; sha256 = "1lyrqwsb6sm1wc7vlj72zk5cpjhhzh27fviiqayddqy2b903xish"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/ipsl.git"; rev = "v1.1.1"; sha256 = "1w2iah8c5d8n01wmxydjk0rrcxh88g8yjy2zmv403azcccq7byzp"; fetchSubmodules = true; }
+  { url = "https://github.com/modelica-3rdparty/netCDF-DataReader.git"; rev = "v2.5.0"; sha256 = "1pd5xf5bgz010lryv8bj6lvlfqn9p184csiffwj8icx7rycnlcqb"; fetchSubmodules = true; }
+  { url = "https://github.com/joewa/open-bldc-modelica.git"; rev = "58a83b5b36f267613de4676c95163489b1ddc2e7"; sha256 = "0wf6dn64d2psv9b3xg5227vzpk109r3dqzi4m2wwhrilaxs3v004"; fetchSubmodules = true; }
+]
diff --git a/pkgs/applications/science/misc/openmodelica/omlibrary/update-src-libs.sh b/pkgs/applications/science/misc/openmodelica/omlibrary/update-src-libs.sh
new file mode 100755
index 00000000000..b8f2e95923b
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omlibrary/update-src-libs.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p bash
+
+CWD=$PWD
+
+chko() {
+  (
+    T=`mktemp -d`
+    trap "rm -rf $T" EXIT INT PIPE
+    cd $T
+    cat >check.nix <<EOF
+with import <nixpkgs> {};
+fetchgit `cat $CWD/../mkderivation/src-main.nix`
+EOF
+    nix-build check.nix
+    cat result/libraries/Makefile.libs
+  )
+}
+
+getsha256() {
+  URL=$(echo "$1" | sed 's/^"\(.*\)"$/\1/')
+  REV=$(echo "$2" | sed 's/^"\(.*\)"$/\1/')
+  SHA=$(nix run nixpkgs.nix-prefetch-git -c nix-prefetch-git --fetch-submodules "$URL" "$REV" 2>/dev/null | sed -n 's/.*"sha256": "\(.*\)",/\1/g p')
+  echo "{ url = $1; rev = $2; sha256 = \"$SHA\"; fetchSubmodules = true; }"
+}
+
+OUT=src-libs.nix
+
+echo '[' > $OUT
+
+chko |
+grep checkout-git.sh |
+tr \' \" |
+while read NM TGT URL BR REV ; do
+  echo Trying $TGT $URL $REV >&2
+  getsha256 $URL $REV >> $OUT || exit 1
+done
+
+echo ']' >> $OUT
diff --git a/pkgs/applications/science/misc/openmodelica/omparser/Makefile.in.patch b/pkgs/applications/science/misc/openmodelica/omparser/Makefile.in.patch
new file mode 100644
index 00000000000..a8f04203a8c
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omparser/Makefile.in.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -23,7 +23,7 @@
+ omedit-testsuite: omedit-testsuite.skip
+ omedit-testsuite.skip: omedit.skip testsuite-depends
+ 	$(MAKE) -f $(defaultMakefileTarget) -C OMEdit/Testsuite
+-omparser: omparser.skip
++omparser: build-dirs omparser.skip
+ omparser.skip:
+ 	test -f $@ || $(MAKE) -C OMParser OMBUILDDIR=@OMBUILDDIR@ "host_short=@host_short@" CC="@CC@" CXX="@CXX@" CFLAGS="@CFLAGS@" CPPFLAGS="@CPPFLAGS@" CXXFLAGS="@CXXFLAGS@"
+ omsimulator: omsimulator.skip
+@@ -134,6 +134,10 @@
+ INSTALL_JAVADIR    = ${DESTDIR}${datadir}/omc/java
+ INSTALL_LOCALEDIR  = ${DESTDIR}${datadir}/locale
+ 
++build-dirs:
++	mkdir -p "@OMBUILDDIR@"/lib/@host_short@/omc
++	mkdir -p "@OMBUILDDIR@"/include/omc
++
+ install-dirs:
+ 	@test ! "${DESTDIR}/@prefix@" -ef "@OMBUILDDIR@" || (echo Error: Install and build dirs are the same && false)
+ 	if [ "@APP@" = ".app" ]; then mkdir -p ${INSTALL_APPDIR}; fi
diff --git a/pkgs/applications/science/misc/openmodelica/omparser/default.nix b/pkgs/applications/science/misc/openmodelica/omparser/default.nix
new file mode 100644
index 00000000000..fcf5acd29ee
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omparser/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, pkg-config
+, jre8
+, libuuid
+, openmodelica
+, mkOpenModelicaDerivation
+}:
+
+mkOpenModelicaDerivation rec {
+  pname = "omparser";
+  omdir = "OMParser";
+  omdeps = [ openmodelica.omcompiler ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ jre8 libuuid ];
+
+  patches = [ ./Makefile.in.patch ];
+
+  meta = with lib; {
+    description = "An antlr4-based parser of Modelica files from OpenModelica
+suite";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/omplot/default.nix b/pkgs/applications/science/misc/openmodelica/omplot/default.nix
new file mode 100644
index 00000000000..7edc4b6efb2
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omplot/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, qtbase
+, qttools
+, qmake
+, wrapQtAppsHook
+, openmodelica
+, mkOpenModelicaDerivation
+}:
+
+mkOpenModelicaDerivation rec {
+  pname = "omplot";
+  omdir = "OMPlot";
+  omdeps = [ openmodelica.omcompiler ];
+  omautoconf = true;
+
+  nativeBuildInputs = [ qtbase qttools qmake wrapQtAppsHook ];
+
+  postPatch = ''
+    sed -i OMPlot/Makefile.in -e 's|bindir = @includedir@|includedir = @includedir@|'
+    sed -i OMPlot/OMPlot/OMPlotGUI/*.pro -e '/INCLUDEPATH +=/s|$| ../../qwt/src|'
+    sed -i ''$(find -name qmake.m4) -e '/^\s*LRELEASE=/ s|LRELEASE=.*$|LRELEASE=${lib.getDev qttools}/bin/lrelease|'
+  '';
+
+  dontUseQmakeConfigure = true;
+  QMAKESPEC = "linux-clang";
+
+  meta = with lib; {
+    description = "Plotting tool for OpenModelica-generated results files";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/omshell/default.nix b/pkgs/applications/science/misc/openmodelica/omshell/default.nix
new file mode 100644
index 00000000000..2f8c5203c07
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omshell/default.nix
@@ -0,0 +1,40 @@
+{ lib, qttools, qmake, qtwebkit, wrapQtAppsHook, readline, openmodelica, mkOpenModelicaDerivation }:
+
+mkOpenModelicaDerivation rec {
+  pname = "omshell";
+  omdir = "OMShell";
+  omdeps = [ openmodelica.omcompiler ];
+  omautoconf = true;
+
+  nativeBuildInputs = [ qmake wrapQtAppsHook ];
+
+  buildInputs = [ readline qtwebkit ];
+
+  postPatch = with openmodelica; ''
+    sed -i ''$(find -name qmake.m4) -e '/^\s*LRELEASE=/ s|LRELEASE=.*$|LRELEASE=${lib.getDev qttools}/bin/lrelease|'
+    sed -i OMShell/OMShell/OMShellGUI/*.pro -e '
+      s|\$\$\[QT_INSTALL_BINS\]/lrelease|${lib.getDev qttools}/bin/lrelease|
+      /^\s*OMCLIBS =/ s|\$\$(OMBUILDDIR)|${omcompiler}|
+      /^\s*OMCINC =/ s|\$\$(OMBUILDDIR)|${omcompiler}|
+    '
+    sed -i OMShell/OMShell/OMShellGUI/OMShell.config.in -e '
+      s|@OMBUILDDIR@|${omcompiler}|
+      s|@OPENMODELICAHOME@|${omcompiler}|
+    '
+    sed -i OMShell/mosh/src/Makefile.in -e '
+      /^CFLAGS =/ s|-I../../../build|-I${omcompiler}|
+      /^LIBS =/ s|-L@OMBUILDDIR@|-L${omcompiler}|
+      '
+  '';
+
+  dontUseQmakeConfigure = true;
+  QMAKESPEC = "linux-clang";
+
+  meta = with lib; {
+    description = "Interactive OpenModelica session shell";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/omsimulator/default.nix b/pkgs/applications/science/misc/openmodelica/omsimulator/default.nix
new file mode 100644
index 00000000000..448cdee6c26
--- /dev/null
+++ b/pkgs/applications/science/misc/openmodelica/omsimulator/default.nix
@@ -0,0 +1,26 @@
+{ lib
+, pkg-config
+, boost
+, readline
+, libxml2
+, openmodelica
+, mkOpenModelicaDerivation
+}:
+
+mkOpenModelicaDerivation rec {
+  pname = "omsimulator";
+  omdir = "OMSimulator";
+  omdeps = [ openmodelica.omcompiler ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ readline libxml2 boost ];
+
+  meta = with lib; {
+    description = "The OpenModelica FMI & SSP-based co-simulation environment";
+    homepage = "https://openmodelica.org";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ smironov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/science/misc/openmodelica/src-libs-git.nix b/pkgs/applications/science/misc/openmodelica/src-libs-git.nix
deleted file mode 100644
index aae5ab321fb..00000000000
--- a/pkgs/applications/science/misc/openmodelica/src-libs-git.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-[
-{ url = "https://github.com/modelica-3rdparty/ADGenKinetics.git"; rev = "42428db6e84bcde28543a3bba9bccee581309bb1"; sha256="14l005jwj1wz35gq8xlbzfz0bpsx99rs4q3dxkfh76yhnv1jh9h3"; }
-{ url = "https://github.com/modelica-3rdparty/ADMSL.git"; rev = "ed0305603f86b46d9af03e7d37dcb8b6704915b4"; sha256="15b0nqxyh8444az56ydjn594jikdl1ina5wamabk3nzm1yx218cl"; }
-{ url = "https://github.com/iea-annex60/modelica-annex60.git"; rev = "8015a01591bb24d219f57e7b69cdfcde66e39b47"; sha256="05k4pa007a6p628fq1xac0cfv8g8dnpy2bgy8h99rqpmlaa072z7"; }
-{ url = "https://github.com/OpenModelica/BioChem.git"; rev = "b5f3cb999f3cfad2bbb6fb429b496f61ecf2f628"; sha256="1l52dg888vwx4668spn59hqvfkpl9g06g8n2cdxiap7lvsyh6w9x"; }
-{ url = "https://github.com/modelica-3rdparty/BondGraph.git"; rev = "20c23e60d12989bd4668ccac47659d82d39d29cc"; sha256="1i9cmiy1ya04h2ld0gy0x2gvdrfksl66fmcrgdm1vpsnbb6pviv9"; }
-{ url = "https://github.com/modelica-3rdparty/BondLib.git"; rev = "df7a40fe612617da22e27d39edfa4b27d65f23d0"; sha256="005djwxd568zyk3ndss9hv165dci9x0dgjmcdjhnqmsap3w83hlz"; }
-{ url = "https://github.com/modelica-3rdparty/BrineProp.git"; rev = "fed013cdeec0fb9552964376b575a8e3635539ab"; sha256="020hm2q65d5iv3h8b3lhgl6j930vi2pbh4lvxv3b3k7i9z02q43a"; }
-{ url = "https://github.com/lbl-srg/modelica-buildings.git"; rev = "ef89361cc8673b077b9221efbf78aa63b4d7babd"; sha256="04gclknhl2f5z7w9fsbhwawisd0ibmvwpplx0siqwzvjx7nsmdg4"; }
-{ url = "https://github.com/lbl-srg/modelica-buildings.git"; rev = "444aa231f423b8d04225bf8672e3212d089fbfe4"; sha256="0q754mlkwqj0jcqsmxksvcz4ak2i86f9s41fhffh5jvra27cvq01"; }
-{ url = "https://github.com/modelica-3rdparty/Chemical.git"; rev = "aa2642608e587ddb6897e8c3ffabb3aa099510bd"; sha256="0y46spcb6rw0jpj4v20nlw8xlvi5kypij46f1msvwgr7dfgy4gl4"; }
-{ url = "https://github.com/modelica-3rdparty/ComplexLib.git"; rev = "0b78942ee4fa95ae71347a0d552dd869fdf4c708"; sha256="18llf5ccrq3b0f4cjznfycskwf78pik8370xv45w9gb51gamszrn"; }
-{ url = "https://github.com/lochel/ConPNlib.git"; rev = "bbf6e9711665d55e5a8cf2f7235fa013c2315104"; sha256="0g3ll44sn2ff14qxwdyakw9h5b8b7vzabxp8cb8km16wcdqzgcxx"; }
-{ url = "https://github.com/modelica-3rdparty/DESLib.git"; rev = "7a473d8d16b118c3ea05761c6f43b17fd9838e4e"; sha256="19f2121n8rdc9svcjk8irivsd9wqcb9ai9jx72s2r85fkbvm8jc3"; }
-{ url = "https://github.com/modelica-3rdparty/ExtendedPetriNets.git"; rev = "2f4eac0651c1ab0ed56b75ec61424e0ef15181d3"; sha256="0wwj756pg33qwb90ycbfkrk5xsiwsbrqvq3i16i4pisi21vl6jk9"; }
-{ url = "https://github.com/modelica-3rdparty/ExternData.git"; rev = "396164fa708cc7c7e64da55ac0b3cba23939f790"; sha256="09052qmv91a9wawsl93b5b3q47awrxhnsbb9mrv39kpnwygfh7dq"; }
-{ url = "https://github.com/modelica/ExternalMedia.git"; rev = "1b77869b31dc3509defeccb1236db4b05d2f6f5b"; sha256="05sszn4bn8r78syydyjq8csn9xv4az56mm9lrarqykqdh78pvlqp"; }
-{ url = "https://github.com/kdavies4/FCSys.git"; rev = "cb4b17f34313b9d8f2d4223d5365684b4dc1ab65"; sha256="114p7ja6b3fwlkvkkjhbx78fxc7v4af2sbs783hkdga86m1v4ib6"; }
-{ url = "https://github.com/modelica-3rdparty/FastBuildings.git"; rev = "1f5cfebc2f42c13e272bff639ffa3449d5740bf7"; sha256="0sry1n2pliddz0pjv8dp899fx98f16n1arc8zvq36k5grvi52fby"; }
-{ url = "https://github.com/modelica-3rdparty/FaultTriggering.git"; rev = "10c226b7e5b2af901b356ac437c90d6616a6e9a4"; sha256="0a9j18qjwigq11nghl97syxa9bscs1aj6vwpkldh50csnj5h6g2s"; }
-{ url = "https://github.com/modelica-3rdparty/FuzzyControl.git"; rev = "19ff67ff129a440482cc85f216f287b05ea6ec0d"; sha256="0ijcqns7pijsavijn4wlrdsz64k5ks626sly7r28wvrk9af2m2cx"; }
-{ url = "https://github.com/modelica-3rdparty/HelmholtzMedia.git"; rev = "e54fcd0e436d65c85de6c6b935983e363cdc9f6c"; sha256="05afh0379fx4mjjn7jb8j5p4am6qi62hjxvasb38b6fcp9rnysn4"; }
-{ url = "https://github.com/modelica-3rdparty/IdealizedContact.git"; rev = "8ebac550d913f6d2b3af4d1aea5044e72c7eb6b0"; sha256="03gh2a7hf44clshwkiyz786w847hmyr3bicdqd9969fbirgcqn6m"; }
-{ url = "https://github.com/modelica-3rdparty/IndustrialControlSystems.git"; rev = "6a2414307d5998c6d081efe803c2b575a532b3ba"; sha256="09la9h07x8bkh7zhrwykgj1467qdryjvxhvnnm8qvsim0dl9inc4"; }
-{ url = "https://github.com/modelica-3rdparty/LinearMPC.git"; rev = "1e91a5dcaa662cd30c5b09a9d0267289703f933b"; sha256="12094fqmwi65h0mc65b96krbj6b8dgn6jiww3fnv6khglb21kwvd"; }
-{ url = "https://github.com/modelica/Modelica.git"; rev = "refs/tags/v1.6"; sha256="106w83ylgbxf63wr7p9z5q8vqz2qcsaw0zwaad7d3saq6rdbj30c"; }
-{ url = "https://github.com/modelica/Modelica.git"; rev = "d442bcd461b8db9873e33b6141bdbd37bcff9de8"; sha256="1icnd0fxix5khnsvdhy7kmzn6lnqkggbvfrbln98a2h5zqd6s32w"; }
-{ url = "https://github.com/modelica/Modelica.git"; rev = "af2a3e1597d648d6826665c89cf9eaf5c2a632bc"; sha256="0ryk0iwakdazhsjqvan41w6f9bvgl329zkqchcdg6nkidiigziwh"; }
-{ url = "https://github.com/modelica/Modelica.git"; rev = "48943d87db45a6c312b5a5789d384acde44a934b"; sha256="1hi2vkpmx734baa9m1lqzallcykhh3snd68r387gndiv96f6zx3n"; }
-{ url = "https://github.com/modelica/Modelica.git"; rev = "164af873cc5955c50f9592a7d2f3c155f703849c"; sha256="071svqwd72sy85sngbg5r22ab693c0gw2xx29gk1sqrk2nchmvia"; }
-{ url = "https://github.com/OpenModelica/modelica3d.git"; rev = "daf5669b03ad33fc6999671d1c0e7521134a282b"; sha256="1scs6v2cp2r4jz4diszwbqf9kvzf49pid50dmpsz0gfhx06j9y2v"; }
-{ url = "https://github.com/modelica-deprecated/ModelicaAdditions.git"; rev = "568db43766186826b880f9d4bfafeff25cc2c4ab"; sha256="1py5i3afxdvz1dmxxwb2mqj8kyzdhg4jnnqwl8h50akizg4i49pl"; }
-{ url = "https://github.com/xogeny/ModelicaBook.git"; rev = "0e670cfae4db653bd34ea777d6b56423e9be2c9f"; sha256="0lxh08w6nii4p5yk7c0xmfi5y4xkjkzz4hirr3kqdhdfybcwq824"; }
-{ url = "https://github.com/modelica-compliance/compliance.git"; rev = "ca5092c14bb7af4507a10700ee49181a3a3ee199"; sha256="12ja6dhwlbq412kxjdviypgchipxpsg8l0sf6r17g6lbsi19i2b6"; }
-{ url = "https://github.com/modelica-3rdparty/ModelicaDEVS.git"; rev = "a987aa9552fbbe71b2ee2e8c28958f9d213087ae"; sha256="0qcw7vw28xadim0h8kr2km09d8vdj05ibdpzcnpny9n43pm9s5hx"; }
-{ url = "https://github.com/modelica/Modelica_DeviceDrivers.git"; rev = "db912ba7e1317b8f6a776ccf9a19f69c77a9c477"; sha256="052h2lr7xgfag5fks19wbldqmb985kxlc5fzysl7c9w3fnijp0ml"; }
-{ url = "https://github.com/modelica/Modelica_EnergyStorages.git"; rev = "9f057365232364e31a31a8e525f96284b98c7de3"; sha256="195m5b3z8qgg9kih9zsdx1h8zgrm37q63890r59akka05a97j48h"; }
-{ url = "https://github.com/modelica/Modelica_LinearSystems2.git"; rev = "18916fdc485285baab12481701b53d4eb606a3f1"; sha256="0fhvdwcgk8q3z1a98l2bxv8a6dysrs4ll6xfyzpni7yq8gp4mg4q"; }
-{ url = "https://github.com/modelica/Modelica_Synchronous.git"; rev = "d0f5ee57bc7b639738e88026674a87343b33dbe1"; sha256="0l75v4d0fgf07ify0h3skh4y9pfw9gxh9hbj1lbsdgglmzlrcvbg"; }
-{ url = "https://github.com/modelica-3rdparty/MotorcycleDynamics.git"; rev = "2be2667f9936d88ffb9b8a8246c5af9ccb0b307f"; sha256="0jazwmpqpyhhgs9qdn9drmplgp2yjs0ky7wll5x9929dkgy80m6x"; }
-{ url = "https://github.com/modelica-3rdparty/NCLib.git"; rev = "ed3d72f176ac6b7031ce73be9d80101141e74a69"; sha256="1pbpv8w1lsa9vdwp7qbih8iim91ms22b01wz376b548d0x2r95la"; }
-{ url = "https://github.com/modelica-3rdparty/NeuralNetwork.git"; rev = "c44e4d1fe97fd4f86dafcd05ad3713692e3f1806"; sha256="0s1v8k71zq1s9gjlvi3zr23nwfknp4x17cxm64a0y3vsi3kahj2s"; }
-{ url = "https://github.com/DLR-SR/Noise.git"; rev = "9b57476845539e56769cf76ea0fe7bf3c7eb5d11"; sha256="0icrb63f6dm4gww2nyby9i7s7qxvhvialp36xzcgmi7nlq7crjr2"; }
-{ url = "https://github.com/modelica-3rdparty/ObjectStab.git"; rev = "2a723e0b223af50f4ffdd62f8ac901e0f87b9323"; sha256="1b6zi27slzzfbkmbcqxygsn5i5w0zkq0hfrfb72vf7mbgz07j19j"; }
-{ url = "https://github.com/cparedis/OpenHydraulics.git"; rev = "d3173d1f06f7d14c9d7c41769f143617ff03a3ad"; sha256="1hn5rcnmzcbiaqdnxfn02wddmrpj9bcdi9p680f31hbh3vb0i3r6"; }
-{ url = "https://github.com/lochel/PNlib.git"; rev = "44c7d277980b7a88b449b72edec0a56416b40fa9"; sha256="026wdhbxnzarmj8gw0as70vj8f1gwc51z38hjqpswxkl0xd6mfvp"; }
-{ url = "https://github.com/MarekMatejak/Physiolibrary.git"; rev = "49d59060f6e5b4cb68560c6d7467e84ea4318056"; sha256="0klqs2axjm3s780sq4plq4wmbf9mszz2jmq9fprgxy9pw7iszbhc"; }
-{ url = "https://github.com/dzimmer/PlanarMechanics.git"; rev = "d998a1b27355e83d2ff4849d71281a919a3234aa"; sha256="0vyq6mninn38wy2d60rk753xbkfqim2y6y31py7kq2mm170jfqf4"; }
-{ url = "https://github.com/modelica/PowerSystems.git"; rev = "7b551888089277a0dd979db636d47aba0279e8f0"; sha256="0y13f1nllc7riksnly25wmmp6mc30c1b48dbq2lr1nag6yg3blwm"; }
-{ url = "https://github.com/modelica/PowerSystems.git"; rev = "3abd48aa53bbcd3f3e2ddfa2371680febf8baf48"; sha256="1nr2nbpaxywk8cpwnk9rr2zr87mm2gb9b4plqipjdlrrkjlk9fka"; }
-{ url = "https://github.com/modelica-3rdparty/PraxisSimulationstechnik.git"; rev = "f7db177786f84033f3a50b7474988b190a1dfb46"; sha256="08bdm7k7w35kg9gkrvcn382zkwf5h3iwkkx60d5fj64j5d5klray"; }
-{ url = "https://github.com/modelica-3rdparty/QCalc.git"; rev = "af6c34dda691a9bdf7ca1de10650974b2d5cecf5"; sha256="0p0zhl27cnr492byrzib0dyn7zp5yb7wcr0spv10ngm6j90cij6y"; }
-{ url = "https://github.com/modelica-3rdparty/QSSFluidFlow.git"; rev = "d84a2c107132f2cd47ea3c3751238d69e4b1f64b"; sha256="02cdvv33pi0qlmg8n401s4cxf59l9b4ff4ixf7gwn4w4n1y9bw0g"; }
-{ url = "https://github.com/modelica-3rdparty/RealTimeCoordinationLibrary.git"; rev = "655ac1a22aa6deb04ea8e3869dd0aa9fb9540754"; sha256="19crf8pl9vpqq3pq1rhcbl49kkmnm4jrzpwrpqp8qc6dj8096za4"; }
-{ url = "https://github.com/modelica-3rdparty/ScalableTestSuite.git"; rev = "c6319908d45ac97ffb10e96cd42654bce36ffb97"; sha256="1g79d88bfmzcqvaghyyj86ajs38v0qnmjxbj8d53yp6nmgnaasx5"; }
-{ url = "https://github.com/modelica-3rdparty/Servomechanisms.git"; rev = "22e1874ef9ad46156617817c67a4fb1238621bf5"; sha256="0nwb7apayk7ba9iv27yv67wi4b934dy57kkvn0acxy393jhd8jqd"; }
-{ url = "https://openmodelica.org/git/SiemensPower.git"; rev = "73a3bfc6d2ddd72165bb0f3e7e9df48b643a5ed0"; sha256="0mvrkpkmr0bx2cvsb23syg7cs8k6a15vjf4n1hivdcigq4x8g2nc"; }
-{ url = "https://openmodelica.org/git/SiemensPower.git"; rev = "5ef2e38b64ff481801c0db19d52f0bef21f85f77"; sha256="1llnpl2x1g28gari1rk34hdnnwf7a4fwwxlf7i18d8bl1vsrfaja"; }
-{ url = "https://openmodelica.org/git/SiemensPower.git"; rev = "2bd9e367baaa8d44946897c3c3a32a4050ad2a2a"; sha256="1shm9blpn9m87ci6wwkinpmihr1fik9j0a0pj2nxy0cjrr2jzbn4"; }
-{ url = "https://github.com/modelica-3rdparty/Spot.git"; rev = "2f74417f1681570900a1ed373dcbe4b42634ec7b"; sha256="0k5h2k6x98zvvsafpw7y16xs9d6lxz0csa0mlm4wwggaywadn255"; }
-{ url = "https://github.com/modelica-3rdparty/SystemDynamics.git"; rev = "c58a26dc3e62a50e64fd336dc4aa499b2d5ad314"; sha256="0ra3a2vgqmry92kmm060gfa41mrpkgbs4swzl78ih3icawfzjz8q"; }
-{ url = "https://github.com/modelica-3rdparty/ThermoPower.git"; rev = "e012268625dd1645fe5570cf31d64129d83a8192"; sha256="1rlkli48kc9hnkplgb0bjkb6ajn7agiw4yh9l5sfvlv7k7k2gc8l"; }
-{ url = "https://openmodelica.org/git/ThermoSysPro.git"; rev = "d4f9c3ed35f7520f82439eb6e9f4057ae0f82b73"; sha256="0hxbn26g479qkr6rrglx9ljdxnpzd5ll1sf2v08skghrdjjb8jcx"; }
-{ url = "https://openmodelica.org/git/ThermoSysPro.git"; rev = "51e7ea2d2e121ee640e7897335c294923f8eaeb0"; sha256="0l11mzjkaxndsqrnnr0z7qvk08svv229119qkm81yb53ich9wnyw"; }
-{ url = "https://github.com/modelica/VehicleInterfaces.git"; rev = "ad956a35643d53e207ee126d67ea1f3f38337a39"; sha256="0g90cqwjpi06gn7vca5kqnz56im76s2hrdqjhsj2bl43rza8mhr0"; }
-{ url = "https://github.com/modelica-3rdparty/WasteWater.git"; rev = "90ff44ac791ba5ed98444c8597efbd2a2af01cad"; sha256="1icrn0y389rhxmf6i0mnsfgw9v9j5innpkz3q069rfm2ji268b12"; }
-{ url = "https://github.com/xogeny/XogenyTest.git"; rev = "9b98981e8ff0f440dd319d1a806e1fd2f0ab3436"; sha256="18glaxrlxfml26w7ljlf0yj3ah1fnhpbg01py28nplsgnrfwfwqj"; }
-{ url = "https://github.com/modelica-3rdparty/msgpack-modelica.git"; rev = "6ce2ca600c4902038c0f20b43ed442f1ee204310"; sha256="01x5a9y11yf62sc0j2y49yxwm24imj2lfl3z5mwvi9038gwn0lkx"; }
-{ url = "https://github.com/modelica-3rdparty/netCDF-DataReader.git"; rev = "3d2cc8272abfbc4b667d8868f851bf3e11c6f00e"; sha256="194810a4rn0flxgirrlnxsbxarnm97309dkp1w7nva9zv1q3wj7h"; }
-{ url = "https://github.com/joewa/open-bldc-modelica.git"; rev = "7817cd703b88fc1f433269d32c31e75eb50a21c6"; sha256="1plkxkx51f9yi99ysarmx2ymldizvyr0m66k996y5lj5h81jv8a8"; }
-]
diff --git a/pkgs/applications/science/misc/openmodelica/src-libs-svn.nix b/pkgs/applications/science/misc/openmodelica/src-libs-svn.nix
deleted file mode 100644
index 244da64fb4e..00000000000
--- a/pkgs/applications/science/misc/openmodelica/src-libs-svn.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-[
-{ url = "https://svn.modelica.org/projects/Modelica_ElectricalSystems/InstantaneousSymmetricalComponents"; rev = "7978"; sha256="0f100c7bz4ai3ryhpkbbszw8z6mykvg40p03ic92n2qq58wjk37z"; }
-{ url = "https://svn.modelica.org/projects/Modelica_EmbeddedSystems/trunk/Modelica_StateGraph2"; rev = "8121"; sha256="1cys57nc1yzkr5admc139qs5pa48rj3g69pb3j3s9xcmpd483hzp"; }
-{ url = "https://svn.modelica.org/projects/Modelica_ElectricalSystems/Modelica_PowerFlow/trunk"; rev = "3174"; sha256="0yviw1b8psn8vfyl4q1naylak3lcqi2q1bqplqg3gg9iw4aiymxl"; }
-]
diff --git a/pkgs/applications/science/misc/openmodelica/src-main.nix b/pkgs/applications/science/misc/openmodelica/src-main.nix
deleted file mode 100644
index 99e82259bfe..00000000000
--- a/pkgs/applications/science/misc/openmodelica/src-main.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  url = "https://openmodelica.org/git-readonly/OpenModelica.git";
-  fetchSubmodules = true;
-  rev = "8c5d48eb31a638d5220621b20377bfe6f9e9535e";
-  sha256 = "0i5cznkh4wwayjqms14f3phizqm493nrr1yjgs9747nfw7vnwsff";
-}
diff --git a/pkgs/applications/science/misc/openmodelica/update-src-libs-git.sh b/pkgs/applications/science/misc/openmodelica/update-src-libs-git.sh
deleted file mode 100755
index 481a8979641..00000000000
--- a/pkgs/applications/science/misc/openmodelica/update-src-libs-git.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-CWD=`pwd`
-
-chko() { (
-T=`mktemp -d`
-trap "rm -rf $T" EXIT INT PIPE
-cd $T
-cat >check.nix <<EOF
-with import <nixpkgs> {};
-fetchgit `cat $CWD/src-main.nix`
-EOF
-nix-build check.nix
-cat result/libraries/Makefile.libs
-) }
-
-getsha256() { (
-T=`mktemp -d`
-trap "rm -rf $T" EXIT INT PIPE
-cd $T
-
-L=`echo $2 | wc -c`
-if expr $L '<' 10 >/dev/null; then
-T=`echo $2 | sed 's@"\(.*\)"@"refs/tags/\1"@'`
-cat >check.nix <<EOF
-with import <nixpkgs> {};
-fetchgit {
-  url = $1;
-  rev = $T;
-  sha256 = "0000000000000000000000000000000000000000000000000000";
-}
-EOF
-SHA=`nix-build check.nix 2>&1 | sed -n 's/.*instead has ‘\(.*\)’.*/\1/g p'`
-echo "{ url = $1; rev = $T; sha256=\"$SHA\"; }"
-else
-cat >check.nix <<EOF
-with import <nixpkgs> {};
-fetchgit {
-  url = $1;
-  rev = $2;
-  sha256 = "0000000000000000000000000000000000000000000000000000";
-}
-EOF
-SHA=`nix-build check.nix 2>&1 | sed -n 's/.*instead has ‘\(.*\)’.*/\1/g p'`
-echo "{ url = $1; rev = $2; sha256=\"$SHA\"; }"
-fi
-
-# nix-build check.nix
-) }
-
-OUT=src-libs-git.nix
-
-echo '[' > $OUT
-
-chko |
-grep checkout-git.sh |
-tr \' \" |
-while read NM TGT URL BR REV ; do
-  echo Trying $TGT $URL $REV >&2
-  getsha256 $URL $REV >> $OUT || exit 1
-done
-
-echo ']' >> $OUT
-
diff --git a/pkgs/applications/science/misc/openmodelica/update-src-libs-svn.sh b/pkgs/applications/science/misc/openmodelica/update-src-libs-svn.sh
deleted file mode 100755
index 972bc7d61f1..00000000000
--- a/pkgs/applications/science/misc/openmodelica/update-src-libs-svn.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-CWD=`pwd`
-
-chko() { (
-T=`mktemp -d`
-trap "rm -rf $T" EXIT INT PIPE
-cd $T
-cat >check.nix <<EOF
-with import <nixpkgs> {};
-fetchgit `cat $CWD/src-main.nix`
-EOF
-nix-build check.nix
-cat result/libraries/Makefile.libs
-) }
-
-getsha256() { (
-T=`mktemp -d`
-trap "rm -rf $T" EXIT INT PIPE
-cd $T
-
-L=`echo $2 | wc -c`
-cat >check.nix <<EOF
-with import <nixpkgs> {};
-fetchsvn {
-  url = $1;
-  rev = $2;
-  sha256 = "0000000000000000000000000000000000000000000000000000";
-}
-EOF
-SHA=`nix-build check.nix 2>&1 | sed -n 's/.*instead has ‘\(.*\)’.*/\1/g p'`
-echo "{ url = $1; rev = $2; sha256=\"$SHA\"; }"
-
-# nix-build check.nix
-) }
-
-OUT=src-libs-svn.nix
-
-echo '[' > $OUT
-
-chko |
-grep checkout-svn.sh |
-tr \' \" |
-while read NM TGT URL REV ; do
-  echo Trying $TGT $URL $REV >&2
-  getsha256 $URL $REV >> $OUT || exit 1
-done
-
-echo ']' >> $OUT
-