nixos-configs/devices/nos/modules/subtitles/subsync/subsync.nix

62 lines
974 B
Nix
Raw Normal View History

2024-03-25 19:54:40 -04:00
{
ffmpeg,
pkg-config,
pocketsphinx,
python3Packages,
sphinxbase,
subsync-src,
2024-03-25 19:54:40 -04:00
...
}: let
inherit (builtins) concatStringsSep;
in
python3Packages.buildPythonPackage {
pname = "subsync";
version = subsync-src.shortRev;
2024-03-25 19:54:40 -04:00
src = subsync-src;
2024-03-25 19:54:40 -04:00
buildInputs = [
ffmpeg
pkg-config
pocketsphinx
sphinxbase
];
nativeBuildInputs = with python3Packages; [
pip
setuptools
wheel
];
propagatedBuildInputs = with python3Packages; [
certifi
cryptography
pybind11
pycryptodome
pysubs2
pyyaml
requests
utils
];
patches = [
./patches/cmd_ln.patch
./patches/cstdint.patch
];
# The tests are for the GUI
doCheck = false;
# 'pip install .' takes care of building the package
buildPhase = "";
installPhase = ''
python -m pip install . ${concatStringsSep " " [
"--no-index"
"--no-warn-script-location"
"--prefix=\"$out\""
"--no-cache"
]}
'';
}