From da15a92f1f75d2c12d159ab63039021218a38a05 Mon Sep 17 00:00:00 2001 From: Leonardo Romor Date: Tue, 25 Jun 2024 22:30:35 +0200 Subject: bant: init at 0.1.5 --- pkgs/by-name/ba/bant/package.nix | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pkgs/by-name/ba/bant/package.nix (limited to 'pkgs/by-name/ba') diff --git a/pkgs/by-name/ba/bant/package.nix b/pkgs/by-name/ba/bant/package.nix new file mode 100644 index 0000000000000..669e4ae1719bb --- /dev/null +++ b/pkgs/by-name/ba/bant/package.nix @@ -0,0 +1,66 @@ +{ + lib, + stdenv, + buildBazelPackage, + fetchFromGitHub, + bazel_6, + jdk, + git, +}: + +let + system = stdenv.hostPlatform.system; + registry = fetchFromGitHub { + owner = "bazelbuild"; + repo = "bazel-central-registry"; + rev = "1c729c2775715fd98f0f948a512eb173213250da"; + hash = "sha256-1iaDDM8/v8KCOUjPgLUtZVta7rMzwlIK//cCoLUrb/s="; + }; +in buildBazelPackage rec { + pname = "bant"; + version = "0.1.5"; + + src = fetchFromGitHub { + owner = "hzeller"; + repo = "bant"; + rev = "v${version}"; + hash = "sha256-3xGAznR/IHQHY1ISqmU8NxI90Pl57cdYeRDeLVh9L08="; + }; + + bazelFlags = ["--registry" "file://${registry}"]; + + postPatch = '' + patchShebangs scripts/create-workspace-status.sh + ''; + + fetchAttrs = { + sha256 = { + aarch64-linux = "sha256-jtItWNfl+ebQqU8VWmvLsgNYNARGxN8+CTBz2nZcBEY="; + x86_64-linux = "sha256-ACJqybpHoMSg2ApGWkIyhdAQjIhb8gxUdo8SuWJvTNE="; + }.${system} or (throw "No hash for system: ${system}"); + }; + + nativeBuildInputs = [ + jdk + git + ]; + bazel = bazel_6; + + bazelBuildFlags = [ "-c opt" ]; + bazelTestTargets = [ "//..." ]; + bazelTargets = [ "//bant:bant" ]; + + buildAttrs = { + installPhase = '' + install -D --strip bazel-bin/bant/bant "$out/bin/bant" + ''; + }; + + meta = with lib; { + description = "Bazel/Build Analysis and Navigation Tool"; + homepage = "http://bant.build/"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ hzeller lromor ]; + platforms = platforms.linux; + }; +} -- cgit 1.4.1