nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 63 lines 1.4 kB view raw
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 pillow, 5 scipy, 6 numpy, 7 pytestCheckHook, 8 imread, 9 lib, 10 stdenv, 11}: 12 13buildPythonPackage rec { 14 pname = "mahotas"; 15 version = "1.4.18"; 16 format = "setuptools"; 17 18 src = fetchFromGitHub { 19 owner = "luispedro"; 20 repo = "mahotas"; 21 tag = "v${version}"; 22 hash = "sha256-NZOas2fL01QZhi6ebIkW0/jfviwiUl+AqjC7XmC4xH4="; 23 }; 24 25 propagatedBuildInputs = [ 26 imread 27 numpy 28 pillow 29 scipy 30 ]; 31 32 nativeCheckInputs = [ pytestCheckHook ]; 33 34 # mahotas/_morph.cpp:864:10: error: no member named 'random_shuffle' in namespace 'std' 35 env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-std=c++14"; }; 36 37 # tests must be run in the build directory 38 preCheck = '' 39 cd build/lib* 40 ''; 41 42 # re-enable as soon as https://github.com/luispedro/mahotas/issues/97 is fixed 43 disabledTests = [ 44 "test_colors" 45 "test_ellipse_axes" 46 "test_normalize" 47 "test_haralick3d" 48 ]; 49 50 pythonImportsCheck = [ "mahotas" ]; 51 52 meta = { 53 broken = 54 (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) 55 # Failing tests 56 || stdenv.hostPlatform.isi686; 57 description = "Computer vision package based on numpy"; 58 homepage = "https://mahotas.readthedocs.io/"; 59 maintainers = with lib.maintainers; [ luispedro ]; 60 license = lib.licenses.mit; 61 platforms = lib.platforms.unix; 62 }; 63}