567e8dfd8e
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>
50 lines
915 B
Nix
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 ];
|
|
};
|
|
}
|