6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "okteto";
|
|
version = "2.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "okteto";
|
|
repo = "okteto";
|
|
rev = version;
|
|
hash = "sha256-BKDjtC3NDazFsvX/FM0qXpHd1muXUQDgzBMSLipA4/U=";
|
|
};
|
|
|
|
vendorHash = "sha256-Yi+4fGCHLH/kA4DuPI2uQ/27xhMd4cPFkTWlI6Bc13A=";
|
|
|
|
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)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Develop your applications directly in your Kubernetes Cluster";
|
|
homepage = "https://okteto.com/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
};
|
|
}
|