Files
nixpkgs/pkgs/by-name/ba/bant/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

80 lines
1.6 KiB
Nix

{
lib,
stdenv,
buildBazelPackage,
fetchFromGitHub,
bazel_7,
jdk,
nix-update-script,
cctools,
}:
let
system = stdenv.hostPlatform.system;
registry = fetchFromGitHub {
owner = "bazelbuild";
repo = "bazel-central-registry";
rev = "1f55d91e1be0e4863a698b9d7582cf097ad456ee";
hash = "sha256-ESHF5FhLvn4u4j//6AFiSJRJYSKrI4EKr4oDwvsrcPM=";
};
in
buildBazelPackage rec {
pname = "bant";
version = "0.2.3";
src = fetchFromGitHub {
owner = "hzeller";
repo = "bant";
rev = "v${version}";
hash = "sha256-0RWR793+qXc5QYIc7wIL323iDkNts9w4e90FCdHT6t4=";
};
bazelFlags = [
"--registry"
"file://${registry}"
];
LIBTOOL = lib.optionalString stdenv.hostPlatform.isDarwin "${cctools}/bin/libtool";
postPatch = ''
patchShebangs scripts/create-workspace-status.sh
'';
removeRulesCC = false;
fetchAttrs = {
hash =
{
aarch64-linux = "sha256-aGfFbeosrWhNqiHV9ng59DeMZSGjaylPRfolxatauJE";
x86_64-linux = "sha256-nbHHkgN4O8bWZzrpQUMZbm4+iRffqdfu7C1kkLJ3GDQ=";
}
.${system} or (throw "No hash for system: ${system}");
};
nativeBuildInputs = [
jdk
];
bazel = bazel_7;
bazelBuildFlags = [ "-c opt" ];
bazelTestTargets = [ "//..." ];
bazelTargets = [ "//bant:bant" ];
buildAttrs = {
installPhase = ''
install -D --strip bazel-bin/bant/bant "$out/bin/bant"
'';
};
passthru.updateScript = nix-update-script { };
meta = {
description = "Bazel/Build Analysis and Navigation Tool";
homepage = "http://bant.build/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
hzeller
lromor
];
};
}