diff --git a/pkgs/by-name/ff/ffsubsync/package.nix b/pkgs/by-name/ff/ffsubsync/package.nix index 8165e30c504d..759de944a6e3 100644 --- a/pkgs/by-name/ff/ffsubsync/package.nix +++ b/pkgs/by-name/ff/ffsubsync/package.nix @@ -1,21 +1,25 @@ { lib -, python3Packages , fetchFromGitHub +, python3 }: -python3Packages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "ffsubsync"; version = "0.4.25"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "smacke"; repo = "ffsubsync"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-ZdKZeKfAUe/FXLOur9Btb5RgXewmy3EHunQphqlxpIc="; }; - propagatedBuildInputs = with python3Packages; [ + nativeBuildInputs = with python3.pkgs; [ + setuptools + ]; + + propagatedBuildInputs = with python3.pkgs; [ auditok charset-normalizer faust-cchardet @@ -32,9 +36,13 @@ python3Packages.buildPythonApplication rec { webrtcvad ]; - nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + ]; - pythonImportsCheck = [ "ffsubsync" ]; + pythonImportsCheck = [ + "ffsubsync" + ]; meta = with lib; { homepage = "https://github.com/smacke/ffsubsync"; diff --git a/pkgs/development/python-modules/pydub/default.nix b/pkgs/development/python-modules/pydub/default.nix index e1631f74f94e..7ec3da3531cf 100644 --- a/pkgs/development/python-modules/pydub/default.nix +++ b/pkgs/development/python-modules/pydub/default.nix @@ -1,43 +1,59 @@ { lib -, stdenv , buildPythonPackage , fetchFromGitHub - -# tests +, fetchpatch , ffmpeg-full -, python +, pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "pydub"; version = "0.25.1"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; - # pypi version doesn't include required data files for tests src = fetchFromGitHub { owner = "jiaaro"; - repo = pname; - rev = "v${version}"; - sha256 = "0xskllq66wqndjfmvp58k26cv3w480sqsil6ifwp4gghir7hqc8m"; + repo = "pydub"; + rev = "refs/tags/v${version}"; + hash = "sha256-FTEMT47wPXK5i4ZGjTVAhI/NjJio3F2dbBZzYzClU3c="; }; + patches = [ + # Fix test assertions, https://github.com/jiaaro/pydub/pull/769 + (fetchpatch { + name = "fix-assertions.patch"; + url = "https://github.com/jiaaro/pydub/commit/66c1bf7813ae8621a71484fdcdf609734c0d8efd.patch"; + hash = "sha256-3OIzvTgGK3r4/s5y7izHvouB4uJEmjO6cgKvegtTf7A="; + }) + ]; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + ffmpeg-full + pytestCheckHook + ]; + pythonImportsCheck = [ "pydub" "pydub.audio_segment" "pydub.playback" ]; - nativeCheckInputs = [ - ffmpeg-full + pytestFlagsArray = [ + "test/test.py" ]; - checkPhase = '' - ${python.interpreter} test/test.py - ''; - meta = with lib; { description = "Manipulate audio with a simple and easy high level interface"; homepage = "http://pydub.com"; + changelog = "https://github.com/jiaaro/pydub/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ ]; }; diff --git a/pkgs/development/python-modules/shazamio/default.nix b/pkgs/development/python-modules/shazamio/default.nix index 05c9784b367f..7190c1e2c0ae 100644 --- a/pkgs/development/python-modules/shazamio/default.nix +++ b/pkgs/development/python-modules/shazamio/default.nix @@ -72,6 +72,7 @@ buildPythonPackage rec { changelog = "https://github.com/dotX12/ShazamIO/releases/tag/${src.rev}"; license = licenses.mit; maintainers = with maintainers; [ figsoda ]; + # https://github.com/shazamio/ShazamIO/issues/80 broken = versionAtLeast pydantic.version "2"; }; }