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