From 3709987d4a25b38bdc459fccbbbadecc7d1bada7 Mon Sep 17 00:00:00 2001 From: Bryan HONOF Date: Sat, 16 May 2026 13:19:06 +0200 Subject: [PATCH] qrupdate: fix test failures on aarch64-linux I think keeping the patch files around is a bit too difficult to maintain. Instead, I think relying on CTest to skip the tests is a better way forward. Perhaps it's a bit overeager on which tests it skips, but I think it makes sense. --- pkgs/by-name/qr/qrupdate/package.nix | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/qr/qrupdate/package.nix b/pkgs/by-name/qr/qrupdate/package.nix index 9dd97a281227..0947f6267cf3 100644 --- a/pkgs/by-name/qr/qrupdate/package.nix +++ b/pkgs/by-name/qr/qrupdate/package.nix @@ -7,6 +7,7 @@ which, gfortran, blas, + ctestCheckHook, }: stdenv.mkDerivation (finalAttrs: { @@ -42,16 +43,6 @@ stdenv.mkDerivation (finalAttrs: { "-DBLA_VENDOR=Generic" ]; - patches = - # https://github.com/mpimd-csc/qrupdate-ng/issues/4 - lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ - ./disable-zch1dn-test.patch - ] - # https://github.com/mpimd-csc/qrupdate-ng/issues/7 - ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ - ./disable-aarch64-single-precision-tests.patch - ]; - postPatch = '' sed '/^cmake_minimum_required/Is/VERSION [0-9]\.[0-9]/VERSION 3.5/' -i ./CMakeLists.txt ''; @@ -63,11 +54,26 @@ stdenv.mkDerivation (finalAttrs: { which gfortran ]; + buildInputs = [ blas lapack ]; + nativeCheckInputs = [ + ctestCheckHook + ]; + + disabledTests = + lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ + # https://github.com/mpimd-csc/qrupdate-ng/issues/7 + "test_tchshx" + ] + ++ lib.optionals (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) [ + # https://github.com/mpimd-csc/qrupdate-ng/issues/4 + "test_tch1dn" + ]; + meta = { description = "Library for fast updating of qr and cholesky decompositions"; homepage = "https://github.com/mpimd-csc/qrupdate-ng";