treewide: remove canonical craft packages (#443998)

Changed files
+3 -1797
pkgs
by-name
development
python-modules
catkin-pkg
craft-application
craft-archives
craft-cli
craft-grammar
craft-parts
craft-platforms
craft-providers
craft-store
logassert
macaroonbakery
pydantic-yaml
snap-helpers
spdx-lookup
top-level
-142
pkgs/by-name/ch/charmcraft/package.nix
···
-
{
-
lib,
-
gitMinimal,
-
python3,
-
fetchFromGitHub,
-
nix-update-script,
-
cacert,
-
versionCheckHook,
-
writableTmpDirAsHomeHook,
-
stdenv,
-
}:
-
let
-
version = "4.10.0";
-
python = python3.override {
-
self = python;
-
packageOverrides = self: super: {
-
craft-application = super.craft-application.overridePythonAttrs (old: {
-
inherit version;
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-application";
-
tag = version;
-
hash = "sha256-9M49/XQuWwKuQqseleTeZYcrwd/S16lNCljvlVsoXbs=";
-
};
-
-
postPatch = ''
-
substituteInPlace pyproject.toml --replace-fail "setuptools==75.8.0" "setuptools"
-
substituteInPlace craft_application/git/_git_repo.py --replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs"
-
'';
-
-
disabledTestPaths = [
-
# These tests assert outputs of commands that assume Ubuntu-related output.
-
"tests/unit/services/test_lifecycle.py"
-
];
-
-
disabledTests =
-
old.disabledTests
-
++ lib.optionals stdenv.hostPlatform.isAarch64 [
-
"test_process_grammar_full"
-
];
-
});
-
};
-
};
-
in
-
python.pkgs.buildPythonApplication rec {
-
pname = "charmcraft";
-
version = "3.5.3";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "charmcraft";
-
tag = version;
-
hash = "sha256-SPWbHyHp1SIwDmcpBftUJ7SXggkGsxPvZyfRVm67KFM=";
-
};
-
-
postPatch = ''
-
substituteInPlace charmcraft/__init__.py --replace-fail "dev" "${version}"
-
'';
-
-
dependencies = with python.pkgs; [
-
craft-application
-
craft-cli
-
craft-parts
-
craft-platforms
-
craft-providers
-
craft-store
-
distro
-
docker
-
humanize
-
jinja2
-
jsonschema
-
pip
-
pydantic
-
python-dateutil
-
pyyaml
-
requests
-
requests-toolbelt
-
requests-unixsocket
-
snap-helpers
-
tabulate
-
urllib3
-
];
-
-
build-system = with python.pkgs; [ setuptools-scm ];
-
-
pythonRelaxDeps = [
-
"urllib3"
-
"craft-application"
-
"pip"
-
"pydantic"
-
];
-
-
nativeCheckInputs =
-
with python.pkgs;
-
[
-
freezegun
-
hypothesis
-
pyfakefs
-
pytest-check
-
pytest-mock
-
pytest-subprocess
-
pytestCheckHook
-
responses
-
setuptools
-
]
-
++ [
-
cacert
-
gitMinimal
-
versionCheckHook
-
writableTmpDirAsHomeHook
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTests = [
-
# Relies upon the `charm` tool being installed
-
"test_validate_missing_charm"
-
"test_read_charm_from_yaml_file_self_contained_success[full-bases.yaml]"
-
"test_read_charm_from_yaml_file_self_contained_success[full-platforms.yaml]"
-
];
-
-
versionCheckProgramArg = "--version";
-
versionCheckKeepEnvironment = [ "SSL_CERT_FILE" ];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
mainProgram = "charmcraft";
-
description = "Build and publish Charmed Operators for deployment with Juju";
-
homepage = "https://github.com/canonical/charmcraft";
-
changelog = "https://github.com/canonical/charmcraft/releases/tag/${version}";
-
license = lib.licenses.asl20;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-88
pkgs/by-name/ro/rockcraft/package.nix
···
-
{
-
lib,
-
python3Packages,
-
fetchFromGitHub,
-
dpkg,
-
nix-update-script,
-
versionCheckHook,
-
writableTmpDirAsHomeHook,
-
}:
-
-
python3Packages.buildPythonApplication rec {
-
pname = "rockcraft";
-
version = "1.13.0";
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "rockcraft";
-
rev = version;
-
hash = "sha256-pIOCgOC969Fj3lNnmsb6QTEV8z1KWxrUSsdl6Aogd4Q=";
-
};
-
-
pyproject = true;
-
-
build-system = with python3Packages; [ setuptools-scm ];
-
-
postPatch = ''
-
substituteInPlace pyproject.toml --replace-fail "setuptools~=80.8.0" "setuptools"
-
'';
-
-
dependencies = with python3Packages; [
-
craft-application
-
craft-archives
-
craft-platforms
-
spdx-lookup
-
tabulate
-
];
-
-
pythonRelaxDeps = [
-
"craft-providers"
-
];
-
-
nativeCheckInputs =
-
with python3Packages;
-
[
-
craft-platforms
-
pytest-check
-
pytest-mock
-
pytest-subprocess
-
pytestCheckHook
-
versionCheckHook
-
writableTmpDirAsHomeHook
-
]
-
++ [ dpkg ];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTests = [
-
"test_project_all_platforms_invalid"
-
"test_run_init_flask"
-
"test_run_init_django"
-
# 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"
-
];
-
-
versionCheckProgramArg = "--version";
-
versionCheckKeepEnvironment = [ "SSL_CERT_FILE" ];
-
-
passthru.updateScript = nix-update-script { };
-
-
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; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-14
pkgs/by-name/sn/snapcraft/esm-test.patch
···
-
diff --git i/tests/unit/test_application.py w/tests/unit/test_application.py
-
index d5da2454c..2a9bcd6f9 100644
-
--- i/tests/unit/test_application.py
-
+++ w/tests/unit/test_application.py
-
@@ -391,7 +391,8 @@ def test_esm_error(snapcraft_yaml, base, monkeypatch, capsys):
-
_, err = capsys.readouterr()
-
-
assert re.match(
-
- rf"^Base {base!r} is not supported by this version of Snapcraft.\n"
-
+ rf"^Running snapcraft without a command will not be possible in future releases. Use 'snapcraft pack' instead.\n"
-
+ rf"Base {base!r} is not supported by this version of Snapcraft.\n"
-
rf"Recommended resolution: Use Snapcraft .* from the '.*' channel of snapcraft where {base!r} was last supported.\n"
-
r"For more information, check out: .*/reference/bases\n",
-
err,
-13
pkgs/by-name/sn/snapcraft/lxd-socket-path.patch
···
-
diff --git i/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py w/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py
-
index 5fa4f898b..41264ebb0 100644
-
--- i/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py
-
+++ w/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py
-
@@ -142,7 +142,7 @@ class LXD(Provider):
-
build_provider_flags=build_provider_flags,
-
)
-
# This endpoint is hardcoded everywhere lxc/lxd-pkg-snap#33
-
- lxd_socket_path = "/var/snap/lxd/common/lxd/unix.socket"
-
+ lxd_socket_path = "/var/lib/lxd/unix.socket"
-
endpoint = "http+unix://{}".format(urllib.parse.quote(lxd_socket_path, safe=""))
-
try:
-
self._lxd_client: pylxd.Client = pylxd.Client(endpoint=endpoint)
-213
pkgs/by-name/sn/snapcraft/package.nix
···
-
{
-
fetchFromGitHub,
-
gitMinimal,
-
glibc,
-
lib,
-
makeWrapper,
-
nix-update-script,
-
python312Packages,
-
squashfsTools,
-
cacert,
-
stdenv,
-
writableTmpDirAsHomeHook,
-
}:
-
-
python312Packages.buildPythonApplication rec {
-
pname = "snapcraft";
-
version = "8.11.2";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "snapcraft";
-
tag = version;
-
hash = "sha256-Rc3OSRTTpYA7WKI/WEvCdq1SQnkO91FXzQscV2b93TI=";
-
};
-
-
patches = [
-
# We're using a later version of `craft-cli` than expected, which
-
# adds an extra deprecation warning to the CLI output, meaning that
-
# an expected error message looks slightly different. This patch corrects
-
# that by checking for the updated error message and can be dropped in a
-
# later release of snapcraft.
-
./esm-test.patch
-
# Snapcraft is only officially distributed as a snap, as is LXD. The socket
-
# path for LXD must be adjusted so that it's at the correct location for LXD
-
# on NixOS. This patch will likely never be accepted upstream.
-
./lxd-socket-path.patch
-
# Snapcraft will try to inject itself as a snap *from the host system* into
-
# the build system. This patch short-circuits that logic and ensures that
-
# Snapcraft is installed on the build system from the snap store - because
-
# there is no snapd on NixOS hosts that can be used for the injection. This
-
# patch will likely never be accepted upstream.
-
./set-channel-for-nix.patch
-
# Certain paths (for extensions, schemas) are packaged in the snap by the
-
# upstream, so the paths are well-known, except here where Snapcraft is
-
# *not* in a snap, so this patch changes those paths to point to the correct
-
# place in the Nix store. This patch will likely never be accepted upstream.
-
./snapcraft-data-dirs.patch
-
];
-
-
postPatch = ''
-
substituteInPlace snapcraft/__init__.py --replace-fail "dev" "${version}"
-
-
substituteInPlace snapcraft_legacy/__init__.py \
-
--replace-fail '__version__ = _get_version()' '__version__ = "${version}"'
-
-
substituteInPlace snapcraft/elf/elf_utils.py \
-
--replace-fail 'arch_linker_path = Path(arch_config.dynamic_linker)' \
-
'return str(Path("${glibc}/lib/ld-linux-x86-64.so.2"))'
-
-
substituteInPlace pyproject.toml \
-
--replace-fail 'setuptools>=69.0,<80.9.0' 'setuptools' \
-
--replace-fail 'gnupg' 'python-gnupg'
-
'';
-
-
nativeBuildInputs = [ makeWrapper ];
-
-
dependencies = with python312Packages; [
-
attrs
-
catkin-pkg
-
click
-
craft-application
-
craft-archives
-
craft-cli
-
craft-grammar
-
craft-parts
-
craft-platforms
-
craft-providers
-
craft-store
-
python-debian
-
docutils
-
jsonschema
-
launchpadlib
-
lazr-restfulclient
-
lxml
-
macaroonbakery
-
mypy-extensions
-
overrides
-
packaging
-
progressbar
-
pyelftools
-
pygit2
-
pylxd
-
pymacaroons
-
python-apt
-
python-gnupg
-
pyxdg
-
pyyaml
-
raven
-
requests-toolbelt
-
requests-unixsocket2
-
simplejson
-
snap-helpers
-
tabulate
-
toml
-
tinydb
-
typing-extensions
-
urllib3
-
validators
-
];
-
-
build-system = with python312Packages; [ setuptools-scm ];
-
-
pythonRelaxDeps = [
-
"click"
-
"craft-parts"
-
"craft-providers"
-
"cryptography"
-
"docutils"
-
"jsonschema"
-
"pygit2"
-
"requests"
-
"urllib3"
-
"validators"
-
];
-
-
postInstall = ''
-
wrapProgram $out/bin/snapcraft --prefix PATH : ${squashfsTools}/bin
-
'';
-
-
preCheck = ''
-
# _pygit2.GitError: OpenSSL error: failed to load certificates: error:00000000:lib(0)::reason(0)
-
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-
'';
-
-
nativeCheckInputs =
-
with python312Packages;
-
[
-
pytest-check
-
pytest-cov-stub
-
pytest-mock
-
pytest-subprocess
-
pytestCheckHook
-
responses
-
setuptools
-
writableTmpDirAsHomeHook
-
]
-
++ [
-
gitMinimal
-
squashfsTools
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTests = [
-
"test_bin_echo"
-
"test_classic_linter_filter"
-
"test_classic_linter"
-
"test_complex_snap_yaml"
-
"test_core24_try_command"
-
"test_get_base_configuration_snap_channel"
-
"test_get_base_configuration_snap_instance_name_default"
-
"test_get_base_configuration_snap_instance_name_not_running_as_snap"
-
"test_get_build_commands"
-
"test_get_extensions_data_dir"
-
"test_get_os_platform_alternative_formats"
-
"test_get_os_platform_linux"
-
"test_get_os_platform_windows"
-
"test_lifecycle_pack_components_with_output"
-
"test_lifecycle_pack_components"
-
"test_lifecycle_write_component_metadata"
-
"test_parse_info_integrated"
-
"test_patch_elf"
-
"test_project_platform_unknown_name"
-
"test_remote_builder_init"
-
"test_setup_assets_remote_icon"
-
"test_snap_command_fallback"
-
"test_validate_architectures_supported"
-
"test_validate_architectures_unsupported"
-
# Disabled because we're uisng a later version of a library than
-
# specified which changes the behaviour in a non-breaking way, apart
-
# from when a test is looking for a specific error message
-
"test_esm_error[core]"
-
"test_esm_error[core18]"
-
]
-
++ lib.optionals stdenv.hostPlatform.isAarch64 [ "test_load_project" ];
-
-
disabledTestPaths = [
-
"tests/unit/commands/test_remote.py"
-
"tests/unit/elf"
-
"tests/unit/linters/test_classic_linter.py"
-
"tests/unit/linters/test_library_linter.py"
-
"tests/unit/parts/test_parts.py"
-
"tests/unit/services"
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
mainProgram = "snapcraft";
-
description = "Build and publish Snap packages";
-
homepage = "https://github.com/canonical/snapcraft";
-
changelog = "https://github.com/canonical/snapcraft/releases/tag/${version}";
-
license = lib.licenses.gpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-23
pkgs/by-name/sn/snapcraft/set-channel-for-nix.patch
···
-
diff --git i/snapcraft/providers.py w/snapcraft/providers.py
-
index 41ab6e8f1..ceaf7539b 100644
-
--- i/snapcraft/providers.py
-
+++ w/snapcraft/providers.py
-
@@ -177,14 +177,15 @@ def get_base_configuration(
-
# injecting a snap on a non-linux system is not supported, so default to
-
# install snapcraft from the store's stable channel
-
snap_channel = get_managed_environment_snap_channel()
-
- if sys.platform != "linux" and not snap_channel:
-
+ import platform
-
+ if snap_channel is None and (sys.platform != "linux" or "NixOS" in platform.version()):
-
emit.progress(
-
- "Using snapcraft from snap store channel 'latest/stable' in instance "
-
+ "Using snapcraft from snap store channel 'latest/beta' in instance "
-
"because snap injection is only supported on Linux hosts.",
-
permanent=True,
-
)
-
snap_name = "snapcraft"
-
- snap_channel = "stable"
-
+ snap_channel = "beta"
-
elif is_snapcraft_running_from_snap():
-
# Use SNAP_INSTANCE_NAME for snapcraft's snap name, as it may not be
-
# 'snapcraft' if the '--name' parameter was used to install snapcraft.
-16
pkgs/by-name/sn/snapcraft/snapcraft-data-dirs.patch
···
-
diff --git a/snapcraft_legacy/internal/common.py b/snapcraft_legacy/internal/common.py
-
index b3d40c265..c68c24d53 100644
-
--- a/snapcraft_legacy/internal/common.py
-
+++ b/snapcraft_legacy/internal/common.py
-
@@ -36,7 +36,10 @@ from snapcraft_legacy.internal import errors
-
-
SNAPCRAFT_FILES = ["parts", "stage", "prime"]
-
-
-_DEFAULT_PLUGINDIR = os.path.join(sys.prefix, "share", "snapcraft", "plugins")
-
+# Get the path to the Nix store entry for Snapcraft at runtime
-
+drv = os.path.realpath(__file__).split("/")[3]
-
+
-
+_DEFAULT_PLUGINDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "plugins")
-
_plugindir = _DEFAULT_PLUGINDIR
-
-
_BASE_DIR = Path(__file__).parents[2]
-51
pkgs/development/python-modules/catkin-pkg/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
docutils,
-
pyparsing,
-
python-dateutil,
-
setuptools,
-
pytestCheckHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "catkin-pkg";
-
version = "1.0.0";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "ros-infrastructure";
-
repo = "catkin_pkg";
-
rev = version;
-
hash = "sha256-lHUKhE9dQLO1MbkstUEiGrHc9Rm+bY/AmgLyh7AbvFQ=";
-
};
-
-
build-system = [ setuptools ];
-
-
dependencies = [
-
docutils
-
pyparsing
-
python-dateutil
-
setuptools
-
];
-
-
pythonImportsCheck = [ "catkin_pkg" ];
-
-
nativeCheckInputs = [ pytestCheckHook ];
-
-
disabledTestPaths = [ "test/test_flake8.py" ];
-
-
meta = {
-
changelog = "https://github.com/ros-infrastructure/catkin_pkg/blob/${version}/CHANGELOG.rst";
-
description = "Library for retrieving information about catkin packages";
-
homepage = "http://wiki.ros.org/catkin_pkg";
-
license = lib.licenses.bsd3;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
};
-
}
-164
pkgs/development/python-modules/craft-application/default.nix
···
-
{
-
lib,
-
stdenv,
-
buildPythonPackage,
-
craft-archives,
-
craft-cli,
-
craft-grammar,
-
craft-parts,
-
craft-platforms,
-
craft-providers,
-
jinja2,
-
fetchFromGitHub,
-
gitMinimal,
-
hypothesis,
-
license-expression,
-
nix-update-script,
-
pyfakefs,
-
pygit2,
-
pytest-check,
-
pytest-mock,
-
pytest-subprocess,
-
pytestCheckHook,
-
pyyaml,
-
responses,
-
setuptools-scm,
-
snap-helpers,
-
freezegun,
-
cacert,
-
writableTmpDirAsHomeHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-application";
-
version = "5.6.5";
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-application";
-
tag = version;
-
hash = "sha256-1TQolHJDyuUxUBv7ATI0Gqedi9y2q/sU1JAS2eYYcqc=";
-
};
-
-
postPatch = ''
-
substituteInPlace pyproject.toml \
-
--replace-fail "setuptools==75.9.1" "setuptools"
-
-
substituteInPlace craft_application/git/_utils.py \
-
--replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs"
-
'';
-
-
build-system = [ setuptools-scm ];
-
-
pythonRelaxDeps = [
-
"pygit2"
-
"requests"
-
];
-
-
dependencies = [
-
craft-archives
-
craft-cli
-
craft-grammar
-
craft-parts
-
craft-platforms
-
craft-providers
-
jinja2
-
license-expression
-
pygit2
-
pyyaml
-
snap-helpers
-
];
-
-
nativeCheckInputs = [
-
freezegun
-
gitMinimal
-
hypothesis
-
pyfakefs
-
pytest-check
-
pytest-mock
-
pytest-subprocess
-
pytestCheckHook
-
responses
-
writableTmpDirAsHomeHook
-
];
-
-
preCheck = ''
-
# Tests require access to /etc/os-release, which isn't accessible in
-
# the test environment, so create a fake file, and modify the code
-
# to look for it.
-
echo 'ID=nixos' > $HOME/os-release
-
echo 'NAME=NixOS' >> $HOME/os-release
-
echo 'VERSION_ID="24.05"' >> $HOME/os-release
-
-
substituteInPlace craft_application/util/platforms.py \
-
--replace-fail "os_utils.OsRelease()" "os_utils.OsRelease(os_release_file='$HOME/os-release')"
-
-
# Not using `--replace-fail` here only because it simplifies overriding this package in the charmcraft
-
# derivation. Once charmcraft has moved to craft-application >= 5, `--replace-fail` can be added.
-
substituteInPlace tests/conftest.py \
-
--replace "include_lsb=False, include_uname=False, include_oslevel=False" "include_lsb=False, include_uname=False, include_oslevel=False, os_release_file='$HOME/os-release'"
-
-
# The project attempts to write into the user's runtime directory, usually
-
# '/run/user/<uid>', which fails in the build environment. By setting this
-
# variable, we redirect the runtime directory lookup to the temp directory
-
# created by the 'writableTmpDirAsHomeHook'.
-
export XDG_RUNTIME_DIR="$HOME"
-
'';
-
-
pythonImportsCheck = [ "craft_application" ];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTests = [
-
"test_to_yaml_file"
-
# Tests expecting pytest-time
-
"test_monitor_builds_success"
-
# Temporary fix until new release to support Python 3.13
-
"test_grammar_aware_part_error"
-
"test_grammar_aware_part_error[part2]"
-
"test_grammar_aware_project_error[project0]"
-
# Temp fix - asserts fail against error messages which have changed
-
# slightly in a later revision of craft-platforms. No functional error.
-
"test_platform_invalid_arch"
-
"test_platform_invalid_build_arch"
-
# Asserts against string output which fails when not on Ubuntu.
-
"test_run_error_with_docs_url"
-
# Asserts a fallback path for SSL certs that we override in a patch.
-
"test_import_fallback_wrong_metadata"
-
]
-
++ lib.optionals stdenv.hostPlatform.isAarch64 [
-
# These tests have hardcoded "amd64" strings which fail on aarch64
-
"test_process_grammar_build_for"
-
"test_process_grammar_platform"
-
"test_process_grammar_default"
-
"test_create_craft_manifest"
-
"test_create_project_manifest"
-
"test_from_packed_artifact"
-
"test_teardown_session_create_manifest"
-
];
-
-
disabledTestPaths = [
-
# These tests assert outputs of commands that assume Ubuntu-related output.
-
"tests/unit/services/test_lifecycle.py"
-
]
-
++ lib.optionals stdenv.hostPlatform.isAarch64 [
-
# Hard-coded assumptions around use of "amd64" arch strings.
-
"tests/unit/services/test_project.py"
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Basis for Canonical craft applications";
-
homepage = "https://github.com/canonical/craft-application";
-
changelog = "https://github.com/canonical/craft-application/blob/${src.tag}/docs/reference/changelog.rst";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-77
pkgs/development/python-modules/craft-archives/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
launchpadlib,
-
lazr-restfulclient,
-
lazr-uri,
-
overrides,
-
pydantic,
-
python-debian,
-
distro,
-
setuptools-scm,
-
pytest-check,
-
pytest-mock,
-
pytestCheckHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-archives";
-
version = "2.2.0";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-archives";
-
tag = version;
-
hash = "sha256-NXMBaY4sZT47Qi3XS5yuiXJEMKENghiXkLXnXHHYpRI=";
-
};
-
-
postPatch = ''
-
substituteInPlace craft_archives/__init__.py \
-
--replace-fail "dev" "${version}"
-
'';
-
-
pythonRelaxDeps = [
-
"python-debian"
-
];
-
-
build-system = [ setuptools-scm ];
-
-
dependencies = [
-
distro
-
launchpadlib
-
lazr-restfulclient
-
lazr-uri
-
overrides
-
pydantic
-
python-debian
-
];
-
-
pythonImportsCheck = [ "craft_archives" ];
-
-
nativeCheckInputs = [
-
pytest-check
-
pytest-mock
-
pytestCheckHook
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Library for handling archives/repositories in Canonical craft applications";
-
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; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-69
pkgs/development/python-modules/craft-cli/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
platformdirs,
-
jinja2,
-
overrides,
-
pyyaml,
-
setuptools-scm,
-
pytest-check,
-
pytest-mock,
-
pytestCheckHook,
-
writableTmpDirAsHomeHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-cli";
-
version = "3.1.2";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-cli";
-
tag = version;
-
hash = "sha256-ryNHl/c8Pg2mGQHE9Dbd0bLU80NyCyxfhd2YQGEBN40=";
-
};
-
-
postPatch = ''
-
substituteInPlace pyproject.toml \
-
--replace-fail "setuptools==75.2.0" "setuptools"
-
'';
-
-
build-system = [ setuptools-scm ];
-
-
dependencies = [
-
jinja2
-
overrides
-
platformdirs
-
pyyaml
-
];
-
-
pythonImportsCheck = [ "craft_cli" ];
-
-
nativeCheckInputs = [
-
pytest-check
-
pytest-mock
-
pytestCheckHook
-
writableTmpDirAsHomeHook
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "CLI builder for Canonical's CLI Guidelines";
-
homepage = "https://github.com/canonical/craft-cli";
-
changelog = "https://github.com/canonical/craft-cli/releases/tag/${version}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-61
pkgs/development/python-modules/craft-grammar/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
overrides,
-
setuptools-scm,
-
pytestCheckHook,
-
pydantic,
-
pyyaml,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-grammar";
-
version = "2.2.0";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-grammar";
-
tag = version;
-
hash = "sha256-URyc+N2WSXnjurqd1ieV2mN4Uf9m0zivupRuKmH6s8Q=";
-
};
-
-
build-system = [ setuptools-scm ];
-
-
dependencies = [
-
overrides
-
pydantic
-
];
-
-
pythonImportsCheck = [ "craft_grammar" ];
-
-
nativeCheckInputs = [
-
pytestCheckHook
-
pyyaml
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
# Temp fix for test incompatibility with Python 3.13
-
disabledTests = [
-
"test_grammar_strlist_error[value2]"
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Advanced grammar for Canonical's craft-parts library";
-
homepage = "https://github.com/canonical/craft-grammar";
-
changelog = "https://github.com/canonical/craft-grammar/releases/tag/${version}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-98
pkgs/development/python-modules/craft-parts/bash-path.patch
···
-
diff --git a/craft_parts/executor/step_handler.py b/craft_parts/executor/step_handler.py
-
index 5eab915..bc26252 100644
-
--- a/craft_parts/executor/step_handler.py
-
+++ b/craft_parts/executor/step_handler.py
-
@@ -445,7 +445,8 @@ def _create_and_run_script(
-
) -> None:
-
"""Create a script with step-specific commands and execute it."""
-
with script_path.open("w") as run_file:
-
- print("#!/bin/bash", file=run_file)
-
+ import shutil
-
+ print(f"#!{shutil.which('bash')}", file=run_file)
-
print("set -euo pipefail", file=run_file)
-
-
if environment_script_path:
-
diff --git a/craft_parts/plugins/java_plugin.py b/craft_parts/plugins/java_plugin.py
-
index f2b4064..cb4e9e8 100644
-
--- a/craft_parts/plugins/java_plugin.py
-
+++ b/craft_parts/plugins/java_plugin.py
-
@@ -71,9 +71,8 @@ class JavaPlugin(Plugin):
-
return None, ""
-
-
def _find_javac(self) -> list[str]:
-
- cmd = ["find", "/usr/lib/jvm", "-path", "*/bin/javac", "-print"]
-
- output = subprocess.check_output(cmd, text=True)
-
- return [x for x in output.split("\n") if len(x) > 0]
-
+ import shutil
-
+ return [shutil.which("javac")]
-
-
@override
-
def get_build_environment(self) -> dict[str, str]:
-
diff --git a/craft_parts/plugins/validator.py b/craft_parts/plugins/validator.py
-
index 5b4c735..d7a446e 100644
-
--- a/craft_parts/plugins/validator.py
-
+++ b/craft_parts/plugins/validator.py
-
@@ -142,8 +142,9 @@ class PluginEnvironmentValidator:
-
print(cmd, file=env_file)
-
env_file.flush()
-
-
+ import shutil
-
proc = subprocess.run(
-
- ["/bin/bash", env_file.name],
-
+ [shutil.which("bash"), env_file.name],
-
check=True,
-
capture_output=True,
-
text=True,
-
diff --git a/tests/unit/executor/test_step_handler.py b/tests/unit/executor/test_step_handler.py
-
index 4e73c2b..a5f9374 100644
-
--- a/tests/unit/executor/test_step_handler.py
-
+++ b/tests/unit/executor/test_step_handler.py
-
@@ -209,9 +209,10 @@ class TestStepHandlerBuiltins:
-
-
assert get_mode(build_script_path) == 0o755
-
with open(build_script_path) as file:
-
+ import shutil
-
assert file.read() == dedent(
-
f"""\
-
- #!/bin/bash
-
+ #!{shutil.which("bash")}
-
set -euo pipefail
-
source {environment_script_path}
-
set -x
-
diff --git a/tests/unit/utils/test_process.py b/tests/unit/utils/test_process.py
-
index a025494..a76cfa2 100644
-
--- a/tests/unit/utils/test_process.py
-
+++ b/tests/unit/utils/test_process.py
-
@@ -33,7 +33,8 @@ _RUN_TEST_CASES = [
-
-
@pytest.mark.parametrize(("out", "err"), _RUN_TEST_CASES)
-
def test_run(out, err):
-
- result = process.run(["/usr/bin/sh", "-c", f"echo {out};sleep 0.1;echo {err} >&2"])
-
+ import shutil
-
+ result = process.run([shutil.which("sh"), "-c", f"echo {out};sleep 0.1;echo {err} >&2"])
-
assert result.returncode == 0
-
assert result.stdout == (out + "\n").encode()
-
assert result.stderr == (err + "\n").encode()
-
@@ -42,8 +43,9 @@ def test_run(out, err):
-
-
@pytest.mark.parametrize(("out", "err"), _RUN_TEST_CASES)
-
def test_run_devnull(out, err):
-
+ import shutil
-
result = process.run(
-
- ["/usr/bin/sh", "-c", f"echo {out};echo {err} >&2"],
-
+ [shutil.which("sh"), "-c", f"echo {out};echo {err} >&2"],
-
stdout=subprocess.DEVNULL,
-
stderr=subprocess.DEVNULL,
-
)
-
@@ -78,9 +80,10 @@ def test_run_selector(out, err, new_dir):
-
-
selector.register(sock, selectors.EVENT_READ, accept)
-
-
+ import shutil
-
result = process.run(
-
[
-
- "/usr/bin/sh",
-
+ shutil.which("sh"),
-
"-c",
-
f"echo {out};sleep 0.1;echo {err} >&2; echo -n {out}|socat - UNIX-CONNECT:{new_dir}/test.socket",
-
],
-136
pkgs/development/python-modules/craft-parts/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
overrides,
-
pydantic,
-
pyxdg,
-
pyyaml,
-
requests,
-
requests-unixsocket,
-
pyfakefs,
-
pytestCheckHook,
-
pytest-check,
-
pytest-mock,
-
pytest-subprocess,
-
requests-mock,
-
hypothesis,
-
jsonschema,
-
lxml,
-
git,
-
squashfsTools,
-
socat,
-
setuptools-scm,
-
stdenv,
-
ant,
-
maven,
-
jdk,
-
writableTmpDirAsHomeHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-parts";
-
version = "2.20.1";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-parts";
-
tag = version;
-
hash = "sha256-YTyoJzot7GkRp+szo+a3wx5mWWJcYj7ke7kcxri9n10=";
-
};
-
-
patches = [ ./bash-path.patch ];
-
-
build-system = [ setuptools-scm ];
-
-
pythonRelaxDeps = [
-
"requests"
-
"urllib3"
-
"pydantic"
-
];
-
-
dependencies = [
-
lxml
-
overrides
-
pydantic
-
pyxdg
-
pyyaml
-
requests
-
requests-unixsocket
-
];
-
-
pythonImportsCheck = [ "craft_parts" ];
-
-
nativeCheckInputs = [
-
ant
-
git
-
hypothesis
-
jdk
-
jsonschema
-
maven
-
pyfakefs
-
pytest-check
-
pytest-mock
-
pytest-subprocess
-
pytestCheckHook
-
requests-mock
-
socat
-
squashfsTools
-
writableTmpDirAsHomeHook
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTests = [
-
# Relies upon paths not present in Nix (like /bin/bash)
-
"test_run_builtin_build"
-
"test_run_prime"
-
"test_get_build_packages_with_source_type"
-
"test_get_build_packages"
-
# Relies upon certain paths being present that don't make sense on Nix.
-
"test_java_plugin_jre_not_17"
-
]
-
++ lib.optionals stdenv.hostPlatform.isAarch64 [
-
# This test is flaky on arm64, I think due to a mock library misbehaving
-
# on arm64.
-
"test_get_build_commands_is_reentrant"
-
];
-
-
disabledTestPaths = [
-
# Relies upon filesystem extended attributes, and suid/guid bits
-
"tests/unit/sources/test_base.py"
-
"tests/unit/packages/test_base.py"
-
"tests/unit/state_manager"
-
"tests/unit/test_xattrs.py"
-
"tests/unit/packages/test_normalize.py"
-
# Relies upon presence of apt/dpkg.
-
"tests/unit/packages/test_apt_cache.py"
-
"tests/unit/packages/test_deb.py"
-
"tests/unit/packages/test_chisel.py"
-
]
-
++ lib.optionals stdenv.hostPlatform.isAarch64 [
-
# These tests have hardcoded "amd64" strings which fail on aarch64
-
"tests/unit/executor/test_environment.py"
-
"tests/unit/features/overlay/test_executor_environment.py"
-
# Hard-coded assumptions about arguments relating to 'x86_64'
-
"tests/unit/plugins/test_dotnet_v2_plugin.py"
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Software artifact parts builder from Canonical";
-
homepage = "https://github.com/canonical/craft-parts";
-
changelog = "https://github.com/canonical/craft-parts/releases/tag/${src.tag}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-70
pkgs/development/python-modules/craft-platforms/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
annotated-types,
-
distro,
-
fetchFromGitHub,
-
nix-update-script,
-
hypothesis,
-
pytest-check,
-
pytestCheckHook,
-
pythonOlder,
-
setuptools-scm,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-platforms";
-
version = "0.10.0";
-
pyproject = true;
-
-
disabled = pythonOlder "3.10";
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-platforms";
-
tag = version;
-
hash = "sha256-86dUeMb3yL1ilbHxmknFaRH4Ce9AEl+5rSVW0WGaZV8=";
-
};
-
-
postPatch = ''
-
substituteInPlace craft_platforms/__init__.py --replace-fail "dev" "${version}"
-
'';
-
-
build-system = [ setuptools-scm ];
-
-
dependencies = [
-
annotated-types
-
distro
-
];
-
-
nativeCheckInputs = [
-
hypothesis
-
pytestCheckHook
-
pytest-check
-
];
-
-
pythonImportsCheck = [ "craft_platforms" ];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTests = [
-
# Attempts to get distro information, and expects "ubuntu-ish"
-
# information to be returned, which doesn't work under NixOS
-
"test_fuzz_get_platforms_build_plan_single_base"
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Manage platforms and architectures for charm applications";
-
homepage = "https://github.com/canonical/craft-platforms";
-
changelog = "https://github.com/canonical/craft-platforms/releases/tag/${version}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-111
pkgs/development/python-modules/craft-providers/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
packaging,
-
platformdirs,
-
pydantic,
-
pyyaml,
-
requests-unixsocket,
-
setuptools-scm,
-
pytest-check,
-
pytest-mock,
-
pytestCheckHook,
-
responses,
-
freezegun,
-
pytest-subprocess,
-
logassert,
-
writableTmpDirAsHomeHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-providers";
-
version = "3.0.0";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-providers";
-
tag = version;
-
hash = "sha256-8StnxyuvyK9HRl1smbhJFz1qZxyNOWnzELG0ku0dh8k=";
-
};
-
-
patches = [
-
# This lib will try to inject snaps *from the host system* into the build
-
# system. This patch short-circuits that logic and ensures that snaps are
-
# installed on the build system from the snap store - because there is no
-
# snapd on NixOS hosts that can be used for the injection. This patch will
-
# likely never be accepted upstream.
-
./inject-snaps.patch
-
];
-
-
postPatch = ''
-
substituteInPlace craft_providers/lxd/installer.py \
-
--replace-fail "/var/snap/lxd/common/lxd/unix.socket" "/var/lib/lxd/unix.socket"
-
-
substituteInPlace craft_providers/__init__.py \
-
--replace-fail "dev" "${version}"
-
-
# The urllib3 incompat: https://github.com/msabramo/requests-unixsocket/pull/69
-
# This is already patched in nixpkgs.
-
substituteInPlace pyproject.toml \
-
--replace-fail "setuptools==80.9.0" "setuptools"
-
'';
-
-
pythonRelaxDeps = [ "requests" ];
-
-
build-system = [ setuptools-scm ];
-
-
dependencies = [
-
packaging
-
platformdirs
-
pydantic
-
pyyaml
-
requests-unixsocket
-
];
-
-
pythonImportsCheck = [ "craft_providers" ];
-
-
nativeCheckInputs = [
-
freezegun
-
logassert
-
pytest-check
-
pytest-mock
-
pytest-subprocess
-
pytestCheckHook
-
responses
-
writableTmpDirAsHomeHook
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
disabledTestPaths = [
-
# Relies upon "logassert" python package which isn't in nixpkgs
-
"tests/unit/bases/test_ubuntu_buildd.py"
-
"tests/unit/bases/test_centos_7.py"
-
"tests/unit/bases/test_almalinux.py"
-
"tests/unit/actions/test_snap_installer.py"
-
# Relies upon "pytest-time" python package which isn't in nixpkgs
-
"tests/unit/multipass"
-
"tests/unit/lxd"
-
"tests/unit/test_base.py"
-
"tests/unit/util/test_retry.py"
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Interfaces for instantiating and controlling a variety of build environments";
-
homepage = "https://github.com/canonical/craft-providers";
-
changelog = "https://github.com/canonical/craft-providers/releases/tag/${src.tag}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-63
pkgs/development/python-modules/craft-providers/inject-snaps.patch
···
-
diff --git i/craft_providers/base.py w/craft_providers/base.py
-
index 00f56ec..302f359 100644
-
--- i/craft_providers/base.py
-
+++ w/craft_providers/base.py
-
@@ -655,40 +655,24 @@ class Base(ABC):
-
),
-
)
-
-
- if snap.channel:
-
- try:
-
- snap_installer.install_from_store(
-
- executor=executor,
-
- snap_name=snap.name,
-
- channel=snap.channel,
-
- classic=snap.classic,
-
- )
-
- except SnapInstallationError as error:
-
- raise BaseConfigurationError(
-
- brief=(
-
- f"failed to install snap {snap.name!r} from store"
-
- f" channel {snap.channel!r} in target environment."
-
- ),
-
- details=error.details,
-
- resolution=(
-
- "Check Snap store status at https://status.snapcraft.io"
-
- ),
-
- ) from error
-
- else:
-
- try:
-
- snap_installer.inject_from_host(
-
- executor=executor,
-
- snap_name=snap.name,
-
- classic=snap.classic,
-
- )
-
- except SnapInstallationError as error:
-
- raise BaseConfigurationError(
-
- brief=(
-
- f"failed to inject host's snap {snap.name!r} "
-
- "into target environment."
-
- ),
-
- details=error.details,
-
- ) from error
-
+ try:
-
+ snap_installer.install_from_store(
-
+ executor=executor,
-
+ snap_name=snap.name,
-
+ channel=snap.channel,
-
+ classic=snap.classic,
-
+ )
-
+ except SnapInstallationError as error:
-
+ raise BaseConfigurationError(
-
+ brief=(
-
+ f"failed to install snap {snap.name!r} from store"
-
+ f" channel {snap.channel!r} in target environment."
-
+ ),
-
+ details=error.details,
-
+ resolution=(
-
+ "Check Snap store status at https://status.snapcraft.io"
-
+ ),
-
+ ) from error
-
-
def wait_until_ready(self, executor: Executor) -> None:
-
"""Wait until base instance is ready.
-91
pkgs/development/python-modules/craft-store/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
setuptools,
-
setuptools-scm,
-
pytest-check,
-
pytest-httpx,
-
pytest-mock,
-
pyyaml,
-
pytestCheckHook,
-
annotated-types,
-
httpx,
-
jaraco-classes,
-
keyring,
-
macaroonbakery,
-
overrides,
-
pydantic,
-
pyxdg,
-
requests,
-
requests-toolbelt,
-
typing-extensions,
-
}:
-
-
buildPythonPackage rec {
-
pname = "craft-store";
-
version = "3.3.0";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "canonical";
-
repo = "craft-store";
-
tag = version;
-
hash = "sha256-ige4R5nwlfeSDyhzw0TDQMMIcExIJQuFAFvbNEpreSs=";
-
};
-
-
postPatch = ''
-
substituteInPlace pyproject.toml \
-
--replace-fail "setuptools==75.8.0" "setuptools"
-
'';
-
-
build-system = [
-
setuptools
-
setuptools-scm
-
];
-
-
pythonRelaxDeps = [ "httpx" ];
-
-
dependencies = [
-
annotated-types
-
httpx
-
jaraco-classes
-
keyring
-
macaroonbakery
-
overrides
-
pydantic
-
pyxdg
-
requests
-
requests-toolbelt
-
typing-extensions
-
];
-
-
pythonImportsCheck = [ "craft_store" ];
-
-
nativeCheckInputs = [
-
pytest-check
-
pytest-httpx
-
pytest-mock
-
pytestCheckHook
-
pyyaml
-
];
-
-
enabledTestPaths = [ "tests/unit" ];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Interfaces for communicating with Canonical Stores (e.g. Snap Store)";
-
homepage = "https://github.com/canonical/craft-store";
-
changelog = "https://github.com/canonical/craft-store/releases/tag/${version}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-46
pkgs/development/python-modules/logassert/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
setuptools,
-
pytestCheckHook,
-
flake8,
-
structlog,
-
}:
-
-
buildPythonPackage rec {
-
pname = "logassert";
-
version = "8.6";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "facundobatista";
-
repo = "logassert";
-
tag = version;
-
hash = "sha256-dkBsR4FmiKjHzZc74Mt2cAffO7ZuIRnLOpFx60e9+so=";
-
};
-
-
build-system = [ setuptools ];
-
-
pythonImportsCheck = [ "logassert" ];
-
-
nativeCheckInputs = [
-
flake8
-
pytestCheckHook
-
structlog
-
];
-
-
meta = {
-
description = "Simple Log Assertion mechanism for Python unittests";
-
homepage = "https://github.com/facundobatista/logassert";
-
changelog = "https://github.com/facundobatista/logassert/releases/tag/${src.tag}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-72
pkgs/development/python-modules/macaroonbakery/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
protobuf,
-
pymacaroons,
-
pynacl,
-
pyrfc3339,
-
requests,
-
setuptools,
-
httmock,
-
fixtures,
-
pytestCheckHook,
-
mock,
-
}:
-
-
buildPythonPackage rec {
-
pname = "macaroonbakery";
-
version = "1.3.4";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "go-macaroon-bakery";
-
repo = "py-macaroon-bakery";
-
tag = version;
-
hash = "sha256-NEhr8zkrHceeLbAyuUvc7U6dyQxkpkj0m5LlnBMafA0=";
-
};
-
-
# fix version string
-
postPatch = ''
-
substituteInPlace setup.py \
-
--replace-fail "VERSION = (1, 3, 3)" "VERSION = (1, 3, 4)"
-
'';
-
-
build-system = [ setuptools ];
-
-
dependencies = [
-
protobuf
-
pymacaroons
-
pynacl
-
pyrfc3339
-
requests
-
];
-
-
pythonRelaxDeps = true;
-
-
pythonImportsCheck = [ "macaroonbakery" ];
-
-
nativeCheckInputs = [
-
fixtures
-
httmock
-
mock
-
pytestCheckHook
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Python library for working with macaroons";
-
homepage = "https://github.com/go-macaroon-bakery/py-macaroon-bakery";
-
changelog = "https://github.com/go-macaroon-bakery/py-macaroon-bakery/releases/tag/${version}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-57
pkgs/development/python-modules/pydantic-yaml/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
pydantic,
-
ruamel-yaml,
-
typing-extensions,
-
setuptools-scm,
-
pytest-mock,
-
pytestCheckHook,
-
}:
-
-
buildPythonPackage rec {
-
pname = "pydantic-yaml";
-
version = "1.6.0";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "NowanIlfideme";
-
repo = "pydantic-yaml";
-
tag = "v${version}";
-
hash = "sha256-n5QWVHgYAg+Ad7Iv6CBSRQcl8lv4ZtcFMiC2ZHyi414=";
-
};
-
-
postPatch = ''
-
substituteInPlace src/pydantic_yaml/version.py \
-
--replace-fail "0.0.0" "${version}"
-
'';
-
-
build-system = [ setuptools-scm ];
-
-
dependencies = [
-
pydantic
-
ruamel-yaml
-
typing-extensions
-
];
-
-
pythonImportsCheck = [ "pydantic_yaml" ];
-
-
nativeCheckInputs = [
-
pytest-mock
-
pytestCheckHook
-
];
-
-
meta = {
-
description = "Small helper library that adds some YAML capabilities to pydantic";
-
homepage = "https://github.com/NowanIlfideme/pydantic-yaml";
-
changelog = "https://github.com/NowanIlfideme/pydantic-yaml/releases/tag/${src.tag}";
-
license = lib.licenses.mit;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
};
-
}
-50
pkgs/development/python-modules/snap-helpers/default.nix
···
-
{
-
lib,
-
buildPythonPackage,
-
fetchFromGitHub,
-
nix-update-script,
-
pyyaml,
-
setuptools,
-
pytestCheckHook,
-
pytest-mock,
-
}:
-
-
buildPythonPackage rec {
-
pname = "snap-helpers";
-
version = "0.4.2";
-
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "albertodonato";
-
repo = "snap-helpers";
-
tag = version;
-
hash = "sha256-7JBvrD4WNOcFSVx3xauk4JgiVGKWuUEdUMRlH7mudE4=";
-
};
-
-
nativeBuildInputs = [ setuptools ];
-
-
propagatedBuildInputs = [ pyyaml ];
-
-
pythonImportsCheck = [ "snaphelpers" ];
-
-
nativeCheckInputs = [
-
pytest-mock
-
pytestCheckHook
-
];
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "Interact with snap configuration and properties from inside a snap";
-
homepage = "https://github.com/albertodonato/snap-helpers";
-
changelog = "https://github.com/albertodonato/snap-helpers/releases/tag/${version}";
-
license = lib.licenses.lgpl3Only;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
platforms = lib.platforms.linux;
-
};
-
}
-44
pkgs/development/python-modules/spdx-lookup/default.nix
···
-
{
-
lib,
-
fetchFromGitHub,
-
buildPythonPackage,
-
nix-update-script,
-
setuptools,
-
spdx,
-
}:
-
-
buildPythonPackage rec {
-
pname = "spdx-lookup";
-
version = "0.3.2";
-
pyproject = true;
-
-
src = fetchFromGitHub {
-
owner = "bbqsrc";
-
repo = "spdx-lookup-python";
-
tag = "v${version}";
-
hash = "sha256-jtzhqRAj1BWdU8AuR7Gr343mL5alLXhi+SyCkCI5AAU=";
-
};
-
-
build-system = [ setuptools ];
-
-
dependencies = [ spdx ];
-
-
pythonImportsCheck = [ "spdx_lookup" ];
-
-
# upstream has no tests
-
doCheck = false;
-
-
passthru.updateScript = nix-update-script { };
-
-
meta = {
-
description = "SPDX license list query tool";
-
homepage = "https://github.com/bbqsrc/spdx-lookup-python";
-
changelog = "https://github.com/bbqsrc/spdx-lookup-python/releases/tag/v${version}";
-
license = lib.licenses.bsd2;
-
maintainers = with lib.maintainers; [
-
adhityaravi
-
bepri
-
dstathis
-
];
-
};
-
}
+3
pkgs/top-level/aliases.nix
···
cgal_4 = throw "cgal_4 has been removed as it is obsolete use cgal instead"; # Added 2024-12-30
challenger = taler-challenger; # Added 2024-09-04
+
charmcraft = throw "charmcraft was removed in Sep 25 following removal of LXD from nixpkgs"; # added 2025-09-18
check_smartmon = nagiosPlugins.check_smartmon; # Added 2024-05-03
check_systemd = nagiosPlugins.check_systemd; # Added 2024-05-03
check_zfs = nagiosPlugins.check_zfs; # Added 2024-05-03
···
rke2_testing = throw "'rke2_testing' has been removed from nixpkgs as the RKE2 testing channel no longer serves releases"; # Added 2025-06-02
rl_json = tclPackages.rl_json; # Added 2025-05-03
rockbox_utility = rockbox-utility; # Added 2022-03-17
+
rockcraft = throw "rockcraft was removed in Sep 25 following removal of LXD from nixpkgs"; # added 2025-09-18
rocmPackages_5 = throw "ROCm 5 has been removed in favor of newer versions"; # Added 2025-02-18
rofi-emoji-wayland = throw "'rofi-emoji-wayland' has been merged into `rofi-emoji as 'rofi-wayland' has been merged into 'rofi'"; # Added 2025-09-06
rofi-wayland = throw "'rofi-wayland' has been merged into 'rofi'"; # Added 2025-09-06
···
slurm-llnl = slurm; # renamed July 2017
sm64ex-coop = throw "'sm64ex-coop' was removed as it was archived upstream. Consider migrating to 'sm64coopdx'"; # added 2024-11-23
smartgithg = smartgit; # renamed March 2025
+
snapcraft = throw "snapcraft was removed in Sep 25 following removal of LXD from nixpkgs"; # added 2025-09-18
snapTools = throw "snapTools was removed because makeSnap produced broken snaps and it was the only function in snapTools. See https://github.com/NixOS/nixpkgs/issues/100618 for more details."; # Added 2024-03-04
snort2 = throw "snort2 has been removed as it is deprecated and unmaintained by upstream. Consider using snort (snort3) package instead."; # 2025-05-21
soldat-unstable = opensoldat; # Added 2022-07-02
-28
pkgs/top-level/python-packages.nix
···
};
};
-
catkin-pkg = callPackage ../development/python-modules/catkin-pkg { };
-
catppuccin = callPackage ../development/python-modules/catppuccin { };
cattrs = callPackage ../development/python-modules/cattrs { };
···
cpyparsing = callPackage ../development/python-modules/cpyparsing { };
-
craft-application = callPackage ../development/python-modules/craft-application { };
-
-
craft-archives = callPackage ../development/python-modules/craft-archives { };
-
-
craft-cli = callPackage ../development/python-modules/craft-cli { };
-
-
craft-grammar = callPackage ../development/python-modules/craft-grammar { };
-
-
craft-parts = callPackage ../development/python-modules/craft-parts { };
-
-
craft-platforms = callPackage ../development/python-modules/craft-platforms { };
-
-
craft-providers = callPackage ../development/python-modules/craft-providers { };
-
-
craft-store = callPackage ../development/python-modules/craft-store { };
-
cram = callPackage ../development/python-modules/cram { };
cramjam = callPackage ../development/python-modules/cramjam { };
···
log-symbols = callPackage ../development/python-modules/log-symbols { };
-
logassert = callPackage ../development/python-modules/logassert { };
-
logbook = callPackage ../development/python-modules/logbook { };
logfury = callPackage ../development/python-modules/logfury { };
···
macaddress = callPackage ../development/python-modules/macaddress { };
-
macaroonbakery = callPackage ../development/python-modules/macaroonbakery { };
-
macfsevents = callPackage ../development/python-modules/macfsevents { };
macholib = callPackage ../development/python-modules/macholib { };
···
pydantic-scim = callPackage ../development/python-modules/pydantic-scim { };
pydantic-settings = callPackage ../development/python-modules/pydantic-settings { };
-
-
pydantic-yaml = callPackage ../development/python-modules/pydantic-yaml { };
pydantic_1 = callPackage ../development/python-modules/pydantic/1.nix { };
···
snakeviz = callPackage ../development/python-modules/snakeviz { };
-
snap-helpers = callPackage ../development/python-modules/snap-helpers { };
-
snapcast = callPackage ../development/python-modules/snapcast { };
snappy-15-knots = callPackage ../development/python-modules/snappy-15-knots { };
···
spatialmath-python = callPackage ../development/python-modules/spatialmath-python { };
spdx = callPackage ../development/python-modules/spdx { };
-
-
spdx-lookup = callPackage ../development/python-modules/spdx-lookup { };
spdx-tools = callPackage ../development/python-modules/spdx-tools { };