From 0b9d587d923e984f7f4cf5a83c3520eba56d3a06 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Mon, 7 Nov 2022 17:28:22 +0000 Subject: [PATCH] devbox: init at 0.1.0 Fixes #196717 --- pkgs/development/tools/devbox/default.nix | 43 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/tools/devbox/default.nix diff --git a/pkgs/development/tools/devbox/default.nix b/pkgs/development/tools/devbox/default.nix new file mode 100644 index 000000000000..d9c202b6ffd2 --- /dev/null +++ b/pkgs/development/tools/devbox/default.nix @@ -0,0 +1,43 @@ +{ buildGoModule +, fetchFromGitHub +, installShellFiles +, lib +}: +buildGoModule rec { + pname = "devbox"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "jetpack-io"; + repo = pname; + rev = version; + hash = "sha256-TxHfgi3/Q4aa5of29OGTs1Qy5PPIK4Gcwd11KJ70NIc="; + }; + + ldflags = [ + "-s" + "-w" + "-X go.jetpack.io/devbox/build.Version=${version}" + ]; + + # integration tests want file system access + doCheck = false; + + vendorHash = "sha256-XeoQI5Rel0qP9cjguPqne7pfNdQJKN+uHRZGnrIGtHk="; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51a52a449159..d1e7e1d9813c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16729,6 +16729,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + devbox = callPackage ../development/tools/devbox { }; + libcxx = llvmPackages.libcxx; libcxxabi = llvmPackages.libcxxabi;