Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / craft-archives / default.nix
blob3fb3b0e9f0fa9b39aa94f0cf1cab2c325b283338
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , nix-update-script
5 , launchpadlib
6 , lazr-restfulclient
7 , overrides
8 , pydantic_1
9 , setuptools
10 , setuptools-scm
11 , tabulate
12 , pytest-check
13 , pytest-mock
14 , pytestCheckHook
17 buildPythonPackage rec {
18   pname = "craft-archives";
19   version = "1.1.3";
21   pyproject = true;
23   src = fetchFromGitHub {
24     owner = "canonical";
25     repo = "craft-archives";
26     rev = "refs/tags/${version}";
27     hash = "sha256-ZUqMjbOsHwzZyn0NsSTlZTljzagYEirWKEGatXVL43g=";
28   };
30   postPatch = ''
31     substituteInPlace craft_archives/__init__.py \
32       --replace-fail "dev" "${version}"
34     substituteInPlace pyproject.toml \
35       --replace-fail "setuptools==67.7.2" "setuptools"
36   '';
38   nativeBuildInputs = [
39     setuptools
40     setuptools-scm
41   ];
43   propagatedBuildInputs = [
44     launchpadlib
45     lazr-restfulclient
46     overrides
47     pydantic_1
48     tabulate
49   ];
51   pythonImportsCheck = [
52     "craft_archives"
53   ];
55   nativeCheckInputs = [
56     pytest-check
57     pytest-mock
58     pytestCheckHook
59   ];
61   pytestFlagsArray = [ "tests/unit" ];
63   passthru.updateScript = nix-update-script { };
65   meta = {
66     description = "A library for handling archives/repositories in Canonical craft applications";
67     homepage = "https://github.com/canonical/craft-archives";
68     changelog = "https://github.com/canonical/craft-archives/releases/tag/${version}";
69     license = lib.licenses.lgpl3Only;
70     maintainers = with lib.maintainers; [ jnsgruk ];
71     platforms = lib.platforms.linux;
72   };