Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, chainer 4, fetchFromGitHub 5, hatchling 6, jupyter 7, keras 8 #, mxnet 9, nbconvert 10, nbformat 11, nose 12, numpy 13, parameterized 14, pytestCheckHook 15, pythonOlder 16}: 17 18buildPythonPackage rec { 19 pname = "einops"; 20 version = "0.6.0"; 21 format = "pyproject"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = "arogozhnikov"; 27 repo = pname; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-/bnp8IhDxp8EB/PoW5Dz+7rOru0/odOrts84aq4qyJw="; 30 }; 31 32 nativeBuildInputs = [ hatchling ]; 33 34 nativeCheckInputs = [ 35 chainer 36 jupyter 37 keras 38 # mxnet (has issues with some CPUs, segfault) 39 nbconvert 40 nbformat 41 nose 42 numpy 43 parameterized 44 pytestCheckHook 45 ]; 46 47 # No CUDA in sandbox 48 EINOPS_SKIP_CUPY = 1; 49 50 preCheck = '' 51 export HOME=$(mktemp -d); 52 ''; 53 54 pythonImportsCheck = [ 55 "einops" 56 ]; 57 58 disabledTests = [ 59 # Tests are failing as mxnet is not pulled-in 60 # https://github.com/NixOS/nixpkgs/issues/174872 61 "test_all_notebooks" 62 "test_dl_notebook_with_all_backends" 63 "test_backends_installed" 64 ]; 65 66 disabledTestPaths = [ 67 "tests/test_layers.py" 68 ]; 69 70 meta = with lib; { 71 description = "Flexible and powerful tensor operations for readable and reliable code"; 72 homepage = "https://github.com/arogozhnikov/einops"; 73 license = licenses.mit; 74 maintainers = with maintainers; [ yl3dy ]; 75 }; 76} 77