about summary refs log tree commit diff
path: root/pkgs/os-specific/bsd/freebsd/pkgs/statHook.nix
blob: 4609c004e6f510a8a55a9001c70fb7daaf42e267 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  makeSetupHook,
  writeText,
  stat,
}:

# stat isn't in POSIX, and NetBSD stat supports a completely
# different range of flags than GNU stat, so including it in PATH
# breaks stdenv.  Work around that with a hook that will point
# NetBSD's build system and NetBSD stat without including it in
# PATH.
makeSetupHook { name = "netbsd-stat-hook"; } (
  writeText "netbsd-stat-hook-impl" ''
    makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat)
  ''
)