mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "okteto";
|
|
version = "2.3.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "okteto";
|
|
repo = "okteto";
|
|
rev = version;
|
|
sha256 = "sha256-rKhXzmBV59bj/Dj2ORU1ggOohAs56iB15es924pHXp4=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-XT/ZLydN1oeuRupD3gjvY6+hOB/Lq5CQwhfr9/iT7JI=";
|
|
|
|
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 ];
|
|
};
|
|
}
|