Ophestra Umiker
cfd05b10f1
This will be the final release before major command line interface changes. This version is tagged as it contains many fixes that still impacts the permissive defaults usage pattern. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
makeBinaryWrapper,
|
|
xdg-dbus-proxy,
|
|
bubblewrap,
|
|
acl,
|
|
xorg,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "fortify";
|
|
version = "0.0.11";
|
|
|
|
src = ./.;
|
|
vendorHash = null;
|
|
|
|
ldflags =
|
|
lib.attrsets.foldlAttrs
|
|
(
|
|
ldflags: name: value:
|
|
ldflags
|
|
++ [
|
|
"-X"
|
|
"git.ophivana.moe/security/fortify/internal.${name}=${value}"
|
|
]
|
|
)
|
|
[
|
|
"-s"
|
|
"-w"
|
|
"-X"
|
|
"main.Fmain=${placeholder "out"}/bin/.fortify-wrapped"
|
|
]
|
|
{
|
|
Version = "v${version}";
|
|
Fsu = "/run/wrappers/bin/fsu";
|
|
Fshim = "${placeholder "out"}/bin/.fshim";
|
|
Finit = "${placeholder "out"}/bin/.finit";
|
|
};
|
|
|
|
buildInputs = [
|
|
acl
|
|
xorg.libxcb
|
|
];
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/${pname} --prefix PATH : ${
|
|
lib.makeBinPath [
|
|
bubblewrap
|
|
xdg-dbus-proxy
|
|
]
|
|
}
|
|
|
|
mv $out/bin/fsu $out/bin/.fsu
|
|
mv $out/bin/fshim $out/bin/.fshim
|
|
mv $out/bin/finit $out/bin/.finit
|
|
'';
|
|
}
|