Commit 2de67f8b authored by qbisi's avatar qbisi
Browse files
parent 02e8e981
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  makeDesktopItem,
  copyDesktopItems,
  cmake,
@@ -26,11 +25,11 @@ assert (!blas.isILP64) && (!lapack.isILP64);

stdenv.mkDerivation (finalAttrs: {
  pname = "gmsh";
  version = "4.13.1";
  version = "4.14.0";

  src = fetchurl {
    url = "https://gmsh.info/src/gmsh-${finalAttrs.version}-source.tgz";
    hash = "sha256-d5chRfQxcmAm1QWWpqRPs8HJXCElUhjWaVWAa4btvo0=";
    hash = "sha256-2019ogYumkNWqCCDITirmfl69jiL/rIVmaLq37C3aig=";
  };

  nativeBuildInputs = [
@@ -66,18 +65,6 @@ stdenv.mkDerivation (finalAttrs: {
  ]
  ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;

  patches = [
    (fetchpatch {
      url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/7d5094fb0a5245cb435afd3f3e8c35e2ecfe70fd.patch";
      hash = "sha256-3atm1NGsMI4KEct2xakRG6EasRpF6YRI4raoVYxBV4g=";
    })
  ];

  postPatch = ''
    substituteInPlace api/gmsh.py \
      --replace-fail 'find_library("gmsh")' \"$out/lib/libgmsh${stdenv.hostPlatform.extensions.sharedLibrary}\"
  '';

  # N.B. the shared object is used by bindings
  cmakeFlags = [
    "-DENABLE_BUILD_SHARED=ON"
@@ -124,6 +111,7 @@ stdenv.mkDerivation (finalAttrs: {
    description = "Three-dimensional finite element mesh generator";
    mainProgram = "gmsh";
    homepage = "https://gmsh.info/";
    changelog = "https://gitlab.onelab.info/gmsh/gmsh/-/releases/gmsh_${lib.concatStringsSep "_" (lib.versions.splitVersion finalAttrs.version)}#changelog";
    license = lib.licenses.gpl2Plus;
  };
})