2022-11-21 17:40:18 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "devbox";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.3.3";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jetpack-io";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-T1laFLVDtDYOA5x3zWcBU7ae1uN1cQUqLHtY36uEXOI=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2022-12-28 21:21:41 +00:00
|
|
|
"-X go.jetpack.io/devbox/internal/build.Version=${version}"
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# integration tests want file system access
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorHash = "sha256-3u3qg8BojCVp0gx8ZKRv2WS5K307CnTlFjvTgrlfw8w=";
|
2022-11-21 17:40:18 +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;
|
|
|
|
maintainers = with maintainers; [ urandom ];
|
|
|
|
};
|
|
|
|
}
|