default.nix (1094B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 python3Packages, 6 cmake, 7 which, 8 revtok, 9 }: 10 11 python3Packages.buildPythonPackage rec { 12 pname = "pytorchtext"; 13 version = "0.10.1"; 14 15 src = fetchFromGitHub { 16 owner = "pytorch"; 17 repo = "text"; 18 rev = "v${version}"; 19 hash = "sha256-UCH/12jVeUY+h3Qop/RPtjIeXdddA1upsWIiwAs8+bc="; 20 fetchSubmodules = true; 21 }; 22 23 nativeBuildInputs = [ 24 cmake 25 which 26 ]; 27 28 buildInputs = with python3Packages; [ pybind11 ]; 29 30 dependencies = with python3Packages; [ 31 defusedxml 32 nltk 33 pytorch 34 requests 35 revtok 36 sacremoses 37 spacy 38 tqdm 39 ]; 40 41 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 42 43 dontUseCmakeConfigure = true; 44 45 doCheck = false; 46 47 pythonImportsCheck = [ "torchtext" ]; 48 49 meta = { 50 description = "Text utilities and datasets for PyTorch"; 51 homepage = "https://github.com/pytorch/text"; 52 license = lib.licenses.bsd3; 53 maintainers = [ lib.maintainers.sikmir ]; 54 #broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/issues/94241 55 broken = true; # sentry-sdk 56 }; 57 }