Skip to content

Commit

Permalink
Merge pull request NixOS#295068 from r-ryantm/auto-update/ctranslate2
Browse files Browse the repository at this point in the history
ctranslate2: 4.0.0 -> 4.1.1
  • Loading branch information
mweinelt authored Mar 28, 2024
2 parents bb2b73d + 3e2b29d commit f03be6c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/libraries/ctranslate2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ let
in
stdenv.mkDerivation rec {
pname = "ctranslate2";
version = "4.0.0";
version = "4.1.1";

src = fetchFromGitHub {
owner = "OpenNMT";
repo = "CTranslate2";
rev = "v${version}";
hash = "sha256-pySnkDnV41rqr4OcNonPtSgv4AJYcF5vtkBg6Ad/IvU=";
hash = "sha256-vA1KnHRxIX0lYUfwXTbxjnrrBjFmqp2kwpxBNorVf0Y=";
fetchSubmodules = true;
};

Expand Down
26 changes: 15 additions & 11 deletions pkgs/development/python-modules/libretranslate/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonRelaxDepsHook
, pytestCheckHook
, hatchling
, argostranslate
, flask
, flask-swagger
Expand All @@ -11,6 +13,8 @@
, flask-session
, waitress
, expiringdict
, langdetect
, lexilang
, ltpycld2
, morfessor
, appdirs
Expand All @@ -27,8 +31,7 @@
buildPythonPackage rec {
pname = "libretranslate";
version = "1.5.6";

format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "LibreTranslate";
Expand All @@ -37,7 +40,14 @@ buildPythonPackage rec {
hash = "sha256-43VnxgtapMRKyXxqsvBgSMUxvpbLI+iOfW3FA0/POpE=";
};

propagatedBuildInputs = [
build-system = [
hatchling
pythonRelaxDepsHook
];

pythonRelaxDeps = true;

dependencies = [
argostranslate
flask
flask-swagger
Expand All @@ -47,6 +57,8 @@ buildPythonPackage rec {
flask-session
waitress
expiringdict
langdetect
lexilang
ltpycld2
morfessor
appdirs
Expand All @@ -59,14 +71,6 @@ buildPythonPackage rec {
polib
];

postPatch = ''
substituteInPlace requirements.txt \
--replace "==" ">="
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
'';

postInstall = ''
# expose static files to be able to serve them via web-server
mkdir -p $out/share/libretranslate
Expand Down

0 comments on commit f03be6c

Please sign in to comment.