mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
llvmPackages.clang-tools: use bash for wrapper (#563394)
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
buildcpath() {
|
||||
local path after
|
||||
|
||||
Reference in New Issue
Block a user