2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, llvmPackages }:
|
2016-09-27 22:55:26 +01:00
|
|
|
|
|
|
|
let
|
2019-01-05 11:19:37 +00:00
|
|
|
clang = llvmPackages.clang-unwrapped;
|
2018-11-15 05:18:49 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "clang-tools";
|
2016-09-27 22:55:26 +01:00
|
|
|
version = stdenv.lib.getVersion clang;
|
|
|
|
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2018-11-15 05:18:49 +00:00
|
|
|
|
2018-12-12 14:11:17 +00:00
|
|
|
installPhase = ''
|
2018-11-15 05:18:49 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2018-12-12 14:11:17 +00:00
|
|
|
mkdir -p $out/bin
|
2016-09-27 22:55:26 +01:00
|
|
|
for tool in \
|
|
|
|
clang-apply-replacements \
|
|
|
|
clang-check \
|
|
|
|
clang-format \
|
|
|
|
clang-rename \
|
2018-11-15 05:18:49 +00:00
|
|
|
clang-tidy \
|
|
|
|
clangd
|
2016-09-27 22:55:26 +01:00
|
|
|
do
|
2018-12-12 14:11:17 +00:00
|
|
|
ln -s ${clang}/bin/$tool $out/bin/$tool
|
2016-09-27 22:55:26 +01:00
|
|
|
done
|
2018-11-15 05:18:49 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2016-09-27 22:55:26 +01:00
|
|
|
'';
|
2018-11-15 05:18:49 +00:00
|
|
|
|
2016-09-27 22:55:26 +01:00
|
|
|
meta = clang.meta // {
|
|
|
|
description = "Standalone command line tools for C++ development";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ aherrmann ];
|
|
|
|
};
|
|
|
|
}
|