2022-06-28 03:58:39 +00:00
{ stdenv , lib , buildGoModule , fetchFromGitHub , installShellFiles , testers , k9s }:
2019-07-27 16:46:08 +00:00
buildGoModule rec {
pname = " k 9 s " ;
2022-09-27 14:42:30 +00:00
version = " 0 . 2 6 . 6 " ;
2019-07-27 16:46:08 +00:00
src = fetchFromGitHub {
2019-09-21 22:40:14 +00:00
owner = " d e r a i l e d " ;
repo = " k 9 s " ;
2020-02-01 18:47:21 +00:00
rev = " v ${ version } " ;
2022-09-27 14:42:30 +00:00
sha256 = " s h a 2 5 6 - c W k 2 K 1 + j 5 P 1 4 T O 7 Y S T Y 9 / 1 R T 2 H j G 9 B t f s F J y + c g 9 E D s = " ;
2019-07-27 16:46:08 +00:00
} ;
2021-08-26 06:45:51 +00:00
ldflags = [
" - s " " - w "
" - X g i t h u b . c o m / d e r a i l e d / k 9 s / c m d . v e r s i o n = ${ version } "
" - X g i t h u b . c o m / d e r a i l e d / k 9 s / c m d . c o m m i t = ${ src . rev } "
2022-06-28 03:58:39 +00:00
" - X g i t h u b . c o m / d e r a i l e d / k 9 s / c m d . d a t e = 1 9 7 0 - 0 1 - 0 1 T 0 0 : 0 0 : 0 0 Z "
2021-08-26 06:45:51 +00:00
] ;
2019-10-30 10:16:13 +00:00
2022-06-28 03:58:39 +00:00
tags = [ " n e t g o " ] ;
2019-07-27 16:46:08 +00:00
2022-09-23 04:01:31 +00:00
vendorSha256 = " s h a 2 5 6 - g N Z B q 1 f d N Y m c R e 5 M m L r r G t f f 2 c E f / Y F x J 9 I 2 r k H + u m E = " ;
2021-12-03 13:56:38 +00:00
2022-03-18 03:28:20 +00:00
# TODO investigate why some config tests are failing
doCheck = ! ( stdenv . isDarwin && stdenv . isAarch64 ) ;
2022-06-28 03:58:39 +00:00
# Required to workaround test check error:
preCheck = " e x p o r t H O M E = $ ( m k t e m p - d ) " ;
# For arch != x86
# {"level":"fatal","error":"could not create any of the following paths: /homeless-shelter/.config, /etc/xdg","time":"2022-06-28T15:52:36Z","message":"Unable to create configuration directory for k9s"}
passthru . tests . version = testers . testVersion {
package = k9s ;
command = " H O M E = $ ( m k t e m p - d ) k 9 s v e r s i o n - s " ;
inherit version ;
} ;
nativeBuildInputs = [ installShellFiles ] ;
postInstall = ''
installShellCompletion - - cmd k9s \
- - bash < ( $ out/bin/k9s completion bash ) \
- - fish < ( $ out/bin/k9s completion fish ) \
- - zsh < ( $ out/bin/k9s completion zsh )
'' ;
2020-08-04 00:26:27 +00:00
2021-01-11 07:54:33 +00:00
meta = with lib ; {
2020-10-11 05:55:05 +00:00
description = " K u b e r n e t e s C L I T o M a n a g e Y o u r C l u s t e r s I n S t y l e " ;
2020-03-14 07:15:49 +00:00
homepage = " h t t p s : / / g i t h u b . c o m / d e r a i l e d / k 9 s " ;
2019-07-27 16:46:08 +00:00
license = licenses . asl20 ;
2021-12-03 13:02:50 +00:00
maintainers = with maintainers ; [ Gonzih markus1189 bryanasdev000 ] ;
2019-07-27 16:46:08 +00:00
} ;
2020-07-08 16:16:04 +00:00
}