diff options
Diffstat (limited to 'pkgs/development/python-modules/spacy/default.nix')
-rw-r--r-- | pkgs/development/python-modules/spacy/default.nix | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index 4fd3594b882..43e9ab052d5 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -27,6 +27,11 @@ , typer , typing-extensions , wasabi +, writeScript +, stdenv +, nix +, git +, nix-update }: buildPythonPackage rec { @@ -85,7 +90,19 @@ buildPythonPackage rec { "spacy" ]; - passthru.tests.annotation = callPackage ./annotation-test { }; + passthru = { + updateScript = writeScript "update-spacy" '' + #!${stdenv.shell} + set -eou pipefail + PATH=${lib.makeBinPath [ nix git nix-update ]} + + nix-update python3Packages.spacy + + # update spacy models as well + echo | nix-shell maintainers/scripts/update.nix --argstr package python3Packages.spacy_models.en_core_web_sm + ''; + tests.annotation = callPackage ./annotation-test { }; + }; meta = with lib; { description = "Industrial-strength Natural Language Processing (NLP)"; |