Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
927 B

# SPDX-License-Identifier: CC0-1.0
{ genodeSources, genodeBase, writeText }:
genodeSources.buildDepot {
name = "posix";
propagatedBuildInputs = [ genodeBase ];
portInputs = [ genodeSources.ports.libc ];
preInstall =
# Take the libc ABI stubs rather than the actual libc.
# The libc needs a lot of work and we can't afford to
# rebuild the toolchain for every fix.
''
find depot -name libc.abi.so -exec install -D {} "''${!outputLib}/libc.so" \;
'';
postInstall = ''
local headerDir="''${!outputDev}/include"
mkdir -p "$headerDir"
pushd ${genodeSources.ports.libc}/*
cp -r \
include/libc/* \
include/openlibm/* \
$GENODE_DIR/repos/libports/include/libc \
"$headerDir"
for spec in ${toString genodeSources.specs}; do
dir=include/spec/$spec/libc
if [ -d $dir ]; then
cp -r $dir/* "$headerDir"
fi
done
popd
'';
}