Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 42 lines 978 B view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, gtest 6, xsimd 7, xtl 8}: 9stdenv.mkDerivation rec { 10 pname = "xtensor"; 11 version = "0.23.10"; 12 13 src = fetchFromGitHub { 14 owner = "xtensor-stack"; 15 repo = "xtensor"; 16 rev = version; 17 sha256 = "1ayrhyh9x33b87ic01b4jzxc8x27yxpxzya5x54ikazvz8p71n14"; 18 }; 19 20 nativeBuildInputs = [ cmake ]; 21 propagatedBuildInputs = [ xtl xsimd ]; 22 23 cmakeFlags = [ "-DBUILD_TESTS=ON" ]; 24 25 doCheck = true; 26 nativeCheckInputs = [ gtest ]; 27 checkTarget = "xtest"; 28 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 ''; 34 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 }; 42}