Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, fetchpatch 6, poetry-core 7, requests 8, urllib3 9, pytestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "synologydsm-api"; 14 version = "1.0.2"; 15 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "hacf-fr"; 22 repo = "synologydsm-api"; 23 rev = "v${version}"; 24 sha256 = "0gyahf1x6i6j9pslh1y3pyh3si5jvxb06r1w761b9gsxyk14y1si"; 25 }; 26 27 patches = [ 28 # https://github.com/hacf-fr/synologydsm-api/pull/84 29 (fetchpatch { 30 name = "switch-to-poetry-core.patch"; 31 url = "https://github.com/hacf-fr/synologydsm-api/commit/f1ea2be927388bdff6d43d09027b82a854635e34.patch"; 32 sha256 = "120pdgp2i4ds6y3rf9j372f9zdcf4y8rsgl1xjbkgdhkp76bkkgr"; 33 }) 34 ]; 35 36 nativeBuildInputs = [ 37 poetry-core 38 ]; 39 40 propagatedBuildInputs = [ 41 requests 42 urllib3 43 ]; 44 45 nativeCheckInputs = [ 46 pytestCheckHook 47 ]; 48 49 pythonImportsCheck = [ "synology_dsm" ]; 50 51 meta = with lib; { 52 description = "Python API for communication with Synology DSM"; 53 homepage = "https://github.com/hacf-fr/synologydsm-api"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ dotlambda ]; 56 }; 57}