2015-06-20 19:45:37 +01:00
|
|
|
{stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake,
|
|
|
|
hwloc, jre, liblapack, blas, hdf5, expat, ncurses, readline, qt4, webkit, which,
|
|
|
|
lp_solve, omniorb, sqlite, libatomic_ops, pkgconfig, file, gettext, flex, bison,
|
2015-09-15 10:26:18 +01:00
|
|
|
doxygen, boost, openscenegraph, gnome, pangox_compat, xorg, git, bash, gtk, 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
|
|
|
|
hwloc jre liblapack blas hdf5 expat ncurses readline qt4 webkit which
|
|
|
|
lp_solve omniorb sqlite libatomic_ops pkgconfig file gettext flex bison
|
2015-09-15 10:26:18 +01:00
|
|
|
doxygen boost openscenegraph gnome.gtkglext pangox_compat xorg.libXmu
|
2015-07-22 14:43:01 +01:00
|
|
|
git gtk makeWrapper];
|
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 = ''
|
|
|
|
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" \
|
|
|
|
--prefix LIBRARY_PATH : "${liblapack}/lib:${blas}/lib"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2015-06-20 19:45:37 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "OpenModelica is an open-source Modelica-based modeling and simulation environment";
|
|
|
|
homepage = "https://openmodelica.org";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ smironov ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|