Unverified Commit 641094ae authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

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
parent 77b5bffd
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -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 ];
  };
}
})