2018-12-12 15:11:17 +01:00
|
|
|
{ stdenv, writeScript, llvmPackages_latest }:
|
2016-09-27 23:55:26 +02:00
|
|
|
|
|
|
|
let
|
2018-12-12 15:11:17 +01:00
|
|
|
clang = llvmPackages_latest.clang-unwrapped;
|
2016-09-27 23:55:26 +02:00
|
|
|
version = stdenv.lib.getVersion clang;
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "clang-tools-${version}";
|
2018-12-12 15:11:17 +01:00
|
|
|
unpackPhase = ":";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2016-09-27 23:55:26 +02:00
|
|
|
for tool in \
|
|
|
|
clang-apply-replacements \
|
|
|
|
clang-check \
|
|
|
|
clang-format \
|
|
|
|
clang-rename \
|
|
|
|
clang-tidy
|
|
|
|
do
|
2018-12-12 15:11:17 +01:00
|
|
|
ln -s ${clang}/bin/$tool $out/bin/$tool
|
2016-09-27 23:55:26 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
meta = clang.meta // {
|
|
|
|
description = "Standalone command line tools for C++ development";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ aherrmann ];
|
|
|
|
};
|
|
|
|
}
|