cmd: shim and init into separate binaries
All checks were successful
test / test (push) Successful in 19s
All checks were successful
test / test (push) Successful in 19s
This change also fixes a deadlock when shim fails to connect and complete the setup. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
31
package.nix
31
package.nix
@@ -15,14 +15,27 @@ buildGoModule rec {
|
||||
src = ./.;
|
||||
vendorHash = null;
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X"
|
||||
"main.Version=v${version}"
|
||||
"-X"
|
||||
"main.FortifyPath=${placeholder "out"}/bin/.fortify-wrapped"
|
||||
];
|
||||
ldflags =
|
||||
lib.attrsets.foldlAttrs
|
||||
(
|
||||
ldflags: name: value:
|
||||
ldflags
|
||||
++ [
|
||||
"-X"
|
||||
"git.ophivana.moe/security/fortify/internal.${name}=${value}"
|
||||
]
|
||||
)
|
||||
[
|
||||
"-s"
|
||||
"-w"
|
||||
]
|
||||
{
|
||||
Version = "v${version}";
|
||||
Fmain = "${placeholder "out"}/bin/.fortify-wrapped";
|
||||
Fsu = "/run/wrappers/bin/fsu";
|
||||
Fshim = "${placeholder "out"}/bin/.fshim";
|
||||
Finit = "${placeholder "out"}/bin/.finit";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
acl
|
||||
@@ -40,5 +53,7 @@ buildGoModule rec {
|
||||
}
|
||||
|
||||
mv $out/bin/fsu $out/bin/.fsu
|
||||
mv $out/bin/fshim $out/bin/.fshim
|
||||
mv $out/bin/finit $out/bin/.finit
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user