package netbsd-utils { description = "small utilities from NetBSD"; version = unversioned; ccommon = true; files = { "col.c"; "getent.c"; "getconf.c"; }; exec = generic { cross = ` QEMU="qemu-`+linuxArch+` -L `+prefix+`/`+arch+` " `; build = ` CC="${CC:-cc} -O3" LIBBSD="-Wl,-Bstatic $(pkg-config --static --libs --cflags libbsd-overlay) -Wl,-Bdynamic" mkdir bin $CC $LIBBSD -o bin/col /extra/col.c $CC -o bin/getent /extra/getent.c $CC -o bin/getconf /extra/getconf.c `; check = ` T="${QEMU:-} ./bin/" ${T}col <<< 'col ok' ${T}getent passwd cure ${T}getconf PAGE_SIZE `; install = ` mkdir /work`+prefix+` mv bin /work`+prefix+` `; }; inputs = [ libmd, libbsd, ]; runtime = nil; tools = [ pkg-config ]; native = [ qemu ]; }