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:
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user