croc: 10.3.0 -> 10.3.1, install shell completions

Diff: https://github.com/schollz/croc/compare/v10.3.0...v10.3.1
This commit is contained in:
Sandro Jäckel
2025-11-22 23:57:27 +01:00
parent 34fe0487f8
commit 9dbf2f8d2f
+19 -2
View File
@@ -3,24 +3,41 @@
buildGoModule,
fetchFromGitHub,
callPackage,
installShellFiles,
nixosTests,
stdenv,
}:
buildGoModule rec {
pname = "croc";
version = "10.3.0";
version = "10.3.1";
src = fetchFromGitHub {
owner = "schollz";
repo = "croc";
rev = "v${version}";
hash = "sha256-5mxrfYAR4kTy9hdbsC7wFdroHf68dknPH3mq4KXG36Y=";
hash = "sha256-oNk4ReqteTeWKjsmVPC2yVRv1A9WN9jUbiT40flfM+o=";
};
vendorHash = "sha256-xEF1vjYQaeDYxcC3FTgR0zCFqvziNIrJVpJJT4o1cVU=";
subPackages = [ "." ];
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
installShellCompletion --cmd croc \
--bash src/install/bash_autocomplete \
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
--fish <($out/bin/croc generate-fish-completion) \
''
+ ''
--zsh src/install/zsh_autocomplete
'';
passthru = {
tests = {
local-relay = callPackage ./test-local-relay.nix { };