2020-04-24 23:36:52 +00:00
|
|
|
{xcbuildHook, appleDerivation, apple_sdk, ncurses, libutil, lib}:
|
|
|
|
|
|
|
|
appleDerivation {
|
|
|
|
nativeBuildInputs = [ xcbuildHook ];
|
|
|
|
buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil ];
|
2022-06-26 10:26:21 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains:
|
|
|
|
# duplicate symbol '_tsamp' in: main.o top.o
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
2020-04-24 23:36:52 +00:00
|
|
|
NIX_LDFLAGS = "-lutil";
|
|
|
|
installPhase = ''
|
|
|
|
install -D Products/Release/libtop.a $out/lib/libtop.a
|
|
|
|
install -D Products/Release/libtop.h $out/include/libtop.h
|
|
|
|
install -D Products/Release/top $out/bin/top
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
platforms = lib.platforms.darwin;
|
|
|
|
maintainers = with lib.maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|