2015-06-20 19:45:37 +01:00
|
|
|
{stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake,
|
2020-03-31 15:47:18 +01:00
|
|
|
hwloc, jre, lapack, blas, hdf5, expat, ncurses, readline, qt4, webkitgtk, which,
|
2015-06-20 19:45:37 +01:00
|
|
|
lp_solve, omniorb, sqlite, libatomic_ops, pkgconfig, file, gettext, flex, bison,
|
2019-12-24 15:00:15 +00:00
|
|
|
doxygen, boost, openscenegraph, gnome2, xorg, git, bash, gtk2, makeWrapper }:
|
2015-06-20 19:45:37 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
fakegit = import ./fakegit.nix {inherit stdenv fetchgit fetchsvn bash;} ;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "openmodelica";
|
|
|
|
|
|
|
|
src = fetchgit (import ./src-main.nix);
|
|
|
|
|
|
|
|
buildInputs = [autoconf cmake automake libtool gfortran clang gnumake
|
2020-03-31 15:47:18 +01:00
|
|
|
hwloc jre lapack blas hdf5 expat ncurses readline qt4 webkitgtk which
|
2015-06-20 19:45:37 +01:00
|
|
|
lp_solve omniorb sqlite libatomic_ops pkgconfig file gettext flex bison
|
2019-12-24 15:00:15 +00:00
|
|
|
doxygen boost openscenegraph gnome2.gtkglext xorg.libXmu
|
2016-09-11 22:24:51 +01:00
|
|
|
git gtk2 makeWrapper];
|
2015-06-20 19:45:37 +01:00
|
|
|
|
2016-08-27 22:54:17 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2016-09-05 17:05:11 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-06-20 19:45:37 +01:00
|
|
|
patchPhase = ''
|
|
|
|
cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh
|
|
|
|
cp -fv ${fakegit}/bin/checkout-svn.sh libraries/checkout-svn.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
2016-08-20 20:51:41 +01:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L${gfortran.cc.lib}/lib"
|
|
|
|
|
2015-06-20 19:45:37 +01:00
|
|
|
autoconf
|
|
|
|
./configure CC=${clang}/bin/clang CXX=${clang}/bin/clang++ --prefix=$out
|
|
|
|
'';
|
|
|
|
|
2015-07-22 14:43:01 +01:00
|
|
|
postFixup = ''
|
|
|
|
for e in $(cd $out/bin && ls); do
|
|
|
|
wrapProgram $out/bin/$e \
|
|
|
|
--prefix PATH : "${gnumake}/bin" \
|
2020-03-31 15:47:18 +01:00
|
|
|
--prefix LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ lapack blas ]}"
|
2015-07-22 14:43:01 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2015-06-20 19:45:37 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "An open-source Modelica-based modeling and simulation environment";
|
2015-06-20 19:45:37 +01:00
|
|
|
homepage = "https://openmodelica.org";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ smironov ];
|
|
|
|
platforms = platforms.linux;
|
2017-09-29 01:00:12 +01:00
|
|
|
broken = true;
|
2015-06-20 19:45:37 +01:00
|
|
|
};
|
|
|
|
}
|