incus: enable use of fetchpatch2 for patches

This commit is contained in:
Tom Herbers
2026-05-05 17:43:10 +02:00
parent 622550161e
commit f5e95f6b31
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -9,14 +9,15 @@
lib,
buildGoModule,
installShellFiles,
fetchpatch2,
}:
let
pname = "incus${lib.optionalString lts "-lts"}-client";
evaluatedPatches = if lib.isFunction patches then patches fetchpatch2 else patches;
in
buildGoModule {
inherit
patches
pname
src
vendorHash
@@ -29,6 +30,8 @@ buildGoModule {
subPackages = [ "cmd/incus" ];
patches = evaluatedPatches;
postInstall = ''
# Needed for builds on systems with auto-allocate-uids to pass.
# Incus tries to read ~/.config/incus while generating completions
+3 -1
View File
@@ -14,6 +14,7 @@
stdenv,
buildGoModule,
fetchFromGitHub,
fetchpatch2,
acl,
buildPackages,
cowsql,
@@ -51,6 +52,7 @@ let
sphinxext-opengraph
]
);
evaluatedPatches = if lib.isFunction patches then patches fetchpatch2 else patches;
in
buildGoModule (finalAttrs: {
@@ -75,7 +77,7 @@ buildGoModule (finalAttrs: {
// (if (rev == null) then { tag = "v${version}"; } else { inherit rev; })
);
patches = [ ./docs.patch ] ++ patches;
patches = [ ./docs.patch ] ++ evaluatedPatches;
excludedPackages = [
# statically compile these