2
0
Fork 0

Add libc library

Repackage the depot libc with some metadata.
This commit is contained in:
Emery Hemingway 2019-10-16 15:36:12 +02:00
parent 7b7af23809
commit ea9c2d30a6
4 changed files with 43 additions and 0 deletions

View File

@ -9,6 +9,7 @@ let
depot = callPackage ./depot { };
dhallPackages = super.dhallPackages // (callPackage ./dhall { });
genode = (callPackage ./upstream { } // {
libc = callPackage ./pkgs/libc { };
nic_bus = callPackage ./pkgs/nic_bus { };
});
nova = callPackage ./NOVA { };

25
pkgs/libc/default.nix Normal file
View File

@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: Emery Hemingway
#
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
{ stdenvNoCC, depot }:
let stdenv = stdenvNoCC;
in stdenv.mkDerivation {
pname = "libc";
version = "12.0.0";
outputs = [ "out" "dev" ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
cp -r ${depot.libc} $out
mkdir -p $dev/lib/pkgconfig
substituteAll ${./libc.pc} libc.pc
substituteAll ${./libm.pc} libm.pc
install -Dt $dev/lib/pkgconfig *.pc
'';
}

9
pkgs/libc/libc.pc Normal file
View File

@ -0,0 +1,9 @@
libdir=@out@/lib
Name: genode-libc
Description: Genode C runtime library
URL: https://genode.org/
Version: @version@
Requires: vfs
Cflags: -D__FreeBSD__=8 -D__ISO_C_VISIBLE=1999 -fno-builtin-sin -fno-builtin-cos -fno-builtin-sinf -fno-builtin-cosf
Libs: ${libdir}/libc.lib.so

8
pkgs/libc/libm.pc Normal file
View File

@ -0,0 +1,8 @@
libdir=@out@/lib
Name: genode-libm
Description: Genode math library
URL: https://genode.org/
Version: @version@
Requires: libc
Libs: ${libdir}/libm.lib.so