587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
55 lines
1.4 KiB
Nix
55 lines
1.4 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, okteto }:
|
|
|
|
buildGoModule rec {
|
|
pname = "okteto";
|
|
version = "2.25.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "okteto";
|
|
repo = "okteto";
|
|
rev = version;
|
|
hash = "sha256-F3tvk3vC6h8fJ2hZMKo2eQ0uUj0UsK7MEujo//wXJi0=";
|
|
};
|
|
|
|
vendorHash = "sha256-+Adnveutg8soqK2Zwn2SNq7SEHd/Z91diHbPYHrGVrA=";
|
|
|
|
postPatch = ''
|
|
# Disable some tests that need file system & network access.
|
|
find cmd -name "*_test.go" | xargs rm -f
|
|
rm -f pkg/analytics/track_test.go
|
|
'';
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/okteto/okteto/pkg/config.VersionString=${version}"
|
|
];
|
|
|
|
tags = [ "osusergo" "netgo" "static_build" ];
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd okteto \
|
|
--bash <($out/bin/okteto completion bash) \
|
|
--fish <($out/bin/okteto completion fish) \
|
|
--zsh <($out/bin/okteto completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = okteto;
|
|
command = "HOME=$(mktemp -d) okteto version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Develop your applications directly in your Kubernetes Cluster";
|
|
mainProgram = "okteto";
|
|
homepage = "https://okteto.com/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
};
|
|
}
|