bmake.passthru.setupHook: set some defaults

These are all read from the environment by the default bmake
stdlib (e.g. <bsd.prog.mk>, <bsd.own.mk>).  Some of the default
values (like building cat pages instead of man pages, or stripping
binaries when installing) don't really make sense for Nixpkgs, so we
override them here for every build using bmake.

Eventually I'd like to unify the bmake setupHook and the NetBSD make
setupHook, but not today.
This commit is contained in:
Alyssa Ross 2021-06-06 18:30:46 +00:00
parent edf55bc389
commit 4de8cbfb16
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,13 @@
addMakeFlags() {
export prefix="$out"
export MANDIR="${!outputMan}/share/man"
export MANTARGET=man
export BINOWN=
export STRIP_FLAG=
}
preConfigureHooks+=(addMakeFlags)
bmakeBuildPhase() {
runHook preBuild

View file

@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
++ optional (stdenv.hostPlatform.libc != "libSystem") "-lcrypt"
++ optional (luaSupport) "-llua"
++ optionals (sslSupport) [ "-lssl" "-lcrypto" ];
makeFlags = [ "LDADD=$(_LDADD)" "prefix=$(out)" "MANDIR=$(out)/share/man" "BINOWN=" ];
makeFlags = [ "LDADD=$(_LDADD)" ];
doCheck = true;
checkInputs = [ inetutils wget ];