Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
This reverts commit 7fff567ee9. It depends
on the rustc update I reverted in #55379. It should be re-introduced
after that rustc update has gone through staging.
racer builds fine on Linux and macOS without racer as a dependency.
racer does not actually use rustup, but 'rustc --print sysroot', which
is already available through the rustc dependency.
The easy part is to add NIX_CFLAGS_COMPILE for "regular" libraries.
A bit more tricky is to add the required flags for libclang to find
libstdcxx. For this we parse arguments to bindgen to look for
-x c++ or -xc++ and if found add NIX_CXXSTDLIB_COMPILE to the arguments.
This variable is populated by a complex dance of setupHooks. We trigger
this by adding clang to propagatedBuildInputs. A more subtle way may
exist.
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/rust-bindgen/versions.
These checks were done:
- built on NixOS
- /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0/bin/bindgen passed the binary check.
- Warning: no invocation of /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0/bin/.bindgen-wrapped had a zero exit code or showed the expected version
- 1 of 2 passed binary check by having a zero exit code.
- 1 of 2 passed binary check by having the new version present in output.
- found 0.37.0 with grep in /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0
- directory tree listing: https://gist.github.com/dab90e1565932370211bc1cb47b526d9
- du listing: https://gist.github.com/1ea884a58cb25990e712703124f8a6da
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/rust-bindgen/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen -h’ got 0 exit code
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen --help’ got 0 exit code
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen -V’ and found version 0.36.1
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen --version’ and found version 0.36.1
- found 0.36.1 with grep in /nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1
- directory tree listing: https://gist.github.com/6731d17415819fe988768028fda0e150