Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nix-update-script, 6 launchpadlib, 7 lazr-restfulclient, 8 lazr-uri, 9 overrides, 10 pydantic, 11 python-debian, 12 distro, 13 setuptools-scm, 14 pytest-check, 15 pytest-mock, 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "craft-archives"; 21 version = "2.1.0"; 22 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "canonical"; 27 repo = "craft-archives"; 28 tag = version; 29 hash = "sha256-VjGoAsmdYyoU7ngU69HVNauEk2/vbcEz2tMCTmjheF4="; 30 }; 31 32 postPatch = '' 33 substituteInPlace craft_archives/__init__.py \ 34 --replace-fail "dev" "${version}" 35 36 substituteInPlace pyproject.toml \ 37 --replace-fail "setuptools==67.7.2" "setuptools" 38 ''; 39 40 pythonRelaxDeps = [ 41 "python-debian" 42 ]; 43 44 build-system = [ setuptools-scm ]; 45 46 dependencies = [ 47 distro 48 launchpadlib 49 lazr-restfulclient 50 lazr-uri 51 overrides 52 pydantic 53 python-debian 54 ]; 55 56 pythonImportsCheck = [ "craft_archives" ]; 57 58 nativeCheckInputs = [ 59 pytest-check 60 pytest-mock 61 pytestCheckHook 62 ]; 63 64 enabledTestPaths = [ "tests/unit" ]; 65 66 passthru.updateScript = nix-update-script { }; 67 68 meta = { 69 description = "Library for handling archives/repositories in Canonical craft applications"; 70 homepage = "https://github.com/canonical/craft-archives"; 71 changelog = "https://github.com/canonical/craft-archives/releases/tag/${version}"; 72 license = lib.licenses.lgpl3Only; 73 maintainers = with lib.maintainers; [ jnsgruk ]; 74 platforms = lib.platforms.linux; 75 }; 76}