From a9c1e0b9906b00d66bdd2056153e5ba0a0d067d5 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Thu, 18 Apr 2024 18:05:27 +0100 Subject: [PATCH] python3Packages.craft-providers: update snap injection patch to use beta for all crafts --- pkgs/development/python-modules/craft-providers/default.nix | 5 +++++ .../python-modules/craft-providers/inject-snaps.patch | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/craft-providers/default.nix b/pkgs/development/python-modules/craft-providers/default.nix index e3c384f455ba..4f463e628bd6 100644 --- a/pkgs/development/python-modules/craft-providers/default.nix +++ b/pkgs/development/python-modules/craft-providers/default.nix @@ -33,6 +33,11 @@ buildPythonPackage rec { }; 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 ]; diff --git a/pkgs/development/python-modules/craft-providers/inject-snaps.patch b/pkgs/development/python-modules/craft-providers/inject-snaps.patch index 85dec7f8bd97..37f9f2f82d7e 100644 --- a/pkgs/development/python-modules/craft-providers/inject-snaps.patch +++ b/pkgs/development/python-modules/craft-providers/inject-snaps.patch @@ -38,7 +38,7 @@ index 3c914a2..d9c2cf9 100644 - details=error.details, - ) from error + try: -+ channel = "latest/edge" if snap.name == "rockcraft" else "latest/stable" ++ channel = "latest/beta" + snap_installer.install_from_store( + executor=executor, + snap_name=snap.name,