2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake,
|
2020-04-24 23:36:52 +00:00
|
|
|
hwloc, jre, lapack, blas, hdf5, expat, ncurses, readline, qt4, webkitgtk, which,
|
2021-02-05 17:12:51 +00:00
|
|
|
lp_solve, omniorb, sqlite, libatomic_ops, pkg-config, file, gettext, flex, bison,
|
2020-04-24 23:36:52 +00:00
|
|
|
doxygen, boost, openscenegraph, gnome2, xorg, git, bash, gtk2, makeWrapper }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
fakegit = import ./fakegit.nix { inherit lib stdenv fetchgit fetchsvn bash; };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
2021-02-05 17:12:51 +00:00
|
|
|
lp_solve omniorb sqlite libatomic_ops pkg-config file gettext flex bison
|
2020-04-24 23:36:52 +00:00
|
|
|
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" \
|
2021-01-17 00:15:33 +00:00
|
|
|
--prefix LIBRARY_PATH : "${lib.makeLibraryPath [ lapack blas ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "An open-source Modelica-based modeling and simulation environment";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://openmodelica.org";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ smironov ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
broken = true;
|
|
|
|
};
|
|
|
|
}
|