代码拉取完成,页面将自动刷新
{ nixpkgs ? (import ./pinned.nix { }),
includeos ? import ./default.nix { },
pkgs ? nixpkgs.pkgsStatic,
llvmPkgs ? pkgs.llvmPackages_16
}:
pkgs.mkShell rec {
stdenv = pkgs.llvmPackages_16.libcxxStdenv;
vmbuild_pkg = nixpkgs.callPackage ./vmbuild.nix {};
packages = [
pkgs.buildPackages.cmake
pkgs.buildPackages.nasm
pkgs.buildPackages.llvmPackages_16.libcxxStdenv.cc
vmbuild_pkg
];
buildInputs = [
pkgs.microsoft_gsl
];
# TODO: Consider moving these to os.cmake, or overlay.nix. The same ones are
# defined in example/default.nix.
libc = "${includeos.musl-includeos}/lib/libc.a";
libcxx = "${includeos.stdenv.cc.libcxx}/lib/libc++.a";
libcxxabi = "${includeos.stdenv.cc.libcxx}/lib/libc++abi.a";
libunwind = "${llvmPkgs.libraries.libunwind}/lib/libunwind.a";
vmbuild = "${vmbuild_pkg}/bin/vmbuild";
linkdeps = [
libc
libcxx
libcxxabi
libunwind
];
shellHook = ''
echo "Nix shell for IncludeOS development."
if [ -z "$INCLUDEOS_PACKAGE" ]; then
echo "INCLUDEOS_PACKAGE must be defined. It can either be a nix package or a cmake install prefix"
exit 1
fi
echo "Validating link-time dependencies: "
for dep in ${toString linkdeps}; do
file $dep
done
echo ""
export CXX=clang++
export CC=clang
export bootloader=$INCLUDEOS_PACKAGE/boot/bootloader
# FIXME: This is pretty bad, maybe use a tempdir.
rm -rf build_example
mkdir build_example
cd build_example
cmake ../example -DARCH=x86_64 -DINCLUDEOS_PACKAGE=$INCLUDEOS_PACKAGE -DINCLUDEOS_LIBC_PATH=${libc} -DINCLUDEOS_LIBCXX_PATH=${libcxx} -DINCLUDEOS_LIBCXXABI_PATH=${libcxxabi} -DINCLUDEOS_LIBUNWIND_PATH=${libunwind}
# This fails for some reason, due to missing libc includes, but works inside the shell;
# $ nix-shell --run "make -j12"
# make -j12
'';
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。