@@ -38,53 +38,52 @@ with lib;
3838 config = {
3939 devshell . packages =
4040 if cfg . enableDefaultToolchain then ( map ( tool : cfg . packageSet . ${ tool } ) cfg . tools ) else [ ] ;
41- env =
42- [
43- {
44- # On darwin for example enables finding of libiconv
45- name = "LIBRARY_PATH" ;
46- # append in case it needs to be modified
47- eval = "$DEVSHELL_DIR/lib" ;
48- }
49- {
50- # some *-sys crates require additional includes
51- name = "CFLAGS" ;
52- # append in case it needs to be modified
53- eval = "\" -I $DEVSHELL_DIR/include ${ lib . optionalString pkgs . stdenv . isDarwin "-iframework $DEVSHELL_DIR/Library/Frameworks" } \" " ;
54- }
55- ]
56- ++ lib . optionals pkgs . stdenv . isDarwin [
57- {
58- # On darwin for example required for some *-sys crate compilation
59- name = "RUSTFLAGS" ;
60- # append in case it needs to be modified
61- eval = "\" -L framework=$DEVSHELL_DIR/Library/Frameworks\" " ;
62- }
63- {
64- # rustdoc uses a different set of flags
65- name = "RUSTDOCFLAGS" ;
66- # append in case it needs to be modified
67- eval = "\" -L framework=$DEVSHELL_DIR/Library/Frameworks\" " ;
68- }
69- {
70- name = "PATH" ;
71- prefix =
72- let
73- inherit ( pkgs ) xcbuild ;
74- in
75- lib . makeBinPath [
76- xcbuild
77- "${ xcbuild } /Toolchains/XcodeDefault.xctoolchain"
78- ] ;
79- }
80- ]
81- # fenix provides '.rust-src' in the 'complete' toolchain configuration
82- ++ lib . optionals ( cfg . enableDefaultToolchain && cfg . packageSet ? rust-src ) [
83- {
84- # rust-analyzer may use this to quicker find the rust source
85- name = "RUST_SRC_PATH" ;
86- value = "${ cfg . packageSet . rust-src } /lib/rustlib/src/rust/library" ;
87- }
88- ] ;
41+ env = [
42+ {
43+ # On darwin for example enables finding of libiconv
44+ name = "LIBRARY_PATH" ;
45+ # append in case it needs to be modified
46+ eval = "$DEVSHELL_DIR/lib" ;
47+ }
48+ {
49+ # some *-sys crates require additional includes
50+ name = "CFLAGS" ;
51+ # append in case it needs to be modified
52+ eval = "\" -I $DEVSHELL_DIR/include ${ lib . optionalString pkgs . stdenv . isDarwin "-iframework $DEVSHELL_DIR/Library/Frameworks" } \" " ;
53+ }
54+ ]
55+ ++ lib . optionals pkgs . stdenv . isDarwin [
56+ {
57+ # On darwin for example required for some *-sys crate compilation
58+ name = "RUSTFLAGS" ;
59+ # append in case it needs to be modified
60+ eval = "\" -L framework=$DEVSHELL_DIR/Library/Frameworks\" " ;
61+ }
62+ {
63+ # rustdoc uses a different set of flags
64+ name = "RUSTDOCFLAGS" ;
65+ # append in case it needs to be modified
66+ eval = "\" -L framework=$DEVSHELL_DIR/Library/Frameworks\" " ;
67+ }
68+ {
69+ name = "PATH" ;
70+ prefix =
71+ let
72+ inherit ( pkgs ) xcbuild ;
73+ in
74+ lib . makeBinPath [
75+ xcbuild
76+ "${ xcbuild } /Toolchains/XcodeDefault.xctoolchain"
77+ ] ;
78+ }
79+ ]
80+ # fenix provides '.rust-src' in the 'complete' toolchain configuration
81+ ++ lib . optionals ( cfg . enableDefaultToolchain && cfg . packageSet ? rust-src ) [
82+ {
83+ # rust-analyzer may use this to quicker find the rust source
84+ name = "RUST_SRC_PATH" ;
85+ value = "${ cfg . packageSet . rust-src } /lib/rustlib/src/rust/library" ;
86+ }
87+ ] ;
8988 } ;
9089}
0 commit comments