From c29a53b3cea3ed86b0b95677e8c6f1508a94f16c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 15 Nov 2018 13:18:49 +0800 Subject: [PATCH] clang-tools: install clangd as well --- pkgs/development/tools/clang-tools/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/clang-tools/default.nix b/pkgs/development/tools/clang-tools/default.nix index 0fcaee574681..0abea99f64ae 100644 --- a/pkgs/development/tools/clang-tools/default.nix +++ b/pkgs/development/tools/clang-tools/default.nix @@ -2,24 +2,31 @@ let clang = llvmPackages.clang-unwrapped; - version = stdenv.lib.getVersion clang; -in -stdenv.mkDerivation { - name = "clang-tools-${version}"; +in stdenv.mkDerivation { + pname = "clang-tools"; + version = stdenv.lib.getVersion clang; + dontUnpack = true; + installPhase = '' + runHook preInstall + mkdir -p $out/bin for tool in \ clang-apply-replacements \ clang-check \ clang-format \ clang-rename \ - clang-tidy + clang-tidy \ + clangd do ln -s ${clang}/bin/$tool $out/bin/$tool done + + runHook postInstall ''; + meta = clang.meta // { description = "Standalone command line tools for C++ development"; maintainers = with stdenv.lib.maintainers; [ aherrmann ];