python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / xtensor / default.nix
blob3503c6894efe9c950dbbf009dd531f704cfb4f94
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , gtest
6 , xsimd
7 , xtl
8 }:
9 stdenv.mkDerivation rec {
10   pname = "xtensor";
11   version = "0.23.10";
13   src = fetchFromGitHub {
14     owner = "xtensor-stack";
15     repo = "xtensor";
16     rev = version;
17     sha256 = "1ayrhyh9x33b87ic01b4jzxc8x27yxpxzya5x54ikazvz8p71n14";
18   };
20   nativeBuildInputs = [ cmake ];
21   propagatedBuildInputs = [ xtl xsimd ];
23   cmakeFlags = [ "-DBUILD_TESTS=ON" ];
25   doCheck = true;
26   checkInputs = [ gtest ];
27   checkTarget = "xtest";
29   # https://github.com/xtensor-stack/xtensor/issues/2542
30   postPatch = ''
31     substituteInPlace xtensor.pc.in \
32       --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
33   '';
35   meta = with lib; {
36     description = "Multi-dimensional arrays with broadcasting and lazy computing.";
37     homepage = "https://github.com/xtensor-stack/xtensor";
38     license = licenses.bsd3;
39     maintainers = with maintainers; [ cpcloud ];
40     platforms = platforms.all;
41   };