summary refs log tree commit diff
path: root/pkgs/applications/science/math/gmsh/default.nix
blob: bb24ac9bd49903e3510f87125487b4612b178e97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchurl, cmake, blas, liblapack, gfortran, gmm, fltk, libjpeg
, zlib, mesa, mesa_glu, xorg }:

let version = "3.0.5"; in

stdenv.mkDerivation {
  name = "gmsh-${version}";

  src = fetchurl {
    url = "http://gmsh.info/src/gmsh-${version}-source.tgz";
    sha256 = "ae39ed81178d94b76990b8c89b69a5ded8910fd8f7426b800044d00373d12a93";
  };

  # The original CMakeLists tries to use some version of the Lapack lib
  # that is supposed to work without Fortran but didn't for me.
  patches = [ ./CMakeLists.txt.patch ];

  buildInputs = [ cmake blas liblapack gfortran gmm fltk libjpeg zlib mesa
    mesa_glu xorg.libXrender xorg.libXcursor xorg.libXfixes xorg.libXext
    xorg.libXft xorg.libXinerama xorg.libX11 xorg.libSM xorg.libICE
  ];

  enableParallelBuilding = true;

  meta = {
    description = "A three-dimensional finite element mesh generator";
    homepage = http://gmsh.info/;
    platforms = stdenv.lib.platforms.all;
    license = stdenv.lib.licenses.gpl2Plus;
  };
}