mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.nltk: 3.9.2 -> 3.9.4
Diff: https://github.com/nltk/nltk/compare/3.9.2...3.9.4
(cherry picked from commit b31e4206d9)
This commit is contained in:
parent
c4dc8128a8
commit
efa477f562
1 changed files with 17 additions and 25 deletions
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
fetchPypi,
|
||||
fetchpatch,
|
||||
fetchFromGitHub,
|
||||
buildPythonPackage,
|
||||
click,
|
||||
joblib,
|
||||
regex,
|
||||
setuptools,
|
||||
tqdm,
|
||||
|
||||
# preInstallCheck
|
||||
|
|
@ -20,33 +20,25 @@
|
|||
pytest-mock,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "nltk";
|
||||
version = "3.9.2";
|
||||
format = "setuptools";
|
||||
version = "3.9.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-D0CemwacpBd8GQPD6EPu+Qx+kpkvpJMa5gfabeSeFBk=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nltk";
|
||||
repo = "nltk";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-kDfMiqXgLq91zzDjv/qDn0XwQkYRn2sITI6E4pgWe/8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/nltk/nltk/security/advisories/GHSA-jm6w-m3j8-898g
|
||||
# https://github.com/NixOS/nixpkgs/issues/502599
|
||||
(fetchpatch {
|
||||
name = "fix-unauthed-shutdown";
|
||||
url = "https://github.com/nltk/nltk/commit/bbaae83db86a0f49e00f5b0db44a7254c268de9b.patch";
|
||||
hash = "sha256-1ZzOQXiNxZ6o7JQs0b9FpsUjZtuUAjXEmDkc9mV3dYU=";
|
||||
})
|
||||
postPatch = ''
|
||||
# In the nix store we trust
|
||||
substituteInPlace nltk/pathsec.py \
|
||||
--replace-fail 'if not (target == scoped_root or target.is_relative_to(scoped_root)):' 'if not (target == scoped_root or target.is_relative_to(scoped_root) or target.is_relative_to("/nix/store")):'
|
||||
'';
|
||||
|
||||
# https://github.com/nltk/nltk/security/advisories/GHSA-469j-vmhf-r6v7
|
||||
# https://github.com/NixOS/nixpkgs/issues/502535
|
||||
(fetchpatch {
|
||||
name = "fix-downloader-path-traversal";
|
||||
url = "https://github.com/nltk/nltk/commit/89fe2ec2c6bae6e2e7a46dad65cc34231976ed8a.patch";
|
||||
hash = "sha256-hQJmVEDDcio4Ew+Y10WzMV53mpYZuuDsFcEZKEzl7nk=";
|
||||
})
|
||||
];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
click
|
||||
|
|
@ -122,4 +114,4 @@ buildPythonPackage rec {
|
|||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.bengsparks ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue