incus: enable use of fetchpatch2 for patches
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user