minimal-bootstrap.mes: inline config.h

This commit is contained in:
Emily Trau 2023-04-30 10:56:53 +10:00
parent 8ef86405b6
commit 8950041e2b
2 changed files with 6 additions and 4 deletions

View file

@ -1,2 +0,0 @@
#undef SYSTEM_LIBC
#define MES_VERSION "@VERSION@"

View file

@ -27,6 +27,11 @@ let
url = "mirror://savannah/nyacc/nyacc-${nyaccVersion}.tar.gz";
sha256 = "065ksalfllbdrzl12dz9d9dcxrv97wqxblslngsc6kajvnvlyvpk";
}) + "/nyacc-${nyaccVersion}";
config_h = builtins.toFile "config.h" ''
#undef SYSTEM_LIBC
#define MES_VERSION "${version}"
'';
in
(runCommand "mes-${version}" {
pname = "mes";
@ -50,8 +55,7 @@ in
cd ''${MES_PREFIX}
cp ${./config.h} include/mes/config.h
replace --file include/mes/config.h --output include/mes/config.h --match-on @VERSION@ --replace-with ${version}
cp ${config_h} include/mes/config.h
mkdir include/arch
cp include/linux/x86/syscall.h include/arch/syscall.h