nixpkgs/pkgs/development/python-modules/pysrt/default.nix
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

42 lines
915 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
chardet,
pytestCheckHook,
fetchpatch2,
}:
buildPythonPackage rec {
pname = "pysrt";
version = "1.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "byroot";
repo = "pysrt";
rev = "v${version}";
sha256 = "1f5hxyzlh5mdvvi52qapys9qcinffr6ghgivb6k4jxa92cbs3mfg";
};
patches = [
(fetchpatch2 {
url = "https://github.com/byroot/pysrt/commit/93f52f6d4f70f4e18dc71deeaae0ec1e9100a50f.patch?full_index=1";
hash = "sha256-nikMPwj3OHvl6LunAfRk6ZbFUvVgPwF696Dt8R7BY4U=";
})
];
build-system = [ setuptools ];
propagatedBuildInputs = [ chardet ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
homepage = "https://github.com/byroot/pysrt";
license = lib.licenses.gpl3Only;
description = "Python library used to edit or create SubRip files";
mainProgram = "srt";
};
}