Merge pull request #118765 from fabaff/bump-wakeonlan

python3Packages.wakeonlan: 1.1.6 -> 2.0.0
This commit is contained in:
Sandro 2021-04-08 11:29:31 +02:00 committed by GitHub
commit 88cd2147cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,26 +1,45 @@
{ lib, fetchPypi, buildPythonPackage, setuptools_scm, pytest, mock }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "wakeonlan";
version = "1.1.6";
version = "2.0.0";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "5e6013a17004809e676c150689abd94bcc0f12a37ad3fbce1f6270968f95ffa9";
src = fetchFromGitHub {
owner = "remcohaszing";
repo = "pywakeonlan";
rev = version;
sha256 = "0p9jyiv0adcymbnmbay72g9phlbhsr4kmrwxscbdjq81gcmxsi0y";
};
postPatch = ''
substituteInPlace setup.py \
--replace "setuptools-scm ~= 1.15.7" "setuptools-scm"
'';
nativeBuildInputs = [
poetry-core
];
checkInputs = [ pytest mock ];
checkInputs = [
pytestCheckHook
];
nativeBuildInputs = [ setuptools_scm ];
patches = [
# Switch to poetry-core, https://github.com/remcohaszing/pywakeonlan/pull/19
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/remcohaszing/pywakeonlan/commit/6aa5050ed94ef718dfcd0b946546b6a738f47ee3.patch";
sha256 = "1xzj2464ziwm7bp05bzbjwjp9whmgp1py3isr41d92qvnil86vm6";
})
];
checkPhase = ''
py.test
'';
pytestFlagsArray = [ "test_wakeonlan.py" ];
pythonImportsCheck = [ "wakeonlan" ];
meta = with lib; {
description = "A small python module for wake on lan";