Unverified Commit 1796f7bb authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

cgns: fix crash for test_particlef on LoongArch64 (#478445)

parents 545bc019 2ae9a7ed
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch2,
  cmake,
  gfortran,
  tk,
@@ -22,6 +23,14 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-0cZtq8nVAHAubHD6IDofnh8N7xiNHQkbhXR5OpdhPQU=";
  };

  patches = [
    # Fixes crash for test_particlef on LoongArch64
    (fetchpatch2 {
      url = "https://github.com/CGNS/CGNS/commit/0ea14abf6da44f13ca8a01117ad7af8eb405394c.patch?full_index=1";
      hash = "sha256-dtwTD8YqRm0NCXTDPRHmaPLTU17ZLzOyVii1aoGYge0=";
    })
  ];

  postPatch = ''
    substituteInPlace src/cgnstools/tkogl/tkogl.c \
      --replace-fail "<tk-private/generic/tkInt.h>" "<tkInt.h>"