llvmPackages.clang-tools: use bash for wrapper (#563394)

This commit is contained in:
Stefan Frijters
2026-09-18 08:57:37 +00:00
committed by GitHub
2 changed files with 10 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
stdenv,
runCommand,
writeText,
bashNonInteractive,
clang-unwrapped,
clang,
libcxxClang,
@@ -20,6 +21,8 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
__structuredAttrs = true;
buildInputs = [ bashNonInteractive ];
installPhase = ''
runHook preInstall
@@ -63,9 +66,11 @@ stdenv.mkDerivation (finalAttrs: {
passthru.tests =
let
src = writeText "main.cpp" ''
#include <assert.h>
#include <iostream>
int main() {
assert(true);
std::cout << "Hi!";
}
'';
@@ -76,6 +81,10 @@ stdenv.mkDerivation (finalAttrs: {
${finalAttrs.finalPackage}/bin/clangd --check=${src}
touch $out
'';
smokeOkClangTidy = runCommand "clang-tidy-test-smoke-ok" { } ''
${finalAttrs.finalPackage}/bin/clang-tidy ${src}
touch $out
'';
smokeErr = runCommand "clang-tools-test-smoke-err" { } ''
(${finalAttrs.finalPackage}/bin/clangd --query-driver='**' --check=${src} 2>&1 || true) \
| grep 'use of undeclared identifier'

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
buildcpath() {
local path after