Eelco Dolstra
75837bb595
Respect NO_COLOR in Markdown output
2021-09-14 14:57:58 +02:00
Eelco Dolstra
7e4dd0e279
Merge pull request #5248 from edolstra/flake-clone
...
Fix 'nix flake clone' on github repos
2021-09-14 14:14:59 +02:00
Eelco Dolstra
01a4fa3b6e
Advise using --extra-experimental-features instead of --experimental-features
...
Fixes #3737 .
2021-09-14 13:56:36 +02:00
Eelco Dolstra
07996c4810
github fetcher: Don't use HEAD branch when cloning
...
Fixes #4394 .
2021-09-14 13:38:45 +02:00
Eelco Dolstra
d72d31d529
github fetcher: Use git+https for cloning
...
git+ssh only works if you have SSH access.
2021-09-14 13:38:05 +02:00
Eelco Dolstra
a4ae601b44
Merge pull request #5245 from edolstra/warnings
...
Change warning messages from yellow to magenta
2021-09-14 11:46:34 +02:00
Eelco Dolstra
16d4922dd2
Merge pull request #5240 from edolstra/builtin-help
...
nix --help: Display help using lowdown instead of man
2021-09-14 11:31:23 +02:00
Eelco Dolstra
58b5036c54
Change warnings from yellow to magenta
...
This matches gcc and clang.
2021-09-14 10:42:29 +02:00
Eelco Dolstra
4ffda0af7c
ANSI_YELLOW -> ANSI_WARNING
2021-09-14 10:42:29 +02:00
Eelco Dolstra
76e368a3b4
Fix macOS build
2021-09-14 10:07:31 +02:00
Eelco Dolstra
1ba993d07c
Fix clang warning
2021-09-14 08:15:33 +02:00
Eelco Dolstra
4ed66735b6
RunOptions: Use designated initializers
...
Also get rid of _killStderr because it wasn't actually checked
anywhere.
2021-09-13 23:31:04 +02:00
Eelco Dolstra
c3e9acd1c0
Remove tabs
2021-09-13 23:06:33 +02:00
kvtb
c6fa7775de
hashFile, hashString: realize context before calculation, and discard afterwards
2021-09-13 22:34:58 +02:00
Eelco Dolstra
49a932fb18
nix --help: Display help using lowdown instead of man
...
Fixes #4476 .
Fixes #5231 .
2021-09-13 14:45:21 +02:00
Eelco Dolstra
8796b1b5e3
Fix markdown error
2021-09-13 14:44:53 +02:00
Eelco Dolstra
eadb45c4db
Use Bindings::{get,need} instead of find
2021-09-13 13:53:24 +02:00
Eelco Dolstra
a73be28717
renderMarkdownToTerminal(): Fix terminal width computation
2021-09-13 13:52:14 +02:00
Eelco Dolstra
ff09acd1f9
Remove tabs
2021-09-10 11:00:50 +02:00
Eelco Dolstra
02ece164be
Make installables const
2021-09-10 10:39:39 +02:00
Eelco Dolstra
1e43bc6dc0
Merge pull request #5224 from baloo/baloo/5089/force-nss_dns-load
...
preloadNSS: fixup nss_dns load
2021-09-09 10:37:41 +02:00
Arthur Gautier
3b72741f23
preloadNSS: load NSS before threads are started
...
preloadNSS is not thread-safe, this commit moves it before we start the
first thread.
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-09-08 18:29:31 +00:00
Eelco Dolstra
b71428c907
Merge branch 'fix-3976' of https://github.com/mkenigs/nix
2021-09-08 14:43:12 +02:00
Naïm Favier
7f0d177ce7
Add missing include in util.cc
2021-09-08 12:20:08 +02:00
Eelco Dolstra
9180239081
Merge pull request #5215 from ncfavier/patch-1
...
Fix use-registries logic in builtins.getFlake
2021-09-08 11:19:39 +02:00
Shea Levy
6678e98411
Merge pull request #4922 from nrdxp/default-submodules
...
libfetchers/git: fetch submodules by default
2021-09-07 05:48:23 -04:00
Arthur Gautier
0b42a0f781
preloadNSS: fixup nss_dns load
...
Before this commit, the dns lookup in preloadNSS would still go through
nscd. This did not have the effect of loading the nss_dns.so as expected
(nss_dns.so being out of reach from within the sandbox).
Should LOCALDOMAIN environment variable be defined, nss will completely
avoid nscd and will do its dns resolution on its own.
By temporarly setting LOCALDOMAIN variable before calling in NSS, we can
force NSS to load the shared libraries as expected.
Fixes #5089
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-09-06 23:13:48 +00:00
Naïm Favier
b0d4190f19
Fix use-registries logic in builtins.getFlake
2021-09-05 15:28:44 +02:00
Eelco Dolstra
90b2dd570c
Add FIXME
2021-09-02 15:00:52 +02:00
Georges Dubus
bc6e7ca046
Don't use read-only mode for nix build --dry-run
...
In dry run mode, new derivations can't be create, so running the command on anything that has not been evaluated before results in an error message of the form `don't know how to build these paths (may be caused by read-only store access)`.
For comparison, the classical `nix-build --dry-run` doesn't use read-only mode.
Closes #1795
(cherry picked from commit 54525682df707742e58311c32e9c9cb18de1e31f)
2021-09-02 14:50:19 +02:00
Eelco Dolstra
b2e8120d25
parseInstallables(): Parse store paths as store paths
...
If the store path contains a flake, this means that a command like
"nix path-info /path" will show info about /path, not about the
default output of the flake in /path. If you want the latter, you can
explicitly ask for it by doing "nix path-info path:/path".
Fixes #4568 .
2021-09-02 14:18:04 +02:00
Eelco Dolstra
77ca5e951c
Merge pull request #5203 from NixOS/fix-invalid-lockfile-names
...
Don’t create lockfiles with an invalid path name
2021-09-02 11:03:18 +02:00
Lucas Hoffmann
d948415b71
Docs: Fix syntax error in json example in man page
2021-09-02 10:47:38 +02:00
regnat
497225b07d
Don’t create lockfiles with an invalid path name
...
Store paths are only allowed to contain a limited subset of the
alphabet, which doesn’t include `!`. So don’t create lockfiles that
contain this `!` character as that would otherwise confuse (and break)
the gc.
Fix #5176
2021-09-02 09:57:41 +02:00
Eelco Dolstra
f73d911628
Style
2021-09-01 21:46:25 +02:00
Eelco Dolstra
2cb7a502a4
Merge branch 'short-circuit-subst' of https://github.com/Kha/nix
2021-09-01 21:45:04 +02:00
Eelco Dolstra
7ee639f9db
Merge pull request #5066 from Radvendii/master
...
add antiquotations to paths
2021-09-01 12:55:04 +02:00
Taeer Bar-Yam
1ffb9f1970
fix parse of /${foo}
. was // + foo
...
I don't think this changes the way any program would behave, but it's a
cleaner internal representation.
2021-08-31 15:55:55 -04:00
Taeer Bar-Yam
9da8f5e25d
path antiquotations: canonizePath -> canonicalizePath
2021-08-31 08:02:04 -04:00
Eelco Dolstra
f3b8b4040e
Merge pull request #5071 from NixOS/dont-send-xp-features-to-the-daemon
...
Don’t send the experimental-features to the daemon
2021-08-31 11:55:39 +02:00
Eelco Dolstra
50a35860ee
TarArchive: Small refactoring
2021-08-30 17:02:51 +02:00
Eelco Dolstra
c7a7652725
Don't segfault if archive_entry_pathname() returns null
...
Issues #4499 .
2021-08-30 17:02:39 +02:00
Eelco Dolstra
eda0fee160
Merge pull request #5175 from Pamplemousse/make
...
Don't overwrite user provided `lib*_LDFLAGS`
2021-08-30 12:44:29 +02:00
Eelco Dolstra
323cafcb4e
Merge pull request #5191 from hercules-ci/evalstate-lifetime-hygiene
...
EvalState lifetime hygiene
2021-08-30 12:23:09 +02:00
regnat
b2bce915ad
Don’t accept experimental features from the client
...
If the client sends an “experimental features” setting, just ignore it
2021-08-30 10:48:05 +02:00
Robert Hensing
92778a5f80
Tidy
2021-08-30 09:52:43 +02:00
Robert Hensing
8656b130ea
Fix use after free with vImportedDrvToDerivation
2021-08-29 20:42:57 +02:00
Robert Hensing
8bc76acc7c
Move vCallFlake into EvalState
...
This fixes a use-after-free bug:
1. s = new EvalState();
2. callFlake()
3. static vCallFlake now references s
4. delete s;
5. s2 = new EvalState();
6. callFlake()
7. static vCallFlake still references s
8. crash
Nix 2.3 did not have a problem with recreating EvalState.
2021-08-29 20:42:49 +02:00
Robert Hensing
f10465774f
Force all Pos* to be non-null
...
This fixes a class of crashes and introduces ptr<T> to make the
code robust against this failure mode going forward.
Thanks regnat for the idea of a ref<T> without overhead!
Closes #4895
Closes #4893
Closes #5127
Closes #5113
2021-08-29 18:11:58 +02:00
Pamplemousse
a4c6d319a8
Don't overwrite user provided lib*_LDFLAGS
...
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-25 08:59:19 -07:00