uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
107
pkgs/development/python-modules/transformers/default.nix
Normal file
107
pkgs/development/python-modules/transformers/default.nix
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, cookiecutter
|
||||
, filelock
|
||||
, huggingface-hub
|
||||
, importlib-metadata
|
||||
, regex
|
||||
, requests
|
||||
, numpy
|
||||
, packaging
|
||||
, tensorflow
|
||||
, sagemaker
|
||||
, ftfy
|
||||
, protobuf
|
||||
, scikit-learn
|
||||
, pillow
|
||||
, pyyaml
|
||||
, pytorch
|
||||
, tokenizers
|
||||
, tqdm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "transformers";
|
||||
version = "4.19.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "huggingface";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-9r/1vW7Rhv9+Swxdzu5PTnlQlT8ofJeZamHf5X4ql8w=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
filelock
|
||||
huggingface-hub
|
||||
numpy
|
||||
protobuf
|
||||
packaging
|
||||
pyyaml
|
||||
regex
|
||||
requests
|
||||
tokenizers
|
||||
tqdm
|
||||
] ++ lib.optionals (pythonOlder "3.8") [
|
||||
importlib-metadata
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
ja = [
|
||||
# fugashi
|
||||
# ipadic
|
||||
# unidic_lite
|
||||
# unidic
|
||||
];
|
||||
sklearn = [
|
||||
scikit-learn
|
||||
];
|
||||
tf = [
|
||||
tensorflow
|
||||
# onnxconverter-common
|
||||
# tf2onnx
|
||||
];
|
||||
torch = [
|
||||
pytorch
|
||||
];
|
||||
tokenizers = [
|
||||
tokenizers
|
||||
];
|
||||
modelcreation = [
|
||||
cookiecutter
|
||||
];
|
||||
sagemaker = [
|
||||
sagemaker
|
||||
];
|
||||
ftfy = [ ftfy ];
|
||||
onnx = [
|
||||
# onnxconverter-common
|
||||
# tf2onnx
|
||||
];
|
||||
vision = [
|
||||
pillow
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Many tests require internet access.
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"transformers"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/huggingface/transformers";
|
||||
description = "Natural Language Processing for TensorFlow 2.0 and PyTorch";
|
||||
changelog = "https://github.com/huggingface/transformers/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ pashashocky ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue