Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
compatibility-settings.hh
1#pragma once
2#include "config.hh"
3
4namespace nix {
5struct CompatibilitySettings : public Config
6{
7
8 CompatibilitySettings() = default;
9
10 // Added in Nix 2.24, July 2024.
11 Setting<bool> nixShellAlwaysLooksForShellNix{this, true, "nix-shell-always-looks-for-shell-nix", R"(
12 Before Nix 2.24, [`nix-shell`](@docroot@/command-ref/nix-shell.md) would only look at `shell.nix` if it was in the working directory - when no file was specified.
13
14 Since Nix 2.24, `nix-shell` always looks for a `shell.nix`, whether that's in the working directory, or in a directory that was passed as an argument.
15
16 You may set this to `false` to temporarily revert to the behavior of Nix 2.23 and older.
17
18 Using this setting is not recommended.
19 It will be deprecated and removed.
20 )"};
21
22 // Added in Nix 2.24, July 2024.
23 Setting<bool> nixShellShebangArgumentsRelativeToScript{
24 this, true, "nix-shell-shebang-arguments-relative-to-script", R"(
25 Before Nix 2.24, relative file path expressions in arguments in a `nix-shell` shebang were resolved relative to the working directory.
26
27 Since Nix 2.24, `nix-shell` resolves these paths in a manner that is relative to the [base directory](@docroot@/glossary.md#gloss-base-directory), defined as the script's directory.
28
29 You may set this to `false` to temporarily revert to the behavior of Nix 2.23 and older.
30
31 Using this setting is not recommended.
32 It will be deprecated and removed.
33 )"};
34};
35
36};
Definition config.hh:320