anchor.diff:      path = "lib/libedit";
       buildInputs = [ libterminfo libcurses ];
       propagatedBuildInputs = [ compat ];
  -    postBuild = "mkdir -p $out/usr/include/readline";
  -    patchPhase = ''
  +    makeFlags = [ "INCSDIR=/include" ];
  +    postPatch = ''
         sed -i '1i #undef bool_t' el.h
         substituteInPlace config.h \
           --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" ""
  
positive.code:     sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2";
      nativeBuildInputs = [ makeMinimal mandoc groff install ];
    };
    # END BOOTSTRAPPING
  
    libutil = netBSDDerivation {
      path = "lib/libutil";
  
negative.code:     path = "usr.bin/make";
      sha256 = "0srkkg6qdzqlccfi4xh19gl766ks6hpss76bnfvwmd0zg4q4zdar";
      version = "7.1.2";
      postPatch = ''
        # make needs this to pick up our sys make files
        export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\""
  
        substituteInPlace $NETBSDSRCDIR/share/mk/bsd.prog.mk \
          --replace '-Wl,-dynamic-linker=''${_SHLINKER}' "" \
          --replace '-Wl,-rpath,''${SHLIBDIR}' ""
      '' + lib.optionalString stdenv.isDarwin ''
        substituteInPlace $NETBSDSRCDIR/share/mk/bsd.sys.mk \
          --replace '-Wl,--fatal-warnings' "" \
          --replace '-Wl,--warn-shared-textrel' ""
        substituteInPlace $NETBSDSRCDIR/share/mk/bsd.lib.mk \
          --replace '-Wl,-soname,''${_LIB}.so.''${SHLIB_SOVERSION}' "" \
          --replace '-Wl,--whole-archive' "" \
          --replace '-Wl,--no-whole-archive' "" \
          --replace '-Wl,--warn-shared-textrel' "" \
          --replace '-Wl,-Map=''${_LIB}.so.''${SHLIB_SOVERSION}.map' "" \
          --replace '-Wl,-rpath,''${SHLIBDIR}' ""
      '';
      preInstall = ''
        mkdir -p $out$BINDIR $out$DOCDIR/reference/ref1/make \
                 $out$MANDIR/man1 $out$MANDIR/html1 $out/share/mk
      '';
      postInstall = ''
        (cd $NETBSDSRCDIR/share/mk && make FILESDIR=/share/mk install)
      '';
      extraPaths = [
        (fetchNetBSD "share/mk" "7.1.2" "0570v0siv0wygn8ygs1yy9pgk9xjw9x1axr5qg4xrddv3lskf9xa")
  