depot/third_party/nixpkgs/pkgs/development/tools/clang-tools/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

39 lines
770 B
Nix

{ lib, stdenv, llvmPackages }:
let
unwrapped = llvmPackages.clang-unwrapped;
in stdenv.mkDerivation {
pname = "clang-tools";
version = lib.getVersion unwrapped;
dontUnpack = true;
clang = llvmPackages.clang;
inherit unwrapped;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
substituteAll ${./wrapper} $out/bin/clangd
chmod +x $out/bin/clangd
for tool in \
clang-apply-replacements \
clang-check \
clang-format \
clang-rename \
clang-tidy
do
ln -s $out/bin/clangd $out/bin/$tool
done
runHook postInstall
'';
meta = unwrapped.meta // {
description = "Standalone command line tools for C++ development";
maintainers = with lib.maintainers; [ aherrmann ];
};
}