diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-11-18 12:58:47 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-11-18 12:58:47 +0900 |
| commit | 748a0ae2c87f43e0b3622ded4a347f2fab08e1c5 (patch) | |
| tree | 235def886007fdddc7a30f3c1e741e99de70e671 /package.nix | |
| parent | 8f3f0c7bbf18e1eca2db31bf81f6c4d6457ae921 (diff) | |
nix: wrap program from libexec
This avoids renaming the fortify binary.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'package.nix')
| -rw-r--r-- | package.nix | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/package.nix b/package.nix index d510c649..0c1b7c17 100644 --- a/package.nix +++ b/package.nix @@ -29,7 +29,7 @@ buildGoModule rec { "-s" "-w" "-X" - "main.Fmain=${placeholder "out"}/bin/.fortify-wrapped" + "main.Fmain=${placeholder "out"}/libexec/fortify" "-X" "main.Fshim=${placeholder "out"}/libexec/fshim" ] @@ -47,14 +47,15 @@ buildGoModule rec { nativeBuildInputs = [ makeBinaryWrapper ]; postInstall = '' - wrapProgram $out/bin/${pname} --prefix PATH : ${ - lib.makeBinPath [ - bubblewrap - xdg-dbus-proxy - ] - } + mkdir "$out/libexec" + mv "$out"/bin/* "$out/libexec/" - mkdir $out/libexec - (cd $out/bin && mv fsu fshim finit fuserdb ../libexec/) + makeBinaryWrapper "$out/libexec/fortify" "$out/bin/fortify" \ + --inherit-argv0 --prefix PATH : ${ + lib.makeBinPath [ + bubblewrap + xdg-dbus-proxy + ] + } ''; } |
