try to reduce closure

This commit is contained in:
catvayor 2024-10-06 23:27:48 +02:00
parent 9da241d8ec
commit 30167b8456
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
2 changed files with 33 additions and 1 deletions

View file

@ -103,7 +103,6 @@ in
Before = [ "default.target" ];
};
script = ''
#!/bin/ash
# . /etc/profile
exec /bin/ash < /dev/ttyS0 > /dev/ttyS0 2> /dev/ttyS0
'';

View file

@ -335,8 +335,27 @@ extraPkgs // {
};
}) { };
writeShellScriptBin = name: text:
final.writeTextFile {
inherit name;
executable = true;
destination = "/bin/${name}";
text = ''
#!${final.busybox}/bin/ash
${text}
'';
checkPhase = ''
${final.stdenv.shellDryRun} "$target"
'';
meta.mainProgram = name;
};
systemd =
let base = prev.systemd.override {
kbd = "";
bash = null;
bashInteractive = "";
withAcl = false;
withAnalyze = false;
withApparmor = false;
@ -389,6 +408,17 @@ extraPkgs // {
# "--optimization=s"
"--default-library=static"
"--buildtype=minsize"
# (final.lib.mesonBool "static-libsystemd" true)
# (final.lib.mesonBool "standalone-binaries" true)
# (final.lib.mesonBool "link-udev-shared" false)
# (final.lib.mesonBool "link-executor-shared" false)
# (final.lib.mesonBool "link-systemctl-shared" false)
# (final.lib.mesonBool "link-networkd-shared" false)
# (final.lib.mesonBool "link-timesyncd-shared" false)
# (final.lib.mesonBool "link-journalctl-shared" false)
# (final.lib.mesonBool "link-boot-shared" false)
# (final.lib.mesonBool "link-portabled-shared" false)
];
postInstall = o.postInstall + ''
rm -rf $out/share
@ -438,6 +468,9 @@ extraPkgs // {
rm $out/bin/systemd-sysext
rm $out/bin/systemd-tty-ask-password-agent
rm $out/bin/systemd-vpick
# rm $out/lib/libsystemd.a
# rm $out/lib/systemd/libsystemd-shared-256.so
'';
});