2024-09-04 17:03:21 +09:00
|
|
|
{
|
2024-09-09 04:37:12 +09:00
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
makeBinaryWrapper,
|
|
|
|
xdg-dbus-proxy,
|
2024-09-23 18:21:12 +09:00
|
|
|
bubblewrap,
|
2024-09-04 17:03:21 +09:00
|
|
|
acl,
|
|
|
|
xorg,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fortify";
|
2024-10-28 20:38:10 +09:00
|
|
|
version = "0.0.10";
|
2024-09-04 17:03:21 +09:00
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
vendorHash = null;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X"
|
|
|
|
"main.Version=v${version}"
|
2024-10-27 23:45:52 +09:00
|
|
|
"-X"
|
2024-10-28 18:52:23 +09:00
|
|
|
"main.FortifyPath=${placeholder "out"}/bin/.fortify-wrapped"
|
2024-09-04 17:03:21 +09:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
acl
|
|
|
|
xorg.libxcb
|
|
|
|
];
|
2024-09-09 04:37:12 +09:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2024-09-23 18:21:12 +09:00
|
|
|
wrapProgram $out/bin/${pname} --prefix PATH : ${
|
|
|
|
lib.makeBinPath [
|
|
|
|
bubblewrap
|
|
|
|
xdg-dbus-proxy
|
|
|
|
]
|
|
|
|
}
|
2024-10-27 23:45:52 +09:00
|
|
|
|
|
|
|
mv $out/bin/fsu $out/bin/.fsu
|
2024-09-09 04:37:12 +09:00
|
|
|
'';
|
2024-09-04 17:03:21 +09:00
|
|
|
}
|