Skip to content

Commit

Permalink
geogram: 1.8.6 -> 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
petrzjunior committed Jan 26, 2025
1 parent 1fbdba4 commit ced568b
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions pkgs/by-name/ge/geogram/package.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,

cmake,
doxygen,
zlib,
python3Packages,
nix-update-script,
fetchpatch2,
}:

let
exploragram = fetchFromGitHub {
owner = "BrunoLevy";
repo = "exploragram";
rev = "3190f685653f8aa75b7c4604d008c59a999f1bb6";
hash = "sha256-9ePCOyQWSxu12PtHFSxfoDcvTtxvYR3T68sU3cAfZiE=";
};
testdata = fetchFromGitHub {
owner = "BrunoLevy";
repo = "geogram.data";
rev = "43dd49054a78d9b3fb8ef729f48ab47a272c718c";
hash = "sha256-F2Lyt4nEOczVYLz6WLny+YrsxNwREBGPkProN8NHFN4=";
rev = "ceab6179189d23713b902b6f26ea2ff36aea1515";
hash = "sha256-zUmYI6+0IdDkglLzzWHS8ZKmc5O6aJ2X4IwRBouRIxI=";
};
in
stdenv.mkDerivation rec {
pname = "geogram";
version = "1.8.6";
version = "1.9.2";

src = fetchurl {
url = "https://github.com/BrunoLevy/geogram/releases/download/v${version}/geogram_${version}.tar.gz";
hash = "sha256-Xqha5HVqD2Ao0z++RKcQdMZUmtMb5eZ1DMJEVrfNUzE=";
src = fetchFromGitHub {
owner = "BrunoLevy";
repo = "geogram";
tag = "v${version}";
hash = "sha256-v7ChuE9F/z1MD5OUMiGXZWiGqjMauIka4sNXVDe/yYU=";
fetchSubmodules = true;
};

outputs = [
Expand Down Expand Up @@ -65,11 +74,22 @@ stdenv.mkDerivation rec {
zlib
];

# exploragram library is not listed as submodule and must be copied manually
prePatch = ''
cp -r ${exploragram} ./src/lib/exploragram/ && chmod 755 ./src/lib/exploragram/
'';

patches = [
# This patch replaces the bundled (outdated) zlib with our zlib
# Should be harmless, but if there are issues this patch can also be removed
# Also check https://github.com/BrunoLevy/geogram/issues/49 for progress
./replace-bundled-zlib.patch

# fixes https://github.com/BrunoLevy/geogram/issues/203, remove when 1.9.3 is released
(fetchpatch2 {
url = "https://github.com/BrunoLevy/geogram/commit/2e1b6fba499ddc55b2150a1f610cf9f8d4934c39.patch";
hash = "sha256-t6Pocf3VT8HpKOSh1UKKa0QHpsZyFqlAng6ltiAfKA8=";
})
];

postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 ''
Expand All @@ -90,16 +110,12 @@ stdenv.mkDerivation rec {
checkPhase =
let
skippedTests = [
# Failing tests as of version 1.8.3
"FileConvert"
"Reconstruct"
"Remesh"

# Skip slow RVD test
"RVD"

# Flaky as of 1.8.5 (SIGSEGV, possibly a use-after-free)
"Delaunay"
# Needs unfree library geogramplus with extended precision
# see https://github.com/BrunoLevy/geogram/wiki/GeogramPlus
"CSGplus"
];
in
''
Expand All @@ -115,6 +131,8 @@ stdenv.mkDerivation rec {
runHook postCheck
'';

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "Programming Library with Geometric Algorithms";
longDescription = ''
Expand All @@ -125,10 +143,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/BrunoLevy/geogram";
license = licenses.bsd3;

# Broken on aarch64-linux as of version 1.8.3
# See https://github.com/BrunoLevy/geogram/issues/74
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;

platforms = [
"x86_64-linux"
"aarch64-linux"
Expand Down

0 comments on commit ced568b

Please sign in to comment.