2022-11-07 17:28:22 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "devbox";
|
2023-12-25 16:30:07 +00:00
|
|
|
version = "0.8.5";
|
2022-11-07 17:28:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jetpack-io";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-12-25 16:30:07 +00:00
|
|
|
hash = "sha256-Vgke4CTVU5KW7iDyzk6P1ab5nOyICblvJtUQTISc2jg=";
|
2022-11-07 17:28:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2022-12-26 03:58:18 +00:00
|
|
|
"-X go.jetpack.io/devbox/internal/build.Version=${version}"
|
2022-11-07 17:28:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# integration tests want file system access
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-12-25 16:30:07 +00:00
|
|
|
vendorHash = "sha256-rP3vktCfmUeZhc0DaU2osVryNabsnaWWyfFYFy7W1pc=";
|
2022-11-07 17:28:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd devbox \
|
|
|
|
--bash <($out/bin/devbox completion bash) \
|
|
|
|
--fish <($out/bin/devbox completion fish) \
|
|
|
|
--zsh <($out/bin/devbox completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Instant, easy, predictable shells and containers.";
|
|
|
|
homepage = "https://www.jetpack.io/devbox";
|
|
|
|
license = licenses.asl20;
|
2023-10-27 18:22:44 +00:00
|
|
|
maintainers = with maintainers; [ urandom lagoja ];
|
2022-11-07 17:28:22 +00:00
|
|
|
};
|
|
|
|
}
|