diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-03-23 22:07:57 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-03-23 22:08:06 +0100 |
commit | 2b075b0a2b5908b305acc099aa170ce0850e043c (patch) | |
tree | 11f48301364fd754b05b62e822f115d6d9127a7b /pkgs/applications/science | |
parent | 817a592c923636e0f5c3549d393c603fec1c4db7 (diff) |
gmsh: 4.11.1 -> 4.12.2
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/math/gmsh/default.nix | 19 | ||||
-rw-r--r-- | pkgs/applications/science/math/gmsh/fix-python.patch | 53 |
2 files changed, 11 insertions, 61 deletions
diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index 669d3a3ab8f1e..57b20fe12d7c2 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg +{ lib, stdenv, fetchurl, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg , zlib, libGL, libGLU, xorg, opencascade-occt , python ? null, enablePython ? false }: @@ -7,11 +7,11 @@ assert enablePython -> (python != null); stdenv.mkDerivation rec { pname = "gmsh"; - version = "4.11.1"; + version = "4.12.2"; src = fetchurl { url = "https://gmsh.info/src/gmsh-${version}-source.tgz"; - sha256 = "sha256-xf4bfL1AOIioFJKfL9D11p4nYAIioYx4bbW3boAFs2U="; + hash = "sha256-E+CdnKgQLlxAFx1u4VDGaHQrmMOmylf4N/e2Th4q9I8="; }; buildInputs = [ @@ -26,19 +26,6 @@ stdenv.mkDerivation rec { patches = [ ./fix-python.patch - - # Pull upstream fix git gcc-13: - # https://gitlab.onelab.info/gmsh/gmsh/-/issues/2416 - (fetchpatch { - name = "gcc-13-p1.patch"; - url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/fb81a9c9026700e078de947b4522cb39e543a86b.patch"; - hash = "sha256-1GInFqQZvOgflC3eQTjmZ9uBGFASRNCpCwDACN3yTQ4="; - }) - (fetchpatch { - name = "gcc-13-p2.patch"; - url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/aceb09c807b78ea26555f99fcb16c4f87c31fb5a.patch"; - hash = "sha256-6FI0hIvj8hglCvxoKV0GzT2/F/Wz+ddkxV/TLzzJBLU="; - }) ]; postPatch = '' diff --git a/pkgs/applications/science/math/gmsh/fix-python.patch b/pkgs/applications/science/math/gmsh/fix-python.patch index ac07c169c99b8..41c5c3b8f9760 100644 --- a/pkgs/applications/science/math/gmsh/fix-python.patch +++ b/pkgs/applications/science/math/gmsh/fix-python.patch @@ -1,50 +1,13 @@ diff --git a/api/gmsh.py b/api/gmsh.py -index 747acb203..02004da5d 100644 +index f525284..a225c85 100644 --- a/api/gmsh.py +++ b/api/gmsh.py -@@ -44,44 +44,7 @@ moduledir = os.path.dirname(os.path.realpath(__file__)) - parentdir1 = os.path.dirname(moduledir) - parentdir2 = os.path.dirname(parentdir1) +@@ -78,6 +78,8 @@ if not libpath: + else: + libpath = find_library("gmsh") --if platform.system() == "Windows": -- libname = "gmsh-4.11.dll" --elif platform.system() == "Darwin": -- libname = "libgmsh.4.11.dylib" --else: -- libname = "libgmsh.so.4.11" -- --# check if the library is in the same directory as the module... --libpath = os.path.join(moduledir, libname) -- --# ... or in the parent directory or its lib or Lib subdirectory --if not os.path.exists(libpath): -- libpath = os.path.join(parentdir1, libname) --if not os.path.exists(libpath): -- libpath = os.path.join(parentdir1, "lib", libname) --if not os.path.exists(libpath): -- libpath = os.path.join(parentdir1, "Lib", libname) -- --# ... or in the parent of the parent directory or its lib or Lib subdirectory --if not os.path.exists(libpath): -- libpath = os.path.join(parentdir2, libname) --if not os.path.exists(libpath): -- libpath = os.path.join(parentdir2, "lib", libname) --if not os.path.exists(libpath): -- libpath = os.path.join(parentdir2, "Lib", libname) -- --# if we couldn't find it, use ctype's find_library utility... --if not os.path.exists(libpath): -- if platform.system() == "Windows": -- libpath = find_library("gmsh-4.11") -- if not libpath: -- libpath = find_library("gmsh") -- else: -- libpath = find_library("gmsh") -- --# ... and print a warning if everything failed --if not os.path.exists(libpath): -- print("Warning: could not find Gmsh shared library " + libname) +libpath = "@LIBPATH@" - - lib = CDLL(libpath) - ++ + # ... and print a warning if everything failed + if not libpath: + print("Warning: could not find Gmsh shared library " + libname + |