From fbe92541325d60bd65f106496c850627e29ec40c Mon Sep 17 00:00:00 2001 From: Daniel Salwasser Date: Thu, 2 Oct 2025 17:15:49 +0200 Subject: [PATCH 1/3] kagen: 1.1.0 -> 1.2.0 --- pkgs/by-name/ka/kagen/package.nix | 35 ++++++++----------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/pkgs/by-name/ka/kagen/package.nix b/pkgs/by-name/ka/kagen/package.nix index 1b830896ca49..9f44dfb760a7 100644 --- a/pkgs/by-name/ka/kagen/package.nix +++ b/pkgs/by-name/ka/kagen/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch2, cmake, pkg-config, mpi, @@ -20,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "kagen"; - version = "1.1.0"; + version = "1.2.0"; src = fetchFromGitHub { owner = "KarlsruheGraphGeneration"; @@ -28,26 +27,9 @@ stdenv.mkDerivation (finalAttrs: { tag = "v${finalAttrs.version}"; # use vendor libmorton and xxHash fetchSubmodules = true; - hash = "sha256-FSlTNOQgwPGOn4mIVIgFejvU0dpyydomHYJOKPz1UjU="; + hash = "sha256-2jXHHS9Siu6hXrYPIrZSOWe6D2PgsvrbMw/7Ykpc3wk="; }; - patches = [ - # replace asm by builtin function to ensure compatibility with arm64 - (fetchpatch2 { - url = "https://github.com/KarlsruheGraphGeneration/KaGen/commit/cab9d5dc6cc256972e52675ad9c385524d40ecd9.patch?full_index=1"; - hash = "sha256-DCsuwUiE98UKZMxlUI9p36/wq486uHHrUphrIVqM+Cc="; - }) - ]; - - postPatch = '' - substituteInPlace tests/CMakeLists.txt \ - --replace-fail "FetchContent_MakeAvailable(googletest)" "find_package(GTest REQUIRED)"\ - --replace-fail "set_property(DIRECTORY" "#set_property(DIRECTORY" - - substituteInPlace kagen/CMakeLists.txt \ - --replace-fail "OBJECT" "" - ''; - nativeBuildInputs = [ cmake pkg-config @@ -66,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + (lib.cmakeBool "KAGEN_USE_BUNDLED_GTEST" false) (lib.cmakeBool "KAGEN_BUILD_EXAMPLES" withExamples) (lib.cmakeBool "KAGEN_BUILD_TESTS" finalAttrs.finalPackage.doCheck) ]; @@ -80,16 +63,16 @@ stdenv.mkDerivation (finalAttrs: { mpiCheckPhaseHook ]; - disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ - # flaky tests on aarch64-darwin + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # flaky tests on darwin "test_rgg2d.2cores" "test_rgg2d.4cores" + "test_edge_weights.2cores" + "test_edge_weights.4cores" + "test_permutation.2cores" + "test_permutation.4cores" ]; - postInstall = '' - cmake --install . --component tools - ''; - meta = { description = "Communication-free Massively Distributed Graph Generators"; homepage = "https://github.com/KarlsruheGraphGeneration/KaGen"; From 9b48e6f7ccb31be01d8bdb164d3da794cd44bc20 Mon Sep 17 00:00:00 2001 From: qbisi Date: Fri, 3 Oct 2025 00:34:02 +0800 Subject: [PATCH 2/3] cgal: propagate boost --- pkgs/by-name/cg/cgal/package.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/cg/cgal/package.nix b/pkgs/by-name/cg/cgal/package.nix index 8ccae7b37b7e..e475e253adeb 100644 --- a/pkgs/by-name/cg/cgal/package.nix +++ b/pkgs/by-name/cg/cgal/package.nix @@ -6,6 +6,7 @@ boost, gmp, mpfr, + testers, }: stdenv.mkDerivation (finalAttrs: { @@ -17,19 +18,32 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-8wxb58JaKj6iS8y6q1z2P6/aY8AnnzTX5/izISgh/tY="; }; + patches = [ ./cgal_path.patch ]; + + nativeBuildInputs = [ cmake ]; + # note: optional component libCGAL_ImageIO would need zlib and opengl; # there are also libCGAL_Qt{3,4} omitted ATM buildInputs = [ - boost gmp mpfr ]; - nativeBuildInputs = [ cmake ]; - patches = [ ./cgal_path.patch ]; + propagatedBuildInputs = [ + boost + ]; doCheck = false; + passthru = { + tests = { + cmake-config = testers.hasCmakeConfigModules { + moduleNames = [ "CGAL" ]; + package = finalAttrs.finalPackage; + }; + }; + }; + meta = { description = "Computational Geometry Algorithms Library"; homepage = "http://cgal.org"; From 7ff10fc2bbd112d0863b809a3ed9813f106ebac6 Mon Sep 17 00:00:00 2001 From: qbisi Date: Fri, 3 Oct 2025 00:35:00 +0800 Subject: [PATCH 3/3] kagen: build with cgal --- pkgs/by-name/ka/kagen/package.nix | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/ka/kagen/package.nix b/pkgs/by-name/ka/kagen/package.nix index 9f44dfb760a7..57842dfa679a 100644 --- a/pkgs/by-name/ka/kagen/package.nix +++ b/pkgs/by-name/ka/kagen/package.nix @@ -5,16 +5,14 @@ cmake, pkg-config, mpi, - cgal_5, - boost, - gmp, - mpfr, + cgal, sparsehash, imagemagick, gtest, ctestCheckHook, mpiCheckPhaseHook, withExamples ? false, + testers, }: stdenv.mkDerivation (finalAttrs: { @@ -36,14 +34,13 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - mpi - cgal_5 - sparsehash imagemagick - # should be propagated by cgal - boost - gmp - mpfr + ]; + + propagatedBuildInputs = [ + mpi + cgal + sparsehash ]; cmakeFlags = [ @@ -73,6 +70,15 @@ stdenv.mkDerivation (finalAttrs: { "test_permutation.4cores" ]; + passthru = { + tests = { + cmake-config = testers.hasCmakeConfigModules { + moduleNames = [ "KaGen" ]; + package = finalAttrs.finalPackage; + }; + }; + }; + meta = { description = "Communication-free Massively Distributed Graph Generators"; homepage = "https://github.com/KarlsruheGraphGeneration/KaGen";