Commit graph

1394 commits

Author SHA1 Message Date
Eelco Dolstra
72dffd6c6c Connect AbstractPos with Pos 2022-07-05 20:45:29 +02:00
Eelco Dolstra
0d14ffbcba Merge remote-tracking branch 'origin/master' into lazy-trees 2022-06-28 16:29:42 +02:00
Eelco Dolstra
49c4a37efc
Merge pull request #6717 from edolstra/move-flake-registry
Fetch flake-registry.json from channels.nixos.org
2022-06-25 21:17:57 +02:00
Théophane Hufschmitt
f06b6fa4fa
Merge pull request #6698 from tweag/forbid-tilde-paths-in-pure-mode
Forbid the tilde expansion in pure eval mode
2022-06-24 10:02:40 +02:00
Eelco Dolstra
4b6cc3da62 Fetch flake-registry.json from channels.nixos.org
Using fastly is slightly faster, provides some resilience due to a
high stale TTL, and allows some usage metrics.
2022-06-23 23:56:26 +02:00
Eelco Dolstra
f959ce3e03 Merge remote-tracking branch 'origin/master' into lazy-trees 2022-06-23 17:24:44 +02:00
Eelco Dolstra
8bbbb6e737 Enable/fix tests in nix-static
pkgsStatic is apparently considered a cross environment, so checkPhase
and installCheckPhase are disabled even when we ask for them.
2022-06-22 23:33:15 +02:00
Théophane Hufschmitt
983efdbde4 Forbid the tilde expansion in pure eval mode
Fix #6684
2022-06-21 14:08:18 +02:00
Fishhh
df21173b70
Add another test for --exclude in nix search 2022-06-20 19:21:45 +02:00
Eelco Dolstra
fd51cdcdd7
Merge remote-tracking branch 'origin/master' into lazy-trees 2022-06-17 13:39:03 +02:00
Eelco Dolstra
798efdf10b
Merge pull request #6027 from Ma27/pure-repl
repl: `--option pure-eval true` actually enables pure eval mode
2022-06-13 16:11:46 +02:00
Gabriel Fontes
9f6b4639c2
fix sourcehut brach/tag resolving regression
nixos/nix#6290 introduced a regex pattern to account for tags when
resolving sourcehut refs. nixos/nix#4638 reafactored the code,
accidentally treating the pattern as a regular string, causing all
non-HEAD ref resolving to break.

This fixes the regression and adds more test cases to avoid future
breakage.
2022-06-11 16:52:20 -03:00
Eelco Dolstra
dbe7fcebff
Merge remote-tracking branch 'origin/master' into lazy-trees 2022-06-09 21:27:16 +02:00
Eelco Dolstra
b2dea231cf
Merge pull request #6618 from afishhh/search-exclude
Add `-e`/`--exclude` flag to `nix search`
2022-06-07 19:01:36 +02:00
Fishhh
9ae22b1fde
Use grep -c instead of grep|wc -l in some nix search tests 2022-06-07 18:25:59 +02:00
Fishhh
0338cf5539
Add tests for --exclude flag in nix search 2022-06-07 18:25:52 +02:00
Eelco Dolstra
8977cdee6a
Merge pull request #6598 from cole-h/update-flake-for-real
flake: update to 22.05
2022-06-07 15:13:16 +02:00
Eelco Dolstra
0f8754cd30
Fix 22.05 eval warnings 2022-06-07 14:27:10 +02:00
Eelco Dolstra
24b3a500a7
Typo 2022-06-02 21:21:10 +02:00
Eelco Dolstra
2868acb4a5
tests/flakes.sh: Fix some ignored breakage 2022-06-02 21:19:16 +02:00
Eelco Dolstra
a1516f6120
tests/flakes.sh: Fix some ignored breakage 2022-06-02 17:05:32 +02:00
Eelco Dolstra
e7c42e55e9
Fetch non-flake inputs using lazyFetch() 2022-06-02 16:26:00 +02:00
Eelco Dolstra
8a0a55fe12
Fix subflake handling
Relative 'path:' flake inputs now use the containing flake's
InputAccessor. This has the following implications:

* They're no longer locked in the lock file.

* They don't cause an additional copy to the store.

* They can reference the containing directory (i.e. a subflake can
  have an input '../foo', so long as it doesn't go outside the
  top-level containing flake).

Note: this is not a complete fix for subflake handling, since the lock
file currently makes it ambiguous what the containing flake is. We'll
probably need to add another field to the lock file for that.

Fixes #6352.
2022-06-02 13:48:55 +02:00
Eelco Dolstra
04d5417755
More rename mutable/immutable -> unlocked/locked 2022-06-01 11:39:28 +02:00
Maximilian Bosch
159b5815b5
repl: --option pure-eval true actually enables pure eval mode
To quote Eelco in #5867:

> Unfortunately we can't do
>
>     evalSettings.pureEval.setDefault(false);
>
> because then we have to do the same in main.cc (where
> pureEval is set to true), and that would allow pure-eval
> to be disabled globally from nix.conf.

Instead, a command should specify that it should be impure by
default. Then, `evalSettings.pureEval` will be set to `false;` unless
it's overridden by e.g. a CLI flag.

In that case it's IMHO OK to be (theoretically) able to override
`pure-eval` via `nix.conf` because it doesn't have an effect on commands
where `forceImpureByDefault` returns `false` (i.e. everything where pure
eval actually matters).

Closes #5867
2022-05-31 22:20:11 +02:00
Cole Helbling
dbf0d3a150 tests/nss-preload: move nix-fetch binding 2022-05-31 12:14:34 -07:00
Eelco Dolstra
4bc65d45d6
Typo 2022-05-31 15:32:46 +02:00
Eelco Dolstra
dfbb9a997f
Merge remote-tracking branch 'origin/master' into lazy-trees 2022-05-26 14:11:46 +02:00
Eelco Dolstra
27ebb97d0a
Handle EOFs in string literals correctly
We can't return a STR token without setting a valid StringToken,
otherwise the parser will crash.

Fixes #6562.
2022-05-25 17:58:13 +02:00
Eelco Dolstra
e6cf987201
GitInputScheme::lazyFetch(): Return rev/revCount/ref/lastModified 2022-05-20 15:47:33 +02:00
Tony Olagbaiye
5b8c1deb18 fetchTree: Allow fetching plain files
Add a new `file` fetcher type, which will fetch a plain file over
http(s), or from the local file.

Because plain `http(s)://` or `file://` urls can already correspond to
`tarball` inputs (if the path ends-up with a know archive extension),
the URL parsing logic is a bit convuluted in that:

- {http,https,file}:// urls will be interpreted as either a tarball or a
  file input, depending on the extensions of the path part (so
  `https://foo.com/bar` will be a `file` input and
  `https://foo.com/bar.tar.gz` as a `tarball` input)
- `file+{something}://` urls will be interpreted as `file` urls (with
  the `file+` part removed)
- `tarball+{something}://` urls will be interpreted as `tarball` urls (with
  the `tarball+` part removed)

Fix #3785

Co-Authored-By: Tony Olagbaiye <me@fron.io>
2022-05-19 18:24:49 +02:00
Eelco Dolstra
885a09c3fa
Disable some tests 2022-05-19 13:22:13 +02:00
Eelco Dolstra
3cc9dc38f3
Re-enable a test 2022-05-19 00:13:12 +02:00
Eelco Dolstra
df713a5d25
Detect symlink cycles 2022-05-18 23:09:12 +02:00
Théophane Hufschmitt
78dc64ec1e
Merge pull request #6544 from ncfavier/getFlake-no-write-lock-file
Do not attempt to write a lock file in builtins.getFlake
2022-05-18 16:41:13 +02:00
Naïm Favier
169384abb2
Do not attempt to write a lock file in builtins.getFlake
Fixes https://github.com/NixOS/nix/issues/6541
2022-05-18 15:45:06 +02:00
Eli Kogan-Wang
be2b19041e Integrate review changes 2022-05-13 22:02:28 +02:00
Eli Kogan-Wang
aefc6c4f41 Add priority for nix profile install 2022-05-11 12:16:35 +02:00
Eelco Dolstra
30ca717558 Merge remote-tracking branch 'origin/master' into lazy-trees 2022-05-09 11:26:39 +02:00
Eelco Dolstra
f4102de84b
Merge pull request #6489 from alexshpilkin/fix-6488
nix: Add forgotten null check in AttrCursor::getListOfStrings()
2022-05-05 16:16:56 +02:00
Théophane Hufschmitt
4c5aa8520c Make sure that nix build works in --impure mode
Regression test for <https://github.com/NixOS/nix/issues/6488>
2022-05-05 14:53:59 +02:00
thkoch2001
7388cd55bf Change json example to be original
Closes: #3391
2022-05-05 12:39:23 +03:00
Eelco Dolstra
a3c6c5b1c7 nix profile: Support overriding outputs 2022-05-03 15:00:34 +02:00
Eelco Dolstra
4a79cba511 Allow selecting derivation outputs using 'installable!outputs'
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
2022-05-03 13:43:52 +02:00
Eelco Dolstra
404c222444
Merge pull request #6426 from edolstra/respect-outputs-to-install
nix: Respect meta.outputsToInstall, and use all outputs by default
2022-05-03 13:43:22 +02:00
Théophane Hufschmitt
cae7473884
Merge pull request #6465 from layus/fix-test-crashes
tests: Distinguish crashes from expected failures
2022-05-03 11:11:37 +02:00
Guillaume Maudoux
275f8561eb tests/lang: Distinguish crashes from expected failures 2022-05-02 15:12:50 +02:00
Guillaume Maudoux
4845886bed Revert "tests: Distinguish crashes from expected failures"
This reverts commit 143b73f52d.
2022-05-02 14:22:00 +02:00
Eelco Dolstra
a26be9f3b8
Merge pull request #4638 from orbekk/read_head
Resolve reference for remote git repositories (makes fetchGit work with non-'master' branch)
2022-05-02 13:31:30 +02:00
Eelco Dolstra
dde71899dd tests: Don't create tests/result
https://hydra.nixos.org/log/lns780srkka4dv7r69mn4zfy6fdij4yr-nix-2.9.0pre20220428_4bb111c.drv
2022-05-02 09:38:51 +02:00