[<<][nixos][>>][..]
Sat Nov 16 09:02:17 EST 2019

trying to build erlang extensions in nix-shell

Problem:

make: Entering directory '/home/tom/exo/erl/_build/default/lib/efuse/c_src'
gcc efuse.o  -lerl_interface -lei -pthread -lnsl -lfuse -lrt -ldl -o efuse
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: cannot find -lerl_interface
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: cannot find -lei

Which is here:

tom@panda:/nix/store/6wf8diszg2v6qjhgdb89v3xv5xfwqaij-erlang-19.3.6.11$ find -name '*erl_interface*'
./lib/erlang/usr/lib/liberl_interface.a
...


The problem here is that erlang-efuse's c_src/Makefile calls gcc
directly.  So it makes more sense to add a wrapper script that adds
the proper -L function.

Instead of a script, use a shell function, so it can just be included
inside the .nix wrapper.

gcc is probably already a shell function.
No.

so I'm missing a fundamental piece of insight: how do you influence
the shell environment apart from just setting variables?

shellHook




[Reply][About]
[<<][nixos][>>][..]