Packaging/Binaries: Difference between revisions

imported>Aidalgol
Using AutoPatchelfHook: Add mention of addAutoPatchelfSearchPath
imported>Coreyoconnor
add an example failure for search visibility
Line 1: Line 1:
Downloading and attempting to run a binary on NixOS will almost never work. This is due to hard-coded paths in the executable. Unfortunately, almost all unfree and proprietary software comes in binary form - the main reason to include binaries is because no source code is available.
Downloading and attempting to run a binary on NixOS will almost never work. This is due to hard-coded paths in the executable. Unfortunately, almost all unfree and proprietary software comes in binary form - the main reason to include binaries is because no source code is available.
This tutorial will guide you through packaging a binary executable.
This tutorial will guide you through packaging a binary executable.
If a downloaded binary is not packaged for NixOS will result in failures like the following:
<syntaxHighlight lang=bash>
$ ~/.local/share/nvim/mason/packages/rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu  --help
bash: /home/gdforj/.local/share/nvim/mason/packages/rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu: cannot execute: required file not found
</syntaxHighlight>
Which indicates the interpreter, [[#The Dynamic Loader|the dynamic loader]] in this case, could not be located.


== Using AutoPatchelfHook ==
== Using AutoPatchelfHook ==