Skip to content

Commit 6024b4a

Browse files
authored
python3Packages.argos-translate-files: modernize, fix missing deps (#436952)
2 parents df4208c + fbfcacf commit 6024b4a

File tree

1 file changed

+15
-8
lines changed
  • pkgs/development/python-modules/argos-translate-files

1 file changed

+15
-8
lines changed

pkgs/development/python-modules/argos-translate-files/default.nix

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,44 @@
22
lib,
33
buildPythonPackage,
44
fetchPypi,
5+
writableTmpDirAsHomeHook,
6+
setuptools,
57
lxml,
8+
pymupdf,
9+
pysrt,
610
translatehtml,
711
}:
812

913
buildPythonPackage rec {
1014
pname = "argos-translate-files";
1115
version = "1.4.0";
12-
13-
format = "setuptools";
16+
pyproject = true;
1417

1518
src = fetchPypi {
1619
inherit pname version;
1720
hash = "sha256-vKnPL0xgyJ1vYtB2AgnKv4BqigSiFYmIm5HBq4hQ7nI=";
1821
};
1922

20-
propagatedBuildInputs = [
23+
build-system = [ setuptools ];
24+
25+
dependencies = [
2126
lxml
27+
pymupdf
28+
pysrt
2229
translatehtml
2330
];
2431

32+
nativeCheckInputs = [
33+
# pythonImportsCheck needs a home dir for argostranslatefiles
34+
writableTmpDirAsHomeHook
35+
];
36+
2537
postPatch = ''
2638
ln -s */requires.txt requirements.txt
2739
'';
2840

29-
# required for import check to work (argostranslate)
30-
env.HOME = "/tmp";
31-
3241
pythonImportsCheck = [ "argostranslatefiles" ];
3342

34-
doCheck = false; # no tests
35-
3643
meta = with lib; {
3744
description = "Translate files using Argos Translate";
3845
homepage = "https://www.argosopentech.com";

0 commit comments

Comments
 (0)