Files
nixpkgs/pkgs/development/python-modules/argos-translate-files/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

50 lines
915 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
writableTmpDirAsHomeHook,
setuptools,
lxml,
pymupdf,
pysrt,
translatehtml,
}:
buildPythonPackage rec {
pname = "argos-translate-files";
version = "1.4.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-9ufNuExfyW3gr8+pIpp6Ie03e0hE4l3l3kk6EiVH0x8=";
};
build-system = [ setuptools ];
dependencies = [
lxml
pymupdf
pysrt
translatehtml
];
nativeCheckInputs = [
# pythonImportsCheck needs a home dir for argostranslatefiles
writableTmpDirAsHomeHook
];
postPatch = ''
ln -s */requires.txt requirements.txt
'';
pythonImportsCheck = [ "argostranslatefiles" ];
meta = {
description = "Translate files using Argos Translate";
homepage = "https://www.argosopentech.com";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ misuzu ];
};
}