nixpkgs/pkgs/development/tools/devbox/default.nix
2022-11-24 01:54:22 -05:00

44 lines
1002 B
Nix

{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
}:
buildGoModule rec {
pname = "devbox";
version = "0.1.1";
src = fetchFromGitHub {
owner = "jetpack-io";
repo = pname;
rev = version;
hash = "sha256-E2zryUE7DyDDC4DecxCNG24hOndFKDJ2qP8h2bbPnfg=";
};
ldflags = [
"-s"
"-w"
"-X go.jetpack.io/devbox/build.Version=${version}"
];
# integration tests want file system access
doCheck = false;
vendorHash = "sha256-0Jshdi1hcY6dhGaZRE7okJvAM7EPsEFO6NA8k3jk4sA=";
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 ];
};
}