summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/host-config.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/host-config.nix b/doc/host-config.nix
new file mode 100644
index 0000000..340598e
--- /dev/null
+++ b/doc/host-config.nix
@@ -0,0 +1,30 @@
+{ stdenv
+, jo
+, coreutils
+, gnused
+, glibc
+}:
+
+stdenv.mkDerivation rec {
+ name = "host-config";
+
+ unpackPhase=''true'';
+
+ nativeBuildInputs = [ glibc jo coreutils gnused ];
+
+ buildPhase = ''
+ jo OS=linux \
+ ARCH=$(uname -m | sed 's/aarch64/arm64/' ) \
+ TOOLCHAIN_CONFIG=$(jo \
+ HOST_SYSTEM_HDR_DIR=${glibc.dev}/include \
+ HOST_SYSTEM_LIB_DIR=${glibc}/lib \
+ HOST_DYNAMIC_LINKER=$(ls ${glibc}/lib/ld-linux-*.so*) \
+ ) > host-config.json
+ '';
+
+ installPhase = ''
+ mkdir -p $out/share
+ cp host-config.json $out/share
+ '';
+
+}