anchor.diff:      version = "7.1.2";
       sha256 = "04djah9dadzw74nswn0xydkxn900kav8xdvxlxdl50nbrynxg9yf";
       buildInputs = [ libterminfo ];
  +    makeFlags = [ "INCSDIR=/include" ];
       NIX_CFLAGS_COMPILE = [
         "-D__scanflike(a,b)="
         "-D__va_list=va_list"
  
positive.code:     sha256 = "06plg0bjqgbb0aghpb9qlk8wkp1l2izdlr64vbr5laqyw8jg84zq";
      buildInputs = [ compat tic nbperf ];
      MKPIC = if stdenv.isDarwin then "no" else "yes";
      patchPhase = ''
        substituteInPlace term.c \
          --replace /usr/share $out/share
      '';
      postBuild = ''
        pushd $NETBSDSRCDIR/share/terminfo
        mkdir -p $out/share/misc
        make
        make BINDIR=/share install
        popd
      '';
      extraPaths = [
        (fetchNetBSD "share/terminfo" "7.1.2" "1z5vzq8cw24j05r6df4vd6r57cvdbv7vbm4h962kplp14xrbg2h3")
  
negative.code:       ar -rsc libfts.a lib/libc/gen/fts.o
      '';
      installPhase = ''
        runHook preInstall
  
        install -D lib/libc/gen/fts.3 $out/share/man/man3/fts.3
        install -D include/fts.h $out/include/fts.h
        install -D lib/libc/include/namespace.h $out/include/namespace.h
        install -D libfts.a $out/lib/libfts.a
  
        runHook postInstall
      '';
      setupHook = ./fts-setup-hook.sh;
    };
  