2020-11-06 20:59:33 +01:00
|
|
|
{ genodePackages, symlinkJoin }:
|
|
|
|
let inherit (genodePackages) genodeSources;
|
|
|
|
in symlinkJoin {
|
2020-05-07 21:33:26 +02:00
|
|
|
name = "posix";
|
2020-11-06 20:59:33 +01:00
|
|
|
paths = with genodePackages; [ libc posix ];
|
2020-05-27 14:23:50 +02:00
|
|
|
postBuild = ''
|
2020-05-07 21:33:26 +02:00
|
|
|
local headerDir="''${!outputDev}/include"
|
|
|
|
mkdir -p "$headerDir"
|
|
|
|
pushd ${genodeSources.ports.libc}/*
|
2020-03-27 10:08:22 +01:00
|
|
|
cp -r \
|
|
|
|
include/libc/* \
|
|
|
|
include/openlibm/* \
|
2020-05-27 14:23:50 +02:00
|
|
|
${genodeSources}/repos/libports/include/libc \
|
2020-05-07 21:33:26 +02:00
|
|
|
"$headerDir"
|
2020-03-27 10:08:22 +01:00
|
|
|
for spec in ${toString genodeSources.specs}; do
|
|
|
|
dir=include/spec/$spec/libc
|
|
|
|
if [ -d $dir ]; then
|
2020-05-07 21:33:26 +02:00
|
|
|
cp -r $dir/* "$headerDir"
|
2020-03-27 10:08:22 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
2020-03-24 13:47:30 +01:00
|
|
|
'';
|
2020-03-27 10:08:22 +01:00
|
|
|
}
|