diff --git a/pkgs/applications/video/streamlink/default.nix b/pkgs/applications/video/streamlink/default.nix index 415790b4c11c..9f2487734f02 100644 --- a/pkgs/applications/video/streamlink/default.nix +++ b/pkgs/applications/video/streamlink/default.nix @@ -6,11 +6,12 @@ python3Packages.buildPythonApplication rec { pname = "streamlink"; - version = "3.2.0"; + version = "5.0.1"; + format = "pyproject"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "sha256-l3DS2DhExTeKc+FBMNy3YKvIVlZsqgpB/FuXoN7V2SY="; + hash = "sha256-PKRioPBhTV6i3ckQgcKuhQFmpBvUQE4o3FLej8qx4mM="; }; checkInputs = with python3Packages; [ @@ -20,6 +21,10 @@ python3Packages.buildPythonApplication rec { freezegun ]; + nativeBuildInputs = with python3Packages; [ + versioningit + ]; + propagatedBuildInputs = (with python3Packages; [ isodate lxml diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix new file mode 100644 index 000000000000..5f058d5f1b15 --- /dev/null +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -0,0 +1,68 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, importlib-metadata +, packaging +, setuptools +, tomli +, pytestCheckHook +, build +, pydantic +, pytest-mock +, git +, mercurial +}: + +buildPythonPackage rec { + pname = "versioningit"; + version = "2.0.1"; + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-gJfiYNm99nZYW9gTO/e1//rDeox2KWJVtC2Gy1EqsuM="; + }; + + postPatch = '' + substituteInPlace tox.ini \ + --replace "--cov=versioningit" "" \ + --replace "--cov-config=tox.ini" "" \ + --replace "--no-cov-on-fail" "" + ''; + + propagatedBuildInputs = [ + packaging + setuptools + tomli + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata + ]; + + checkInputs = [ + pytestCheckHook + build + pydantic + pytest-mock + git + mercurial + ]; + + disabledTests = [ + # wants to write to the Nix store + "test_editable_mode" + ]; + + pythonImportsCheck = [ + "versioningit" + ]; + + meta = with lib; { + description = "setuptools plugin for determining package version from VCS"; + homepage = "https://github.com/jwodder/versioningit"; + changelog = "https://versioningit.readthedocs.io/en/latest/changelog.html"; + license = licenses.mit; + maintainers = with maintainers; [ DeeUnderscore ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6d41513df179..98e7c6c5f273 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11635,6 +11635,8 @@ in { versionfinder = callPackage ../development/python-modules/versionfinder { }; + versioningit = callPackage ../development/python-modules/versioningit { }; + versiontag = callPackage ../development/python-modules/versiontag { }; versiontools = callPackage ../development/python-modules/versiontools { };