taskflow: fix cross build (#399081)

* taskflow: fix cross build

This package's CMake setup conflates building and running tests,
so we must disable test building explicitly for cross builds.

* taskflow: convert to finalAttrs pattern
This commit is contained in:
Arne Keller 2025-04-19 19:48:42 +02:00 committed by GitHub
parent 77b5bffd0f
commit 641094ae90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,14 +7,14 @@
stdenv, stdenv,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "taskflow"; pname = "taskflow";
version = "3.9.0"; version = "3.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "taskflow"; owner = "taskflow";
repo = "taskflow"; repo = "taskflow";
tag = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-omon02xgf4vV7JzpLFtHgf2MXxR6JowI+pDyAswXMUY="; hash = "sha256-omon02xgf4vV7JzpLFtHgf2MXxR6JowI+pDyAswXMUY=";
}; };
@ -35,6 +35,11 @@ stdenv.mkDerivation rec {
cmake cmake
]; ];
cmakeFlags = [
# building the tests implies running them in the buildPhase
(lib.cmakeBool "TF_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
];
doCheck = true; doCheck = true;
meta = { meta = {
@ -42,11 +47,11 @@ stdenv.mkDerivation rec {
homepage = "https://taskflow.github.io/"; homepage = "https://taskflow.github.io/";
changelog = changelog =
let let
release = lib.replaceStrings [ "." ] [ "-" ] version; release = lib.replaceStrings [ "." ] [ "-" ] finalAttrs.version;
in in
"https://taskflow.github.io/taskflow/release-${release}.html"; "https://taskflow.github.io/taskflow/release-${release}.html";
license = lib.licenses.mit; license = lib.licenses.mit;
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ dotlambda ]; maintainers = with lib.maintainers; [ dotlambda ];
}; };
} })