Skip to content

Commit

Permalink
bant: 0.1.7 fix changed hash of fixed derivation.
Browse files Browse the repository at this point in the history
The hash of the fixed derivation changed

If the old derivation with the hash was cached on the system, the
build failed with:

```
ERROR: /build/output/external/googletest~1.14.0.bcr.1/BUILD.bazel:80:11: Compiling googletest/src/gtest.cc failed: The include path '/nix/store/p5w6cmwqfvhyaf4vjr7jb18a90icrrr2-openjdk-21.0.3+9/include' references a path outside of the execution root.
ERROR: /build/output/external/abseil-cpp~20240116.2/absl/base/BUILD.bazel:755:11: Compiling absl/base/internal/strerror.cc failed: The include path '/nix/store/p5w6cmwqfvhyaf4vjr7jb18a90icrrr2-openjdk-21.0.3+9/include' references a path outside of the execution root.
```

This indicates that the derivation also bakes in the path of the used
JDK, which apparently changed since last time. Quick fix for now:
adapt hash, but hopefully there could be a more long-term solution.
  • Loading branch information
hzeller committed Oct 22, 2024
1 parent 83429e7 commit 062011c
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions pkgs/by-name/ba/bant/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ let
rev = "40bc9ad53e5a59d596935839e7c072679e706266";
hash = "sha256-CL0YMQd1ck6/dlvJCLxt9jYyqDuk+iAWfdBOMj864u8=";
};
in buildBazelPackage rec {
in
buildBazelPackage rec {
pname = "bant";
version = "0.1.7";

Expand All @@ -26,17 +27,22 @@ in buildBazelPackage rec {
hash = "sha256-QbxPosjlrpxbz6gQKUKccF2Gu/i5xvqh2gwfABYE8kE=";
};

bazelFlags = ["--registry" "file://${registry}"];
bazelFlags = [
"--registry"
"file://${registry}"
];

postPatch = ''
patchShebangs scripts/create-workspace-status.sh
'';

fetchAttrs = {
sha256 = {
aarch64-linux = "sha256-09RL0tj6xsGEmuv11V81eAtqLc9nAaE8Il3d6ueS0UQ=";
x86_64-linux = "sha256-6mlaJ/kT14vKvlJjxqBK/lESjjxbcYxApi7+eiiI37M=";
}.${system} or (throw "No hash for system: ${system}");
hash =
{
aarch64-linux = "sha256-LNca4h4yceSgve9GYUoXqlODKPjLAa71kh1BWXqRYtk=";
x86_64-linux = "sha256-bRFIfaVbsU2WroXR/i0E7J4rWeaNEoum93r8qOMXXvc=";
}
.${system} or (throw "No hash for system: ${system}");
};

nativeBuildInputs = [
Expand All @@ -58,7 +64,10 @@ in buildBazelPackage rec {
description = "Bazel/Build Analysis and Navigation Tool";
homepage = "http://bant.build/";
license = licenses.gpl2Only;
maintainers = with maintainers; [ hzeller lromor ];
maintainers = with maintainers; [
hzeller
lromor
];
platforms = platforms.linux;
};
}

0 comments on commit 062011c

Please sign in to comment.