depot/third_party/nixpkgs/pkgs/development/tools/devbox/default.nix

44 lines
1,011 B
Nix
Raw Normal View History

{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
}:
buildGoModule rec {
pname = "devbox";
version = "0.6.0";
src = fetchFromGitHub {
owner = "jetpack-io";
repo = pname;
rev = version;
hash = "sha256-XZf8xJcWUY+OqT4Sjwes9o09//ToG7oMIhhyLSHDctM=";
};
ldflags = [
"-s"
"-w"
"-X go.jetpack.io/devbox/internal/build.Version=${version}"
];
# integration tests want file system access
doCheck = false;
vendorHash = "sha256-IwAZA0/i9I/Ylz7M5SZ/nJ6nMkiT6aEM9dAGPnCzyAk=";
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 ];
};
}