nixpkgs/pkgs/development/python-modules/wakeonlan/default.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytestCheckHook
, pythonOlder
}:
2018-02-26 16:41:29 +00:00
buildPythonPackage rec {
pname = "wakeonlan";
version = "2.0.0";
disabled = pythonOlder "3.6";
format = "pyproject";
2018-02-26 16:41:29 +00:00
src = fetchFromGitHub {
owner = "remcohaszing";
repo = "pywakeonlan";
rev = version;
sha256 = "0p9jyiv0adcymbnmbay72g9phlbhsr4kmrwxscbdjq81gcmxsi0y";
2018-02-26 16:41:29 +00:00
};
nativeBuildInputs = [
poetry-core
];
2018-04-06 13:06:16 +00:00
checkInputs = [
pytestCheckHook
];
2018-04-06 13:06:16 +00:00
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";
})
];
2018-04-06 13:06:16 +00:00
pytestFlagsArray = [ "test_wakeonlan.py" ];
pythonImportsCheck = [ "wakeonlan" ];
2018-04-06 13:06:16 +00:00
meta = with lib; {
2018-02-26 16:41:29 +00:00
description = "A small python module for wake on lan";
homepage = "https://github.com/remcohaszing/pywakeonlan";
2018-02-26 16:41:29 +00:00
license = licenses.wtfpl;
maintainers = with maintainers; [ peterhoeg ];
};
}