From 6f2bb3c275c4ffd04506c96c35efd9791a50782b Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 9 Nov 2018 17:41:49 -0800 Subject: [PATCH 1/3] gmsh: 4.0.2 -> 4.0.4 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/gmsh/versions --- pkgs/applications/science/math/gmsh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index 525fc5f1dc26..4d0bb487c122 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, cmake, blas, liblapack, gfortran, gmm, fltk, libjpeg , zlib, libGLU_combined, libGLU, xorg }: -let version = "4.0.2"; in +let version = "4.0.4"; in stdenv.mkDerivation { name = "gmsh-${version}"; src = fetchurl { url = "http://gmsh.info/src/gmsh-${version}-source.tgz"; - sha256 = "03aw3sbz4x998rk29az7mgm0mrdb6614aqnppg81p5jkh5097jgk"; + sha256 = "1hvrls3xyxvn69kwicpvndrs0zhifcfkhfsxr8zkmhmn6fhnjhha"; }; # The original CMakeLists tries to use some version of the Lapack lib From ced40eabfdb14b21a14e36ce1874b3090794fb3d Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 14 Nov 2018 11:41:46 +0100 Subject: [PATCH 2/3] gmsh: use openblas instead of atlas/lapack * openblas is properly recognized by cmake * the cmake patch is no longer neccessary --- .../science/math/gmsh/CMakeLists.txt.patch | 37 ------------------- .../science/math/gmsh/default.nix | 8 +--- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 pkgs/applications/science/math/gmsh/CMakeLists.txt.patch diff --git a/pkgs/applications/science/math/gmsh/CMakeLists.txt.patch b/pkgs/applications/science/math/gmsh/CMakeLists.txt.patch deleted file mode 100644 index 0326a8d296a0..000000000000 --- a/pkgs/applications/science/math/gmsh/CMakeLists.txt.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -324,25 +324,16 @@ - set_config_option(HAVE_BLAS "Blas(IntelMKL)") - set_config_option(HAVE_LAPACK "Lapack(IntelMKL)") - else(LAPACK_LIBRARIES) -- # on Linux also try to find ATLAS without a Fortran compiler, because -- # cmake ships with a buggy FindBLAS e.g. on Ubuntu Lucid Lynx -- set(ATLAS_LIBS_REQUIRED lapack f77blas cblas atlas) -- find_all_libraries(LAPACK_LIBRARIES ATLAS_LIBS_REQUIRED "" "") -+ # try with generic names -+ set(GENERIC_LIBS_REQUIRED lapack blas pthread) -+ find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "") - if(LAPACK_LIBRARIES) -- set_config_option(HAVE_BLAS "Blas(ATLAS)") -- set_config_option(HAVE_LAPACK "Lapack(ATLAS)") -- else(LAPACK_LIBRARIES) -- # try with generic names -- set(GENERIC_LIBS_REQUIRED lapack blas pthread) -- find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "") -- if(LAPACK_LIBRARIES) -- set_config_option(HAVE_BLAS "Blas(Generic)") -- set_config_option(HAVE_LAPACK "Lapack(Generic)") -- find_library(GFORTRAN_LIB gfortran) -- if(GFORTRAN_LIB) -- list(APPEND LAPACK_LIBRARIES ${GFORTRAN_LIB}) -- endif(GFORTRAN_LIB) -- endif(LAPACK_LIBRARIES) -+ set_config_option(HAVE_BLAS "Blas(Generic)") -+ set_config_option(HAVE_LAPACK "Lapack(Generic)") -+ find_library(GFORTRAN_LIB gfortran) -+ if(GFORTRAN_LIB) -+ list(APPEND LAPACK_LIBRARIES ${GFORTRAN_LIB}) -+ endif(GFORTRAN_LIB) - endif(LAPACK_LIBRARIES) - endif(LAPACK_LIBRARIES) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index 4d0bb487c122..de4bd270d68d 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, blas, liblapack, gfortran, gmm, fltk, libjpeg +{ stdenv, fetchurl, cmake, openblasCompat, gfortran, gmm, fltk, libjpeg , zlib, libGLU_combined, libGLU, xorg }: let version = "4.0.4"; in @@ -11,11 +11,7 @@ stdenv.mkDerivation { sha256 = "1hvrls3xyxvn69kwicpvndrs0zhifcfkhfsxr8zkmhmn6fhnjhha"; }; - # 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 gmm fltk libjpeg zlib libGLU_combined + buildInputs = [ cmake openblasCompat gmm fltk libjpeg zlib libGLU_combined libGLU xorg.libXrender xorg.libXcursor xorg.libXfixes xorg.libXext xorg.libXft xorg.libXinerama xorg.libX11 xorg.libSM xorg.libICE ]; From 644ab709e70fe7631a8c2c77380fce9bcf562842 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 14 Nov 2018 12:33:37 +0100 Subject: [PATCH 3/3] gmsh: restrict platform to x86_64-linux --- pkgs/applications/science/math/gmsh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index de4bd270d68d..7c8e62cc97ce 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { meta = { description = "A three-dimensional finite element mesh generator"; homepage = http://gmsh.info/; - platforms = stdenv.lib.platforms.all; + platforms = [ "x86_64-linux" ]; license = stdenv.lib.licenses.gpl2Plus; }; }