bear: 3.1.3 -> 3.1.5

Bump to 3.1.5 and switch from protobuf_25 to protobuf, since upstream
3.1.4 has a patch that fixed previously encountered build failures.

Drop stale patch for functional tests that aren't run anyway.
Next patches reenable tests.
This commit is contained in:
Sergei Zimmerman
2024-10-17 13:49:47 +03:00
parent b628bd00fb
commit e758ca25b3
2 changed files with 4 additions and 41 deletions
@@ -6,7 +6,7 @@
ninja,
pkg-config,
grpc,
protobuf_25,
protobuf,
openssl,
nlohmann_json,
gtest,
@@ -22,13 +22,13 @@
stdenv.mkDerivation rec {
pname = "bear";
version = "3.1.3";
version = "3.1.5";
src = fetchFromGitHub {
owner = "rizsotto";
repo = pname;
rev = version;
hash = "sha256-1nZPzgLWcmaRkOUXdm16IW2Nw/p1w8GBGEfZX/v+En0=";
hash = "sha256-pwdjytP+kmTwozRl1Gd0jUqRs3wfvcYPqiQvVwa6s9c=";
};
nativeBuildInputs = [
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
buildInputs = [
grpc
protobuf_25
protobuf
openssl
nlohmann_json
gtest
@@ -63,11 +63,6 @@ stdenv.mkDerivation rec {
(lib.cmakeBool "ENABLE_FUNC_TESTS" false)
];
patches = [
# Fix toolchain environment variable handling and the Darwin SIP check.
./fix-functional-tests.patch
];
postPatch = ''
patchShebangs test/bin
@@ -1,32 +0,0 @@
diff --git a/test/lit.cfg b/test/lit.cfg
index 118c979..b69fecc 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -207,13 +207,8 @@ def is_preload_disabled():
if is_windows:
return True
elif sys.platform == 'darwin':
- command = ['csrutil', 'status']
- pattern = re.compile(r'System Integrity Protection status:\s+enabled')
- try:
- output = subprocess.check_output(command, stderr=subprocess.STDOUT)
- return any(pattern.match(line) for line in output.decode('utf-8').splitlines())
- except (OSError, subprocess.CalledProcessError):
- return False
+ # csrutil(8) isn't available in the Nix build sandbox.
+ return True
else:
return False
@@ -221,6 +216,11 @@ def is_preload_disabled():
if not is_preload_disabled():
config.available_features.add('preload')
+# Preserve the variables required for the Nix toolchain wrappers.
+for var, value in os.environ.items():
+ if var.startswith('NIX_'):
+ config.environment[var] = value
+
print(config.substitutions)
print(config.environment)
print(config.available_features)