packaging: now wrapped is the default for nix
This commit is contained in:
@@ -226,11 +226,10 @@ set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTOR
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Nix wrapper
|
### Nix wrapper
|
||||||
On NixOS or when using `nix`, `clang-uml` provides a wrapper script called
|
On NixOS or when using `nix`, `clang-uml` uses a wrapper script,
|
||||||
`clang-uml-wrapped`, which builds and exports `CPATH` and `CPLUS_INCLUDE_PATH`
|
which builds and exports `CPATH` and `CPLUS_INCLUDE_PATH`
|
||||||
environment variables before running `clang-uml`, which contain valid
|
environment variables before running `clang-uml`, which contain valid
|
||||||
system header Clang paths for the current Nix environment.
|
system header Clang paths for the current Nix environment.
|
||||||
|
|
||||||
The `clang-uml-wrapped` script can be called the same way as `clang-uml` and
|
If you want to use an unwrapped version, the `clang-uml-unwrapped` binary
|
||||||
should resolve the system include paths without the need for any of the above
|
can be called the same way as `clang-uml`.
|
||||||
solutions.
|
|
||||||
|
|||||||
@@ -30,11 +30,13 @@ stdenv.mkDerivation {
|
|||||||
clang = if enableLibcxx then llvmPackages.libcxxClang else llvmPackages.clang;
|
clang = if enableLibcxx then llvmPackages.libcxxClang else llvmPackages.clang;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
export unwrapped_clang_uml="$out/bin/clang-uml"
|
cp $out/bin/clang-uml $out/bin/clang-uml-unwrapped
|
||||||
|
rm $out/bin/clang-uml
|
||||||
# inject clang and unwrap_clang_uml variables into wrapper
|
export unwrapped_clang_uml="$out/bin/clang-uml-unwrapped"
|
||||||
substituteAll ${./wrapper} $out/bin/clang-uml-wrapped
|
|
||||||
chmod +x $out/bin/clang-uml-wrapped
|
# inject clang and unwrapp_clang_uml variables into wrapper
|
||||||
|
substituteAll ${./wrapper} $out/bin/clang-uml
|
||||||
|
chmod +x $out/bin/clang-uml
|
||||||
|
|
||||||
installShellCompletion --bash $src/packaging/autocomplete/clang-uml
|
installShellCompletion --bash $src/packaging/autocomplete/clang-uml
|
||||||
installShellCompletion --zsh $src/packaging/autocomplete/_clang-uml
|
installShellCompletion --zsh $src/packaging/autocomplete/_clang-uml
|
||||||
|
|||||||
Reference in New Issue
Block a user