diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index 853b56f3c510..dedeb8d45c92 100644 --- a/doc/stdenv/stdenv.chapter.md +++ b/doc/stdenv/stdenv.chapter.md @@ -1371,6 +1371,14 @@ This setup hook moves any systemd user units installed in the `lib/` subdirector This hook only runs when compiling for Linux. +### `no-broken-symlinks.sh` {#no-broken-symlinks.sh} + +This setup hook checks for, reports, and (by default) fails builds when "broken" symlinks are found. A symlink is considered "broken" if it's dangling (the target doesn't exist) or reflexive (it refers to itself). + +By setting `allowDanglingSymlinks` or `allowReflexiveSymlinks` the hook can be configured to allow symlinks with non-existent targets or symlinks which are reflexive, respectively. + +This hook can be disabled entirely by setting `dontCheckForBrokenSymlinks`. + ### `set-source-date-epoch-to-latest.sh` {#set-source-date-epoch-to-latest.sh} This sets `SOURCE_DATE_EPOCH` to the modification time of the most recent file.