uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
39
pkgs/development/tools/clang-tools/default.nix
Normal file
39
pkgs/development/tools/clang-tools/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ 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; [ patryk27 ];
|
||||
};
|
||||
}
|
||||
27
pkgs/development/tools/clang-tools/wrapper
Executable file
27
pkgs/development/tools/clang-tools/wrapper
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
buildcpath() {
|
||||
local path after
|
||||
while (( $# )); do
|
||||
case $1 in
|
||||
-isystem)
|
||||
shift
|
||||
path=$path${path:+':'}$1
|
||||
;;
|
||||
-idirafter)
|
||||
shift
|
||||
after=$after${after:+':'}$1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
echo $path${after:+':'}$after
|
||||
}
|
||||
|
||||
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
||||
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
||||
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
||||
$(<@clang@/nix-support/libcxx-cxxflags) \
|
||||
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
||||
|
||||
exec -a "$0" @unwrapped@/bin/$(basename $0) "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue