Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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