We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 413230e commit 856d83aCopy full SHA for 856d83a
1 file changed
pkgs/sphinx-cmake.nix
@@ -29,13 +29,13 @@ stdenv.mkDerivation {
29
'';
30
31
postFixup = ''
32
- mkdir -p $out/nix-support
33
- cat > $out/nix-support/setup-hook <<EOF
34
- add_sphinx_to_cmake_flags() {
35
- # This appends the module path to the actual flags passed to the cmake command
36
- export cmakeFlags="\$cmakeFlags -DCMAKE_MODULE_PATH=$out/lib/cmake/sphinx-cmake"
37
- }
38
- addEnvHooks "\$hostOffset" add_sphinx_to_cmake_flags
+ mkdir -p $out/nix-support
+ cat > $out/nix-support/setup-hook <<EOF
+ add_sphinx_to_cmake_flags() {
+ # Use \''${cmakeFlags:-} to avoid "unbound variable" errors
+ export cmakeFlags="\''${cmakeFlags:-} -DCMAKE_MODULE_PATH=$out/lib/cmake/sphinx-cmake"
+ }
+ addEnvHooks "\$hostOffset" add_sphinx_to_cmake_flags
39
EOF
40
41
}
0 commit comments