diff options
author | Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com> | 2024-01-03 17:02:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-03 17:02:59 -0500 |
commit | 47df65bb569c3485a3390b06b636005626b89d84 (patch) | |
tree | 587f36b66521b39e0cfb435a11974e12bda9ec5a /pkgs | |
parent | 020146194a59f1ec31eece8f7c0ff3643a4af80c (diff) | |
parent | 21b45f71677feefa08c42905a2dd99de5ffa8038 (diff) |
Merge pull request #278484 from adamcstephens/incus/complete
incus: install all shell completions
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/in/incus-unwrapped/package.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/by-name/in/incus-unwrapped/package.nix b/pkgs/by-name/in/incus-unwrapped/package.nix index 43bf65bef83e7..925a485a07237 100644 --- a/pkgs/by-name/in/incus-unwrapped/package.nix +++ b/pkgs/by-name/in/incus-unwrapped/package.nix @@ -1,6 +1,7 @@ { lib , buildGoModule , fetchFromGitHub +, fetchpatch , acl , cowsql , hwdata @@ -27,6 +28,14 @@ buildGoModule rec { vendorHash = "sha256-YfUvkN1qUS3FFKb1wysg40WcJA8fT9SGDChSdT+xnkc="; + patches = [ + # remove with > 0.4.0 + (fetchpatch { + url = "https://github.com/lxc/incus/commit/c0200b455a1468685d762649120ce7e2bb25adc9.patch"; + hash = "sha256-4fiSv6GcsKpdLh3iNbw3AGuDzcw1EadUvxtSjxRjtTA="; + }) + ]; + postPatch = '' substituteInPlace internal/usbid/load.go \ --replace "/usr/share/misc/usb.ids" "${hwdata}/share/hwdata/usb.ids" @@ -77,9 +86,15 @@ buildGoModule rec { ''; postInstall = '' + # use custom bash completion as it has extra logic for e.g. instance names installShellCompletion --bash --name incus ./scripts/bash/incus + + installShellCompletion --cmd incus \ + --fish <($out/bin/incus completion fish) \ + --zsh <($out/bin/incus completion zsh) ''; + passthru = { tests.incus = nixosTests.incus; |