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