2
0
Fork 0

Add libc library

Repackage the depot libc with some metadata.
20.02
Emery Hemingway 3 years ago
parent 7b7af23809
commit ea9c2d30a6
  1. 1
      default.nix
  2. 25
      pkgs/libc/default.nix
  3. 9
      pkgs/libc/libc.pc
  4. 8
      pkgs/libc/libm.pc

@ -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 { };

@ -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
'';
}

@ -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

@ -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
Loading…
Cancel
Save