Hi,
I am using a nix-shell file to create a working directory for a C++ project. Whenever I use clang-format in the shell with some added libs, ie. nix-shell -p clang-tools libGL
I get the following error:
[nix-shell:/tmp/tmp.GUs295laXm]$ clang-format --version
/nix/store/732k81zm5rr7p98sy2hln710d1q3x2xa-clang-tools-8.0.1/bin/clang-format: line 9: $path${path':'}$1: bad substitution
clang-format version 8.0.1 (tags/RELEASE_801/final)
When I only use clang-tools without any libs, ie nix-shell -p clang-tools
, it works fine
[nix-shell:/tmp/tmp.GUs295laXm]$ clang-format --version
clang-format version 8.0.1 (tags/RELEASE_801/final)
I am on NixOS 19.09. Originally I ran into this problem when using lorri + direnv, but this is the minimal example to reproduce it.