Commit graph

18611 commits

Author SHA1 Message Date
John Ericson
6f3045c2a2 Remove unit tests from old build system
Now that we can run all tests with Meson, we want developers making code
changes to use it.

(Only the manual needs to be built with the build system, and that will
change shortly.)

This reverts commit b0bc2a97bf.
2024-08-14 16:38:00 -04:00
John Ericson
b8a09bd167
Merge pull request #11073 from obsidiansystems/meson-functional-tests
Meson functional tests
2024-08-14 15:33:36 -05:00
John Ericson
34fe2478a2 Build Functional tests with Meson
Co-Authored-By: Qyriad <qyriad@qyriad.me>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-14 15:35:40 -04:00
John Ericson
d434a54b6c
Merge pull request #11241 from bryanhonof/master
Fix a few shellcheck tests
2024-08-14 14:11:31 -05:00
John Ericson
66a6eac379
Merge pull request #11280 from NixOS/contributing-attribution
CONTRIBUTING.md: Add attribution and context rules
2024-08-14 14:09:52 -05:00
John Ericson
982adb151a
Merge pull request #11291 from obsidiansystems/coarse-version
Coarse versions for constituent packages
2024-08-14 12:18:11 -05:00
John Ericson
93f58150c9 Coarse versions for constituent packages
As discussed in our meeting, we should use a simplified version for the
libraries without the date or commit hash. This will make rebuilding a
lot faster in many cases.

Progress on #10379

Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2024-08-14 12:23:01 -04:00
Bryan Honof
cc9fe4dee7
Fix a few shellcheck tests
Ref nixos/nix#10795
2024-08-14 15:16:06 +02:00
bryango
612fc76020
doc/manual: fix misaligned icons in custom.css (#11296) 2024-08-14 14:27:12 +02:00
Noam Yorav-Raphael
77d84a8d8b /homeless-shelter -> /proc/homeless/shelter
This makes it so even root can't create $HOME, for example by running `mkdir -p $HOME/.cache/foo`.
2024-08-14 14:35:42 +03:00
Robert Hensing
622c402659
Merge pull request #11292 from tomberek/tomberek.symbolstring
fix: use SymbolStr in constructor
2024-08-13 23:57:59 +02:00
Valentin Gagarin
4956e7c44c
add cross-references to nix-path overriding (#11288)
* add cross-references to `nix-path` overriding

while this information is already present in the settings, it's more
likely to be first accessed through the "lookup path" page, which
currently requires following two links to get to the practically
important bits.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-13 19:22:32 +02:00
John Ericson
3bdfc827a8
Merge pull request #11287 from obsidiansystems/meson-nix-cli-symlinks
Fix Meson installation of the Nix CLI
2024-08-13 09:22:52 -05:00
John Ericson
95fe9f5ba1 Fix Meson installation of the Nix CLI
Co-Authored-By: Qyriad <qyriad@qyriad.me>
2024-08-13 09:22:06 -04:00
Tom Bereknyei
f22bf867eb fix: use SymbolStr in constructor 2024-08-12 22:18:14 -04:00
Jeremy Kolb
d49e14ba4a Take ANSI and tree characters into account 2024-08-12 14:49:52 -04:00
John Ericson
59def6c23b
Merge pull request #11178 from obsidiansystems/better-exe-lookup
Move `NIX_BIN_DIR` and all logic using it to the Nix executable itself
2024-08-12 12:21:56 -05:00
John Ericson
58b03ef1cd Move NIX_BIN_DIR and all logic using it to the Nix executable itself
This is because with the split packages of the Meson build, we simply
have no idea what directory the binaries will be installed in when we
build the library.

In the process of doing so, consolidate and make more sophisticated the
logic to cope with a few corner cases (e.g. `NIX_BIN_DIR` exists, but no
binaries are inside it).

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-12 12:29:17 -04:00
Eelco Dolstra
9f6ee93f48 fetchers::downloadTarball(): Return a cacheable accessor
downloadTarball() is used by `-I foo=<url>` etc. fetchToStore() needs
the accessor to have a fingerprint to enable caching.

Fixes #11271.
2024-08-12 15:48:26 +02:00
Robert Hensing
b64d6aa7b0
CONTRIBUTING.md: Clarify use of cherry-pick on forks 2024-08-11 18:07:19 +02:00
siddhantCodes
d98e06a581 Use std::filesystem::path in more executables 2024-08-11 20:13:47 +05:30
siddhantCodes
8e70f6f850 Use std::filesystem::path in profile.cc ...
...and `run.cc`
2024-08-11 19:56:06 +05:30
siddhantCodes
0abc664a78 Use std::filesystem in eval and flake ...
... executables
2024-08-11 19:53:34 +05:30
siddhantCodes
2c12a6962e Remove unused variable 2024-08-11 19:18:04 +05:30
Robert Hensing
bd4e5a375b Refer contributors to the matrix room
We were basically sending contributors into the woods with that page.
2024-08-11 13:16:36 +02:00
Robert Hensing
b0b1938982 Urge contributors to read about contributing 2024-08-11 13:15:58 +02:00
siddhantCodes
70dde8c70c Use std::filesystem::path in build.cc 2024-08-11 16:30:59 +05:30
Robert Hensing
f7c86d1a2f CONTRIBUTING.md: Add attribution and context rules
We've recently had an incident where these rules were not followed,
so let's add guidelines to increase the chances of contributors
getting this right.

Relevant discussion:
https://discourse.nixos.org/t/code-attribution-policy/50445/2
2024-08-11 12:47:35 +02:00
Robert Hensing
18485d2d53
Merge pull request #11188 from lf-/jade/kill-int-overflow
Ban integer overflow in the Nix language
2024-08-11 04:24:16 +02:00
Robert Hensing
3cc2e2a0ac
Edit docs 2024-08-11 03:31:44 +02:00
Jeremy Kolb
abbaba9122 Use the window size for the entire length 2024-08-08 14:47:57 -04:00
Andrew Marshall
00f6db36fd libstore: fix port binding in __darwinAllowLocalNetworking sandbox
In d60c3f7f7c, this was changed to close a
hole in the sandbox. Unfortunately, this was too restrictive such that it
made local port binding fail, thus making derivations that needed
`__darwinAllowLocalNetworking` gain nearly nothing, and thus largely
fail (as the primary use for it is to enable port binding).

This unfortunately does mean that a sandboxed build process can, in
coordination with an actor outside the sandbox, escape the sandbox by
binding a port and connecting to it externally to send data. I do not
see a way around this with my experimentation and understanding of the
(quite undocumented) macOS sandbox profile API. Notably it seems not
possible to use the sandbox to do any of:

- Restrict the remote IP of inbound network requests
- Restrict the address being bound to

As such, the `(local ip "*:*")` here appears to be functionally no
different than `(local ip "localhost:*")` (however it *should* be
different than removing the filter entirely, as that would make it also
apply to non-IP networking). Doing `(allow network-inbound (require-all
(local ip "localhost:*") (remote ip "localhost:*")))` causes listening
to fail.

Note that `network-inbound` implies `network-bind`.
2024-08-08 14:31:26 -04:00
John Ericson
cfe66dbec3
Merge pull request #11218 from obsidiansystems/better-executable-path
Factor out `lookupExecutable` and other PATH improvements
2024-08-07 23:21:19 -05:00
John Ericson
0646b6cd61
Update comments / documentation.
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-07 22:29:56 -05:00
John Ericson
6c861b9c51 Factor out lookupExecutable and other PATH improvments
This ended up motivating a good deal of other infra improvements in
order to get Windows right:

- `OsString` to complement `std::filesystem::path`

- env var code for working with the underlying `OsString`s

- Rename `PATHNG_LITERAL` to `OS_STR`

- `NativePathTrait` renamed to `OsPathTrait`, given a character template
  parameter until #9205 is complete.

Split `tests.cc` matching split of `util.{cc,hh}` last year.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-07 18:12:58 -04:00
tomberek
0836888002
Merge pull request #11233 from rhendric/rhendric/reference-manual-2
docs: add language/string-literals.md
2024-08-07 16:17:16 -04:00
tomberek
7354681804
Merge branch 'master' into rhendric/reference-manual-2 2024-08-07 15:25:02 -04:00
Jeremy Kolb
9bf6684b08 Use window size 2024-08-06 09:39:42 -04:00
Eelco Dolstra
2ed075ffc0
Merge pull request #11257 from DeterminateSystems/no-failed-substitution
PathSubstitutionGoal: Fix spurious "failed" count in the progress bar
2024-08-06 10:33:26 +02:00
Jeremy Kolb
1c5f1de43f copy string using filterANSIEscapes and enforce the max length 2024-08-05 14:15:14 -04:00
John Ericson
79abf816b9
Merge pull request #11256 from obsidiansystems/test-organize
Split tests, organize more string functions
2024-08-05 12:44:39 -05:00
Eelco Dolstra
0a00bd07b2 PathSubstitutionGoal: Fix spurious "failed" count in the progress bar
It is not an error if queryPathInfo() indicates that a path does not
exist in the substituter.

Fixes #11198. This was broken in 846869da0e.
2024-08-05 18:56:02 +02:00
John Ericson
9d2d4d11e6 Split tests, organize more string functions
The test split matches PR #8920, so the utility files and tests files
are once again to 1-1. The string changes continues what was started in
PR #11093.
2024-08-05 12:50:13 -04:00
John Ericson
1fce591cbc
Merge pull request #11255 from DeterminateSystems/test-s3-binary-cache-store
Add a VM test for S3BinaryCacheStore
2024-08-05 11:12:08 -05:00
Jeremy Kolb
930818bb1d Account for total length of 80 2024-08-05 11:02:56 -04:00
Jeremy Kolb
f22cf1fd38 Handle long strings, embedded new lines and empty descriptions 2024-08-05 11:02:55 -04:00
Jeremy Kolb
59b6aafadb add tests 2024-08-05 11:02:55 -04:00
Jeremy Kolb
07d0527c0c nix flake show: Only print up to the first new line if it exists. 2024-08-05 11:02:55 -04:00
Jeremy Kolb
547e808a75 nix flake show: add the description if it exists 2024-08-05 11:02:55 -04:00
Eelco Dolstra
2950f9e18a Add a VM test for S3BinaryCacheStore
Fixes #11238.
2024-08-05 11:48:50 +02:00