cachix / install-nix-action

Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.
Apache License 2.0
526 stars 80 forks source link

The Path in nix-shell is not correct #80

Closed yanganto closed 3 years ago

yanganto commented 3 years ago

Hi there,

Thanks for providing this, I have used this action with shell.nix in several projects.

Recently, I ran into a problem, which only happens on the install-nix-action environment but not on NixOS.

Here is an example repo shows this problem.

The shell.nix exports LIBCLANG_PATH = "${nixpkgs.clang}/lib";

And the CI will run a script to check out the LIBCLANG_PATH is correct or not.

The CI result shows this. (at line 139 of Build Documentation)

Export from shell
/nix/store/4x92wsm6f18mxrrqb5pxl81swlm9mbpf-clang-10.0.1/lib
Find in store
/nix/store/rvrqaq93gwpk95b79zacf0p7za8q33i6-clang-10.0.1-lib/lib/libclang.so.10
/nix/store/rvrqaq93gwpk95b79zacf0p7za8q33i6-clang-10.0.1-lib/lib/libclang.so

However the shell.nix are also used in NixOS, the hash will be correct. The env-script is a script defined in shell.nix, which just prints the LIBCLANG_PATH and searches the real path for the lib.

If there is something I can help to debug on this, please kindly tell me.

Many thanks.

yanganto commented 3 years ago

I find out this is not an issue for install-nix-action. Sorry about this.