diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-03-28 12:01:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 12:01:21 +0000 |
commit | 69de1e1beb4fa322688a2bac5761e59a2b17e15e (patch) | |
tree | 2c672557314d0e6073b8235691454e54cfade688 /pkgs/applications/science/math | |
parent | 6ee3a444b9388293ae70d82534c8a4dd8f9f53e7 (diff) | |
parent | 203f07f4070816be84c376d1ae0dc88f91ab1fef (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/science/math')
-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 + |