Commit Graph

14756 Commits

Author SHA1 Message Date
Valentin Gagarin
800f9c6dba
show Nix logo in the manual (#10444)
the location of files is hard-coded by mdBook.
there is also seems to be no way to define custom templates, therefore
all styling has to be done in the CSS override.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-04-09 09:27:41 +00:00
Eelco Dolstra
27c8b92f31 Bump version 2024-03-15 20:25:52 +01:00
Eelco Dolstra
a06e6fd69b
Merge pull request #10233 from NickHu/2_17-fix-CVE-2024-27297
Manual backport of f8170ce9f1 to fix CVE-2024-27297
2024-03-15 18:14:20 +01:00
Nick Hu
3e99257053
Manual backport of f8170ce9f1 to fix CVE-2024-27297 2024-03-12 12:00:44 +00:00
Robert Hensing
61867eeb90
Merge pull request #10181 from NixOS/backport-10169-to-2.17-maintenance
[Backport 2.17-maintenance] [Backport 2.19-maintenance] Faster flake lock parsing
2024-03-07 19:15:43 +01:00
Graham Dennis
b12f1ffa7b Faster flake.lock parsing
This PR reduces the creation of short-lived basic_json objects while
parsing flake.lock files. For large flake.lock files (~1.5MB) I was
observing ~60s being spent for trivial nix build operations while
after this change it is now taking ~1.6s.

(cherry picked from commit 7fd0de38c6)
(cherry picked from commit 89cadf5d64)
2024-03-07 16:31:25 +00:00
github-actions[bot]
595b286f44
fix location of _redirects file (#9955) 2024-02-07 11:44:15 +01:00
github-actions[bot]
1dde20ac6f
fix an old lost direct (#9716)
this part must have been moved quite a while ago, but apparently so far
no one noticed

(cherry picked from commit 6db805b3d1)

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-08 20:57:28 +01:00
Robert Hensing
f6bdbaa900
Merge pull request #9470 from NixOS/backport-9459-to-2.17-maintenance
[Backport 2.17-maintenance] add path based redirects
2023-11-27 15:15:48 +01:00
Valentin Gagarin
7ac8a8b53c add path based redirects
up to now, those were managed outside of this repo, which as
unsurprisingly a real hassle to deal with if one wanted to prevent URLs
from breaking when moving pages around. this change removes a large part
of the friction involved in moving content in the Nix manual.

possible next steps for further automation:
- check for content that moved and warn if it's not reachable from
  links that were valid prior to a change
- create redirect rules automatically based on this information

(cherry picked from commit 2b7016cc56)
2023-11-27 13:28:56 +00:00
John Ericson
7332e3c7cb
Merge pull request #9435 from NixOS/backport-9431-to-2.17-maintenance
[Backport 2.17-maintenance] Add missing `-lrapidcheck` fixing build with shared lib
2023-11-22 09:35:37 -05:00
John Ericson
d3ce622041 Add missing -lrapidcheck fixing build with shared lib
https://github.com/NixOS/nixpkgs/pull/269064 makes rapidcheck be build
as a shared lib, but that broke Nix because the `-lrapidcheck` was
missing. This fixes that (and doesn't break Nix what the library is a
static archive as today).

(cherry picked from commit 46131567da)
2023-11-22 04:48:08 +00:00
Théophane Hufschmitt
841355740c
Merge pull request #9405 from NixOS/backport-9390-to-2.17-maintenance
[Backport 2.17-maintenance] fetchTree: clarify docs for shallow flag
2023-11-20 15:38:21 +01:00
DavHau
8a9ddd9d87 fetchTree: clarify docs for shallow flag
(cherry picked from commit 796a7eb92d)
2023-11-20 14:15:59 +00:00
John Ericson
2863a4d544
Merge pull request #9121 from NixOS/backport-9095-to-2.17-maintenance
[Backport 2.17-maintenance] StorePath: reject names starting with '.'
2023-10-09 10:28:04 -04:00
edef
8aaa874978 StorePath: reject names starting with '.'
This has been the behaviour before Nix 2.4. It was dropped in a rewrite
in 759947bf72, allowing the creation of
store paths that aren't considered valid by older Nix versions or other
Nix tooling.

Nix 2.4 didn't ship in NixOS until 22.05, and stdenv.mkDerivation in
nixpkgs drops leading periods since April 2022, so it's unlikely anyone
is relying on the current lax behaviour.

Closes #9091.

Change-Id: I4a57bd9899e1b0dba56870ae5a1b680918a18ce9
(cherry picked from commit 24bda0c7b3)
2023-10-08 12:21:15 +00:00
Eelco Dolstra
02d55d44e5
Merge pull request #9084 from NixOS/backport-9079-to-2.17-maintenance
[Backport 2.17-maintenance] [Backport 2.18-maintenance] pathExists: isDir when endswith /.
2023-10-02 14:09:25 +02:00
Robert Hensing
70f7388fb9 pathExists: isDir when endswith /.
(cherry picked from commit f8a3893e8d)
(cherry picked from commit 860f64c345)
2023-10-02 12:08:48 +00:00
Eelco Dolstra
cc0ea0dd58 Bump version 2023-09-29 19:11:50 +02:00
Eelco Dolstra
e64606084e Document that redirected tarball flakerefs can specify lastModified
(cherry picked from commit 56763ff918)
2023-09-29 17:15:50 +02:00
Eelco Dolstra
eb21904198 Tarball trees: Propagate lastModified
This makes them behave consistently with GitHub/GitLab flakes.

(cherry picked from commit 81045f243f)
2023-09-29 17:15:46 +02:00
Eelco Dolstra
2da46530d0
Merge pull request #8936 from NixOS/backport-8825-to-2.17-maintenance
[Backport 2.17-maintenance] src/libexpr/search-path.cc: avoid out-of-bounds read on string_view
2023-09-07 08:11:57 +02:00
Sergei Trofimovich
d0dd37b2a6 src/libexpr/search-path.cc: avoid out-of-bounds read on string_view
Without the change build with `-D_GLIBCXX_ASSERTIONS` exposes testsuite
assertion:

    $ gdb src/libexpr/tests/libnixexpr-tests
    Reading symbols from src/libexpr/tests/libnixexpr-tests...
    (gdb) break __glibcxx_assert_fail
    (gdb) run
    (gdb) bt
    in std::__glibcxx_assert_fail(char const*, int, char const*, char const*)@plt () from /mnt/archive/big/git/nix/src/libexpr/libnixexpr.so
    in std::basic_string_view<char, std::char_traits<char> >::operator[] (this=0x7fffffff56c0, __pos=4)
        at /nix/store/r74fw2j8rx5idb0w8s1s6ynwwgs0qmh9-gcc-14.0.0/include/c++/14.0.0/string_view:258
    in nix::SearchPath::Prefix::suffixIfPotentialMatch (this=0x7fffffff5780, path=...) at src/libexpr/search-path.cc:15
    in nix::SearchPathElem_suffixIfPotentialMatch_partialPrefix_Test::TestBody (this=0x555555a17540) at src/libexpr/tests/search-path.cc:62

As string sizes are usigned types `(a - b) > 0` effectively means
`a != b`. While the intention should be `a > b`.

The change fixes test suite pass.

(cherry picked from commit b74962c92b)
2023-09-06 14:05:17 +00:00
Eelco Dolstra
5568ca5ff1
Merge pull request #8897 from NixOS/backport-8869-to-2.17-maintenance
[Backport 2.17-maintenance] Fix #8838, pathExists: isDir when ends with `/ `
2023-09-01 14:56:50 +02:00
Robert Hensing
d52690279a pathExists: isDir when endswith /
Fixes https://github.com/NixOS/nix/issues/8838

(cherry picked from commit 1e08e12d81)
2023-09-01 11:16:23 +00:00
Robert Hensing
8bfc251282 tests/lang/eval-okay-pathexists: Add cases
(cherry picked from commit d2e6cfa075)
2023-09-01 11:16:23 +00:00
John Ericson
8fbb4598c2
Merge pull request #8742 from NixOS/backport-8741-to-2.17-maintenance
[Backport 2.17-maintenance] doc: clarify release notes about nested attribute merges
2023-07-25 12:46:08 -04:00
Naïm Favier
8398872ae0 doc: clarify release notes about nested attribute merges
(cherry picked from commit 1b756e300f)
2023-07-25 15:11:39 +00:00
Eelco Dolstra
07d1e304b4 Bump version 2023-07-24 21:30:07 +02:00
Eelco Dolstra
a212300a1d Mark official release 2023-07-24 19:31:34 +02:00
Eelco Dolstra
e6784f0ca6
Merge pull request #8734 from NixOS/release-notes
2.17 release notes
2023-07-24 18:07:43 +02:00
Eelco Dolstra
c51be0345e Release notes 2023-07-24 17:19:31 +02:00
John Ericson
40c77f3514
Merge pull request #8243 from obsidiansystems/indirect-root-store
Refactor `Store` hierarchy with a new `IndirectRootStore` interface
2023-07-24 10:03:34 -04:00
John Ericson
60d8dd7aea Clean up store hierarchy with IndirectRootStore
See the API doc comments for details.
2023-07-24 09:19:44 -04:00
John Ericson
13269ba93b Make RemoteStore::ConnectionHandle part of class and expose
Will need to do subclass-specific implementations in the next commit.
This isn't because there will be multiple variations of the daemon
protocol (whew!) but because different clients pick and choose different
parts to use.
2023-07-24 09:17:01 -04:00
John Ericson
0a30b07277 Move Store::Params typedef to StoreConfig::Params
This is because `StoreConfig` also uses it.
2023-07-24 09:03:44 -04:00
John Ericson
4685c9b55f
Merge pull request #8664 from ncfavier/merge-dynamic-attrs
parser: merge nested dynamic attributes
2023-07-23 11:03:38 -04:00
Naïm Favier
570a1a3ad7
parser: merge nested dynamic attributes
Fixes https://github.com/NixOS/nix/issues/7115
2023-07-21 17:14:03 +02:00
John Ericson
fe1fbdb5a1
Merge pull request #8724 from obsidiansystems/queryPartialDerivationOutputMap-evalStore
Give `queryPartialDerivationOutputMap` an `evalStore` parameter
2023-07-21 08:53:18 -04:00
Eelco Dolstra
7ac24d9525
Merge pull request #8650 from obsidiansystems/content-address-simpler
Simplify `ContentAddress`
2023-07-21 13:46:53 +02:00
John Ericson
6bc98c7fba Give queryPartialDerivationOutputMap an evalStore parameter
This makes it more useful. In general, the derivation will be in one
store, and the realisation info is in another.

This also helps us avoid duplication. See how `resolveDerivedPath` is
now simpler because it uses `queryPartialDerivationOutputMap`. In #8369
we get more flavors of derived path, and need more code to resolve them
all, and this problem only gets worse.

The fact that we need a new method to deal with the multiple dispatch is
unfortunate, but this generally relates to the fact that `Store` is a
sub-par interface, too bulky/unwieldy and conflating separate concerns.
Solving that is out of scope of this PR.

This is part of the RFC 92 work. See tracking issue #6316
2023-07-20 15:59:52 -04:00
John Ericson
f62543fe1c Remove unneeded copy
It appeared in 8eb73a8724 (by me!) without
justification.
2023-07-20 15:42:06 -04:00
John Ericson
7b30293d38 Tighten #includes: DerivedPath doesn't care about Realisation 2023-07-20 15:42:06 -04:00
Valentin Gagarin
85d0eb6316
fix broken links (#8722) 2023-07-20 17:58:14 +02:00
Eelco Dolstra
ab363cd494
Merge pull request #8723 from fricklerhandwerk/doc-constants
revert anchor prefix for builtin constants
2023-07-20 17:13:07 +02:00
Valentin Gagarin
0e4f6dfcf7 revert anchor prefix for builtin constants
the original change broke many pre-existing anchor links.

also change formatting of the constants listing slightly:
- the type should not be part of the anchor
- add highlight to the "impure only" note
2023-07-20 10:27:38 +02:00
John Ericson
453c4be93c
Merge pull request #8680 from NixLayeredStore/test-groups
Introduce notion of a test group, use for CA tests
2023-07-19 11:17:57 -04:00
Valentin Gagarin
b0173716f6
clarify wording on args@ default handling (#8596)
* clarify wording on args@ default handling

Most importantly use shorter sentences and emphasize the key point that defaults aren't taken into account

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-07-19 13:07:07 +00:00
Robert Hensing
32494cbb29
Merge pull request #7973 from fricklerhandwerk/remove-channels
remove the Channels section
2023-07-19 14:02:26 +02:00
Robert Hensing
eca07b2a47
Merge pull request #8315 from fricklerhandwerk/doc-system
add information on the system type string
2023-07-19 12:07:23 +02:00