python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / catch2 / 3.nix
blob0fdfe1cbdbb3cb7554ae0747d14a9ba3d9fce679
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , python3
6 }:
8 stdenv.mkDerivation rec {
9   pname = "catch2";
10   version = "3.1.1";
12   src = fetchFromGitHub {
13     owner = "catchorg";
14     repo = "Catch2";
15     rev = "v${version}";
16     hash = "sha256-l/bqW32c1vAzE3jN01VystZXuH2ZiOQGgXkh/Mcq2eI=";
17   };
19   nativeBuildInputs = [
20     cmake
21   ];
23   cmakeFlags = [
24     "-DCATCH_DEVELOPMENT_BUILD=ON"
25     "-DCATCH_BUILD_TESTING=${if doCheck then "ON" else "OFF"}"
26   ] ++ lib.optionals (stdenv.isDarwin && doCheck) [
27     # test has a faulty path normalization technique that won't work in
28     # our darwin build environment https://github.com/catchorg/Catch2/issues/1691
29     "-DCMAKE_CTEST_ARGUMENTS=-E;ApprovalTests"
30   ];
32   doCheck = true;
34   checkInputs = [
35     python3
36   ];
38   meta = {
39     description = "Modern, C++-native, test framework for unit-tests";
40     homepage = "https://github.com/catchorg/Catch2";
41     changelog = "https://github.com/catchorg/Catch2/blob/${src.rev}/docs/release-notes.md";
42     license = lib.licenses.boost;
43     maintainers = with lib.maintainers; [ dotlambda ];
44     platforms = lib.platforms.unix;
45   };