From aeea7ebc571455f5e7f42a4b561c4670d8a1eb08 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 21 Dec 2024 18:13:21 +0100 Subject: [PATCH] lib2geom: Add passthru.tests Inkscape is the primary consumer. Also make sure the cross compilation works. --- pkgs/by-name/li/lib2geom/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/li/lib2geom/package.nix b/pkgs/by-name/li/lib2geom/package.nix index 9a6c86be98a91..1077a133290c6 100644 --- a/pkgs/by-name/li/lib2geom/package.nix +++ b/pkgs/by-name/li/lib2geom/package.nix @@ -11,6 +11,8 @@ double-conversion, gtest, lib, + inkscape, + pkgsCross, }: stdenv.mkDerivation (finalAttrs: { @@ -87,6 +89,17 @@ stdenv.mkDerivation (finalAttrs: { runHook postCheck ''; + passthru = { + tests = + { + inherit inkscape; + } + # Make sure x86_64-linux -> aarch64-linux cross compilation works + // lib.optionalAttrs (stdenv.buildPlatform.system == "x86_64-linux") { + aarch64-cross = pkgsCross.aarch64-multiplatform.lib2geom; + }; + }; + meta = with lib; { description = "Easy to use 2D geometry library in C++"; homepage = "https://gitlab.com/inkscape/lib2geom";