2
0
Fork 0
genodepkgs/overlay/libc/default.nix

30 lines
681 B
Nix
Raw Normal View History

# SPDX-License-Identifier: CC0-1.0
2020-04-05 18:50:52 +02:00
{ genodeSources, genodeBase }:
genodeSources.buildUpstream {
name = "libc";
outputs = [ "out" "dev" ];
targets = [ "LIB=libm" ];
portInputs = [ genodeSources.ports.libc ];
propagatedBuildInputs = [ genodeBase ];
LIBC_PORT = genodeSources.ports.libc;
postInstall = ''
mkdir -p $dev/include
pushd $LIBC_PORT/*
cp -r \
include/libc/* \
include/openlibm/* \
2020-04-05 18:50:52 +02:00
$GENODE_DIR/repos/libports/include/libc \
$dev/include/
for spec in ${toString genodeSources.specs}; do
dir=include/spec/$spec/libc
if [ -d $dir ]; then
cp -r $dir/* $dev/include/
fi
done
popd
2020-03-24 13:47:30 +01:00
'';
}