Hi all-
I’d like to run Intuit’s auto tool on NixOS. The standard way to run it is to install it as part of a Node project’s dependencies using yarn
et al., but their recommended way to run it outside of that context is to download a binary from a GitHub release, make that file executable, and run it (as detailed in the documentation). Needless to say, this does not work out of the box on NixOS–running the executable gives me no such file or directory: ./auto
(which I understand to be an error about not being able to find the linker).
Even though it seems to be a missing linker, I still tried a few things. Running ldd
on the downloaded auto
gives me:
linux-vdso.so.1 (0x00007ffc98a7e000)
libdl.so.2 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/libdl.so.2 (0x00007f3c63856000)
librt.so.1 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/librt.so.1 (0x00007f3c6384b000)
libstdc++.so.6 => not found
libm.so.6 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/libm.so.6 (0x00007f3c63708000)
libgcc_s.so.1 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/libgcc_s.so.1 (0x00007f3c636ee000)
libpthread.so.0 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/libpthread.so.0 (0x00007f3c636cd000)
libc.so.6 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/libc.so.6 (0x00007f3c6350a000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib64/ld-linux-x86-64.so.2 (0x00007f3c6385d000)
To fill in that not found
I thought I’d be sneaky and use LD_LIBRARY_PATH
to provide a random libstdc++.so.6
to auto
, but of course this doesn’t work either. I get the same not found error.
Finally, I used the following shell.nix
file to provide libstdc++
the right way:
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "foobar";
src = null;
buildInputs = [
stdenv.cc.cc
];
shellHook = ''
export LD_LIBRARY_PATH=${lib.makeLibraryPath [stdenv.cc.cc]}
'';
}
but this gives me the same not found error.
Can you help me understand how to run this on NixOS properly? Thanks in advance!
roni