Development environment with nix-shell: Difference between revisions

direnv: Move elsewhere.
Link to relevant Nixcademy article
 
(4 intermediate revisions by 3 users not shown)
Line 22: Line 22:
       hello
       hello
     ];
     ];
     # compilers & linkers & dependecy finding programs
     # compilers & linkers & dependency finding programs
     nativeBuildInputs = [
     nativeBuildInputs = [
       rustc
       rustc
Line 82: Line 82:
we replace <code>nix-shell</code> with <code>nix develop</code>
we replace <code>nix-shell</code> with <code>nix develop</code>


Example: Building Nix in a development shell, to get [[Incremental builds]] = faster recompiles
Example: Building Nix in a development shell, to get [[Incremental builds]] = faster recompiles. This is because Nix evaluations are cached.


<pre>
<pre>
Line 209: Line 209:
Similar to the Gsettings issue, icons can be added with XDG_DATA_DIRS:
Similar to the Gsettings issue, icons can be added with XDG_DATA_DIRS:
<pre> XDG_DATA_DIRS=...:${hicolor-icon-theme}/share:${gnome3.adwaita-icon-theme}/share</pre>
<pre> XDG_DATA_DIRS=...:${hicolor-icon-theme}/share:${gnome3.adwaita-icon-theme}/share</pre>
== See Also ==
* [[Direnv]]
* [[Command Shell#Using a different shell in nix-shell and nix develop]]
* [https://nixcademy.com/posts/cpp-with-nix-in-2023-part-1-shell/ C++ with Nix in 2023, Part 1: Developer Shells, Nixcademy]
[[Category:Development]]
[[Category:Development]]
[[Category:nix]]
[[Category:nix]]