9 votes

Topic deleted by author

1 comment

  1. noneucat
    (edited )
    Link
    Nice and concise guide! The reason that the Nightly binary will not run directly on NixOS is due to the fact that all NixPkgs binaries are hardcoded with a specific dynamic linker (as there can be...

    Nice and concise guide!

    The reason that the Nightly binary will not run directly on NixOS is due to the fact that all NixPkgs binaries are hardcoded with a specific dynamic linker (as there can be multiple versions of glibc for different programs). Programs that expect the environment to provide a loader (say, at /lib64/ld-linux-x86-64.so.2) will fail out:

    $ ./firefox
    sh: ./firefox: No such file or directory
    

    The differences in the binaries:

    $ # Firefox Nightly from mozilla.org
    $ ldd ./firefox  
            ...
            /lib64/ld-linux-x86-64.so.2 => ...
    
    $ # NixPkgs Firefox
    $ ldd /nix/store/ ... firefox-unwrapped-72.0.2/bin/.firefox-wrapped  
            ...
            /nix/store/ ... glibc-2.27/lib/ld-linux-x86-64.so.2 => ...
    

    Solutions:

    • patch the binary with the library paths yourself (maybe with autopatchelf)
    • run the application in a FHS environment (maybe with steam-run)
    • use a Nix overlay to acquire the appropriate package (this solution)
    • compile it yourself
    5 votes