nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 48 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 toPythonModule, 5 fetchFromGitHub, 6 cmake, 7 gtest, 8 xtensor, 9 pybind11, 10 numpy, 11}: 12 13toPythonModule ( 14 stdenv.mkDerivation (finalAttrs: { 15 pname = "xtensor-python"; 16 version = "0.29.0"; 17 18 src = fetchFromGitHub { 19 owner = "xtensor-stack"; 20 repo = "xtensor-python"; 21 tag = finalAttrs.version; 22 hash = "sha256-GN1X46gmeXh3pM6sw9sSUahLOxnSoimoY+K66vy8SxM="; 23 }; 24 25 nativeBuildInputs = [ cmake ]; 26 buildInputs = [ pybind11 ]; 27 nativeCheckInputs = [ gtest ]; 28 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 29 cmakeFlags = [ 30 # Always build the tests, even if not running them, because testing whether 31 # they can be built is a test in itself. 32 (lib.cmakeBool "BUILD_TESTS" true) 33 ]; 34 35 propagatedBuildInputs = [ 36 xtensor 37 numpy 38 ]; 39 40 checkTarget = "xtest"; 41 42 meta = { 43 homepage = "https://github.com/xtensor-stack/xtensor-python"; 44 description = "Python bindings for the xtensor C++ multi-dimensional array library"; 45 license = lib.licenses.bsd3; 46 }; 47 }) 48)