Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 7 # build-system 8 hatchling, 9 10 # dependencies 11 aiohttp, 12 attrs, 13 frozendict, 14 inject, 15 loguru, 16 nix, 17 nix-prefetch-git, 18 nonbloat-db, 19 nurl, 20 platformdirs, 21 typer, 22 23 # tests 24 pytestCheckHook, 25 aioresponses, 26 pytest-asyncio, 27 pytest-cov-stub, 28 pytest-mock, 29}: 30buildPythonPackage rec { 31 pname = "nixpkgs-updaters-library"; 32 version = "1.2.0"; 33 pyproject = true; 34 35 disabled = pythonOlder "3.12"; 36 37 src = fetchFromGitHub { 38 owner = "PerchunPak"; 39 repo = "nixpkgs-updaters-library"; 40 tag = "v${version}"; 41 hash = "sha256-MCMqqAGl6OTOapC3K0DNTOmg2Lv2KqXenEgB5sIZR5U="; 42 }; 43 44 postPatch = '' 45 substituteInPlace nupd/executables.py \ 46 --replace-fail '"nurl"' '"${lib.getExe nurl}"' \ 47 --replace-fail '"nix-prefetch-url"' '"${lib.getExe' nix "nix-prefetch-git"}"' \ 48 --replace-fail '"nix-prefetch-git"' '"${lib.getExe' nix-prefetch-git "nix-prefetch-git"}"' 49 ''; 50 51 build-system = [ hatchling ]; 52 53 dependencies = [ 54 aiohttp 55 attrs 56 frozendict 57 inject 58 loguru 59 nonbloat-db 60 platformdirs 61 typer 62 nix-prefetch-git 63 nurl 64 ]; 65 66 nativeCheckInputs = [ 67 aioresponses 68 pytest-asyncio 69 pytest-cov-stub 70 pytest-mock 71 pytestCheckHook 72 ]; 73 74 meta = { 75 description = "Boilerplate-less updater library for Nixpkgs ecosystems"; 76 homepage = "https://github.com/PerchunPak/nixpkgs-updaters-library"; 77 changelog = "https://github.com/PerchunPak/nixpkgs-updaters-library/blob/v${version}/CHANGELOG.md"; 78 license = lib.licenses.mit; 79 maintainers = with lib.maintainers; [ perchun ]; 80 }; 81}