-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
I'm planning to use nix as a package manager for my development toolchain, but not do the actual development in nix, is that a supported use case?
I've hit some issues and have been sending in PRs to resolve them, but looking into it more the issues I've been hitting might have been derivations just working as intended.
https://nixos.wiki/wiki/FAQ/I_installed_a_library_but_my_compiler_is_not_finding_it._Why%3F explains that library derivations in Nix only work when used in a nix environment, be it nix-shell or within nixpkgs.
Is the same true for all development derivations, for example compilers and build tools?
Examples:
- clang++ doesn't work outside of nix-shell on darwin, but it does on linux, and I'm not sure which of the two is correct (stdenv.cc: use libc++ as default c++ standard library on darwin #41589).
- wrapCC creates compiler wrappers to handle the way flags from dependencies are propagated in nixpkgs, but those wrappers are unnecessary when using the compilers from profiles.
- in the bazel derivation
bin/bazelis a script that wraps bazel to make it use clang and java from nix, instead of resolving it from the caller'sPATH, so that it can be used from within nixpkgs, but it results in a bazel that doesn't function correctly when installed.
If existing development derivations are meant to be only used in a nix environment, would it be ok to add new derivations for use outside of a nix environment?