Created
December 2, 2023 18:26
-
-
Save kugland/50eeece5c30e2797e61bd8e1faabf54a to your computer and use it in GitHub Desktop.
shell.nix for ffsubsync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> { } }: | |
let | |
audiotok = with pkgs.python3Packages; buildPythonPackage rec { | |
pname = "auditok"; | |
version = "0.1.5"; | |
src = fetchPypi { | |
inherit pname version; | |
sha256 = "sha256-HNsw9VLP7XEgs8E2X6p7ygDM47AwWxMYjptipknFig4="; | |
}; | |
propagatedBuildInputs = [ | |
pydub | |
pyaudio | |
tqdm | |
matplotlib | |
numpy | |
]; | |
}; | |
pysubs2 = with pkgs.python3Packages; buildPythonPackage rec { | |
pname = "pysubs2"; | |
version = "1.6.1"; | |
format = "pyproject"; | |
src = fetchPypi { | |
inherit pname version; | |
sha256 = "sha256-AmFhHnFzX/d2OXLFGcclk8gGPvy5A5xUr2XzG4HOwRY="; | |
}; | |
buildInputs = [ | |
setuptools | |
]; | |
}; | |
ffsubsync = with pkgs.python3Packages; buildPythonPackage rec { | |
pname = "ffsubsync"; | |
version = "0.4.25"; | |
src = fetchPypi { | |
inherit pname version; | |
sha256 = "sha256-KnzqUQUDDaR4WkmtLBOcvNZ3xctXta+OHYWQJvp0ots="; | |
}; | |
preBuild = '' | |
rm ffsubsync/ffsubsync_gui.py | |
cat > requirements.txt << EOF | |
auditok==0.1.5 | |
chardet;python_version>='3.7' | |
charset_normalizer | |
faust-cchardet | |
ffmpeg-python | |
future>=0.18.2 | |
numpy>=1.12.0 | |
pysubs2;python_version<'3.7' | |
pysubs2>=1.2.0;python_version>='3.7' | |
rich | |
six | |
srt>=3.0.0 | |
tqdm | |
typing_extensions | |
webrtcvad;platform_system!='Windows' | |
webrtcvad-wheels;platform_system=='Windows' | |
EOF | |
''; | |
propagatedBuildInputs = [ | |
audiotok | |
pysubs2 | |
chardet | |
charset-normalizer | |
faust-cchardet | |
ffmpeg-python | |
future | |
numpy | |
rich | |
six | |
srt | |
tqdm | |
typing-extensions | |
webrtcvad | |
]; | |
}; | |
in | |
pkgs.mkShell { | |
packages = [ | |
(pkgs.python3.withPackages (ps: with ps; [ | |
ffsubsync | |
])) | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment