nixpkgs/pkgs/development/tools/devbox/default.nix
2024-03-22 08:51:14 +00:00

44 lines
1019 B
Nix

{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
}:
buildGoModule rec {
pname = "devbox";
version = "0.10.1";
src = fetchFromGitHub {
owner = "jetpack-io";
repo = pname;
rev = version;
hash = "sha256-iKWOGp5Clk+YFXHv/5k+7DZMA9TQzyIQoTlQs4IMbu4=";
};
ldflags = [
"-s"
"-w"
"-X go.jetpack.io/devbox/internal/build.Version=${version}"
];
# integration tests want file system access
doCheck = false;
vendorHash = "sha256-QnmU8+J+5IIajfVQ5XPrtuo2ELB7AD56KsHsT8wLDws=";
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 lagoja ];
};
}