Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
2.0 KiB
Nix
Raw Permalink Normal View History

{
lib,
2024-10-04 11:30:42 +01:00
python3Packages,
fetchFromGitHub,
dpkg,
nix-update-script,
2025-05-01 10:48:43 +01:00
versionCheckHook,
writableTmpDirAsHomeHook,
2024-03-13 09:50:03 +00:00
}:
2024-10-04 11:30:42 +01:00
python3Packages.buildPythonApplication rec {
2024-03-13 09:50:03 +00:00
pname = "rockcraft";
2025-07-16 02:24:58 +00:00
version = "1.13.0";
2024-03-13 09:50:03 +00:00
src = fetchFromGitHub {
owner = "canonical";
repo = "rockcraft";
rev = version;
2025-07-16 02:24:58 +00:00
hash = "sha256-pIOCgOC969Fj3lNnmsb6QTEV8z1KWxrUSsdl6Aogd4Q=";
2024-03-13 09:50:03 +00:00
};
pyproject = true;
2025-05-01 10:48:43 +01:00
2024-10-04 11:30:42 +01:00
build-system = with python3Packages; [ setuptools-scm ];
2024-07-24 07:30:01 -07:00
2025-05-01 10:48:43 +01:00
postPatch = ''
substituteInPlace pyproject.toml --replace-fail "setuptools~=80.8.0" "setuptools"
'';
2024-10-04 11:30:42 +01:00
dependencies = with python3Packages; [
2024-07-24 07:30:01 -07:00
craft-application
2024-03-13 09:50:03 +00:00
craft-archives
2024-10-04 11:30:42 +01:00
craft-platforms
2024-03-13 09:50:03 +00:00
spdx-lookup
tabulate
2024-03-13 09:50:03 +00:00
];
2025-05-01 10:48:43 +01:00
pythonRelaxDeps = [
"craft-providers"
];
nativeCheckInputs =
2024-10-04 11:30:42 +01:00
with python3Packages;
[
2024-10-04 11:30:42 +01:00
craft-platforms
pytest-check
pytest-mock
pytest-subprocess
pytestCheckHook
2025-05-01 10:48:43 +01:00
versionCheckHook
writableTmpDirAsHomeHook
]
++ [ dpkg ];
2024-03-13 09:50:03 +00:00
enabledTestPaths = [ "tests/unit" ];
2025-05-01 10:48:43 +01:00
disabledTests = [
"test_project_all_platforms_invalid"
"test_run_init_flask"
"test_run_init_django"
2025-05-01 10:48:43 +01:00
# Mock is broken for Unix FHS reasons.
"test_run_pack_services"
# Later version of craft-application is being used, which adds an
# additional kind of file to be ignored, and invalidates a somewhat
# static assertion. Can be removed in a later version once rockcraft
# catches up with craft-application version.
"test_lifecycle_args"
];
2024-03-13 09:50:03 +00:00
2025-05-01 10:48:43 +01:00
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [ "SSL_CERT_FILE" ];
2025-04-09 11:26:28 +01:00
2025-05-01 10:48:43 +01:00
passthru.updateScript = nix-update-script { };
2024-03-13 09:50:03 +00:00
meta = {
mainProgram = "rockcraft";
description = "Create OCI images using the language from Snapcraft and Charmcraft";
homepage = "https://github.com/canonical/rockcraft";
changelog = "https://github.com/canonical/rockcraft/releases/tag/${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ jnsgruk ];
platforms = lib.platforms.linux;
};
}