Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 49 lines 1.0 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 testers, 6 pyamlboot, 7}: 8 9python3Packages.buildPythonApplication rec { 10 pname = "pyamlboot"; 11 version = "1.0.0"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "superna9999"; 16 repo = "pyamlboot"; 17 tag = version; 18 hash = "sha256-vpWq8+0ZoTkfVyx+2BbXdULFwo/Ug4U1gWArXDfnzyk="; 19 }; 20 21 build-system = with python3Packages; [ 22 setuptools 23 ]; 24 25 dependencies = with python3Packages; [ 26 pyusb 27 setuptools # pkg_resources is imported during runtime 28 ]; 29 30 pythonImportsCheck = [ "pyamlboot" ]; 31 32 passthru.tests.version = testers.testVersion { 33 package = pyamlboot; 34 command = "boot.py -v"; 35 version = "boot.py ${lib.versions.majorMinor version}"; 36 }; 37 38 meta = { 39 description = "Amlogic USB Boot Protocol Library"; 40 homepage = "https://github.com/superna9999/pyamlboot"; 41 license = with lib.licenses; [ 42 asl20 43 gpl2Only 44 mit 45 ]; 46 maintainers = with lib.maintainers; [ genga898 ]; 47 mainProgram = "boot.py"; 48 }; 49}