Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #118765 from fabaff/bump-wakeonlan

python3Packages.wakeonlan: 1.1.6 -> 2.0.0

authored by Sandro and committed by GitHub 88cd2147 24712537

+33 -14
+33 -14
pkgs/development/python-modules/wakeonlan/default.nix
··· 1 - { lib, fetchPypi, buildPythonPackage, setuptools_scm, pytest, mock }: 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , poetry-core 6 + , pytestCheckHook 7 + , pythonOlder 8 + }: 2 9 3 10 buildPythonPackage rec { 4 11 pname = "wakeonlan"; 5 - version = "1.1.6"; 12 + version = "2.0.0"; 13 + disabled = pythonOlder "3.6"; 14 + format = "pyproject"; 6 15 7 - src = fetchPypi { 8 - inherit pname version; 9 - sha256 = "5e6013a17004809e676c150689abd94bcc0f12a37ad3fbce1f6270968f95ffa9"; 16 + src = fetchFromGitHub { 17 + owner = "remcohaszing"; 18 + repo = "pywakeonlan"; 19 + rev = version; 20 + sha256 = "0p9jyiv0adcymbnmbay72g9phlbhsr4kmrwxscbdjq81gcmxsi0y"; 10 21 }; 11 22 12 - postPatch = '' 13 - substituteInPlace setup.py \ 14 - --replace "setuptools-scm ~= 1.15.7" "setuptools-scm" 15 - ''; 23 + nativeBuildInputs = [ 24 + poetry-core 25 + ]; 16 26 17 - checkInputs = [ pytest mock ]; 27 + checkInputs = [ 28 + pytestCheckHook 29 + ]; 30 + 31 + patches = [ 32 + # Switch to poetry-core, https://github.com/remcohaszing/pywakeonlan/pull/19 33 + (fetchpatch { 34 + name = "switch-to-poetry-core.patch"; 35 + url = "https://github.com/remcohaszing/pywakeonlan/commit/6aa5050ed94ef718dfcd0b946546b6a738f47ee3.patch"; 36 + sha256 = "1xzj2464ziwm7bp05bzbjwjp9whmgp1py3isr41d92qvnil86vm6"; 37 + }) 38 + ]; 18 39 19 - nativeBuildInputs = [ setuptools_scm ]; 40 + pytestFlagsArray = [ "test_wakeonlan.py" ]; 20 41 21 - checkPhase = '' 22 - py.test 23 - ''; 42 + pythonImportsCheck = [ "wakeonlan" ]; 24 43 25 44 meta = with lib; { 26 45 description = "A small python module for wake on lan";