2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
nix-update-script,
|
|
|
|
launchpadlib,
|
|
|
|
lazr-restfulclient,
|
|
|
|
overrides,
|
|
|
|
pydantic_1,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
tabulate,
|
|
|
|
pytest-check,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "craft-archives";
|
|
|
|
version = "1.1.3";
|
|
|
|
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "canonical";
|
|
|
|
repo = "craft-archives";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-ZUqMjbOsHwzZyn0NsSTlZTljzagYEirWKEGatXVL43g=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace craft_archives/__init__.py \
|
|
|
|
--replace-fail "dev" "${version}"
|
|
|
|
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "setuptools==67.7.2" "setuptools"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
launchpadlib
|
|
|
|
lazr-restfulclient
|
|
|
|
overrides
|
|
|
|
pydantic_1
|
|
|
|
tabulate
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "craft_archives" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-check
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for handling archives/repositories in Canonical craft applications";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/canonical/craft-archives";
|
|
|
|
changelog = "https://github.com/canonical/craft-archives/releases/tag/${version}";
|
|
|
|
license = lib.licenses.lgpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ jnsgruk ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|