2
0
Fork 0

Package stdcxx library

This commit is contained in:
Ehmry - 2020-04-05 22:20:52 +05:30
parent d0ba11aba8
commit 81fd2fce98
5 changed files with 26 additions and 28 deletions

View File

@ -25,7 +25,7 @@ with prev; {
inherit (final.genodeSources) genodeBase; inherit (final.genodeSources) genodeBase;
genodeLibcCross = callPackage ./libc { stdenv = crossLibcStdenv; }; genodeLibcCross = callPackage ./libc { };
genodePackages = import ../packages { nixpkgs = final; }; genodePackages = import ../packages { nixpkgs = final; };

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
{ stdenv, genodeSources, genodeBase }: { genodeSources, genodeBase }:
genodeSources.buildUpstream { genodeSources.buildUpstream {
name = "libc"; name = "libc";
@ -16,7 +16,7 @@ genodeSources.buildUpstream {
cp -r \ cp -r \
include/libc/* \ include/libc/* \
include/openlibm/* \ include/openlibm/* \
$GENODE_DIR/repos/libports/include/libc/* \ $GENODE_DIR/repos/libports/include/libc \
$dev/include/ $dev/include/
for spec in ${toString genodeSources.specs}; do for spec in ${toString genodeSources.specs}; do
dir=include/spec/$spec/libc dir=include/spec/$spec/libc

View File

@ -77,14 +77,17 @@ in rec {
NOVA = callPackage ./NOVA { }; NOVA = callPackage ./NOVA { };
solo5 = let drv = callPackage ./solo5 { };
in drv // { tests = drv.tests // { pname = "solo5-tests"; }; };
sotest-producer = callPackage ./sotest-producer { };
ssh_client = buildWorld { ssh_client = buildWorld {
name = "ssh_client"; name = "ssh_client";
targets = [ "app/ssh_client" ]; targets = [ "app/ssh_client" ];
portInputs = with genodeSources.ports; [ libc libssh openssl zlib ]; portInputs = with genodeSources.ports; [ libc libssh openssl zlib ];
}; };
solo5 = let drv = callPackage ./solo5 { }; stdcxx = callPackage ./stdcxx { };
in drv // { tests = drv.tests // { pname = "solo5-tests"; }; };
sotest-producer = callPackage ./sotest-producer { };
} }

View File

@ -1,24 +1,24 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
{ stdenvNoCC, llvmPackages }: { genodeSources, genodeBase }:
let let port = genodeSources.ports.stdcxx;
stdenv = stdenvNoCC; in genodeSources.buildUpstream {
inherit (llvmPackages) libcxx; name = "stdcxx";
in stdenv.mkDerivation rec { outputs = [ "out" "dev" ];
pname = "stdcxx"; targets = [ "LIB=stdcxx" ];
inherit (libcxx) version meta; portInputs = [ genodeSources.ports.libc port ];
propagatedBuildInputs = [ genodeBase ];
buildInputs = [ libcxx ]; STDCXX_PORT = port;
postInstall = ''
mkdir -p $dev/include
dontUnpack = true; pushd $STDCXX_PORT/*
dontConfigure = true; cp -r --no-preserve=mode \
dontBuild = true; include/stdcxx/* \
$GENODE_DIR/repos/libports/include/stdcxx/* \
installPhase = '' $dev/include/
cflags=$NIX_CXXSTDLIB_COMPILE \ popd
substituteAll ${./stdcxx.pc} ${pname}.pc
mkdir -p $out/lib/pkgconfig
install -Dm444 *.pc $out/lib/pkgconfig
''; '';
} }

View File

@ -1,5 +0,0 @@
Name: stdcxx
Description: Genode Standard C++ library
Version: @version@
Requires: libc libm
Cflags: @cflags@