freebsd.libcasper: init

This commit is contained in:
Audrey Dutcher 2024-05-27 12:38:32 -07:00 committed by John Ericson
parent e7ff42b521
commit f0f17c0ce6

View File

@ -0,0 +1,26 @@
{
lib,
stdenv,
mkDerivation,
libnv,
}:
mkDerivation {
path = "lib/libcasper/libcasper";
extraPaths = [
"lib/Makefile.inc"
"lib/libcasper"
];
buildInputs = [ libnv ];
MK_TESTS = "no";
makeFlags = [
"STRIP=-s" # flag to install, not command
"CFLAGS=-DWITH_CASPER"
] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "MK_WERROR=no";
postInstall = ''
make -C $BSDSRCDIR/lib/libcasper/services $makeFlags CFLAGS="-DWITH_CASPER -I$out/include"
make -C $BSDSRCDIR/lib/libcasper/services $makeFlags install
'';
}