2024-07-09 13:09:39 +02:00
|
|
|
{
|
|
|
|
lib,
|
2024-10-04 11:30:42 +01:00
|
|
|
python3Packages,
|
2024-07-09 13:09:39 +02:00
|
|
|
fetchFromGitHub,
|
|
|
|
dpkg,
|
|
|
|
nix-update-script,
|
2025-05-01 10:48:43 +01:00
|
|
|
versionCheckHook,
|
2025-04-09 12:54:43 +01:00
|
|
|
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";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = version;
|
2025-07-16 02:24:58 +00:00
|
|
|
hash = "sha256-pIOCgOC969Fj3lNnmsb6QTEV8z1KWxrUSsdl6Aogd4Q=";
|
2024-03-13 09:50:03 +00:00
|
|
|
};
|
|
|
|
|
2024-12-29 00:25:01 +03: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
|
2024-12-29 00:25:01 +03:00
|
|
|
tabulate
|
2024-03-13 09:50:03 +00:00
|
|
|
];
|
|
|
|
|
2025-05-01 10:48:43 +01:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"craft-providers"
|
|
|
|
];
|
|
|
|
|
2024-07-09 13:09:39 +02:00
|
|
|
nativeCheckInputs =
|
2024-10-04 11:30:42 +01:00
|
|
|
with python3Packages;
|
2024-07-09 13:09:39 +02:00
|
|
|
[
|
2024-10-04 11:30:42 +01:00
|
|
|
craft-platforms
|
2024-07-09 13:09:39 +02:00
|
|
|
pytest-check
|
|
|
|
pytest-mock
|
|
|
|
pytest-subprocess
|
|
|
|
pytestCheckHook
|
2025-05-01 10:48:43 +01:00
|
|
|
versionCheckHook
|
2025-04-09 12:54:43 +01:00
|
|
|
writableTmpDirAsHomeHook
|
2024-07-09 13:09:39 +02:00
|
|
|
]
|
|
|
|
++ [ dpkg ];
|
2024-03-13 09:50:03 +00:00
|
|
|
|
2025-06-16 03:54:55 +08:00
|
|
|
enabledTestPaths = [ "tests/unit" ];
|
2025-05-01 10:48:43 +01:00
|
|
|
|
2024-12-29 00:25:01 +03:00
|
|
|
disabledTests = [
|
2025-01-06 09:35:41 +00:00
|
|
|
"test_project_all_platforms_invalid"
|
2024-12-29 00:25:01 +03:00
|
|
|
"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"
|
2025-07-22 16:55:18 +02:00
|
|
|
# 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-12-29 00:25:01 +03:00
|
|
|
];
|
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;
|
|
|
|
};
|
|
|
|
}
|