1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00
Commit graph

19788 commits

Author SHA1 Message Date
John Ericson
7acc229c8f Use the same variable for content addressing in functional tests
`CONTENT_ADDRESSED` -> `NIX_TESTS_CA_BY_DEFAULT`
2025-04-14 11:20:07 -04:00
Eelco Dolstra
b3aa07009d
Merge pull request #13019 from NixOS/mention-blake3
Mention BLAKE3 in the Nix 2.27 release notes
2025-04-14 15:47:38 +02:00
Eelco Dolstra
c0ed07755a Mention BLAKE3 in the Nix 2.27 release notes 2025-04-14 15:18:29 +02:00
mergify[bot]
b1fe93fab7
Merge pull request #13015 from obsidiansystems/derivation-options
`ParsedDerivation`: don't take `drvPath`
2025-04-14 11:14:34 +00:00
Jörg Thalheim
3f3fd2c94b
Merge pull request #12976 from picnoir/pic/multisign
store URI: introduce multiple signatures support
2025-04-14 11:20:41 +02:00
Picnoir
7ea536fe84 Narinfo sign: multiple signatures variant
This is a small optimization used when we're signing a narinfo for
multiple keys in one go. Using this sign variant, we only compute the
NAR fingerprint once, then sign it with all the keys.
2025-04-14 10:30:47 +02:00
John Ericson
0123640009 ParsedDerivation: don't take drvPath
It is just use for adding context to errors, but we have `addTrace` to
do that. Let the callers do that instead.

The callers doing so is a bit duplicated, yes, but this will get better
once `DerivationOptions` is included in `Derivation`.
2025-04-13 18:21:13 -04:00
mergify[bot]
0e1323c041
Merge pull request #13009 from anthowan/patch-1
Fix typo in string context docs
2025-04-12 23:57:57 +00:00
Anthony Wang
f64b8957c7
Fix typo in string context docs 2025-04-12 19:17:27 -04:00
Jörg Thalheim
71567373b6
Merge pull request #13008 from Mic92/aliases
Move alias support from NixArgs to MultiCommand + test
2025-04-12 11:06:09 +02:00
Jörg Thalheim
b1b75e1d7a tests/functional: add test for alias commands 2025-04-12 10:20:30 +02:00
Jörg Thalheim
837f349a99
Merge pull request #12999 from fricklerhandwerk/language
Nix language reference: highlight characteristic features
2025-04-12 10:13:47 +02:00
Jörg Thalheim
3094e39dc4
Merge pull request #12646 from whatsthecraic/feature/s3-auth-iam-role
S3: opt-in the STSProfileCredentialsProvider
2025-04-12 00:30:22 +02:00
Dean De Leo
51073607ea S3: opt-in the STSProfileCredentialsProvider
The STSProfileCredentialsProviders allows to assume a specific IAM role
when accessing an S3 repository. Sometimes this is needed to obtain the
permissions to operate on the bucket.
2025-04-11 23:47:56 +02:00
Jörg Thalheim
a46ca4f02f
Merge pull request #12538 from NaN-git/fix-s3-progress
libstore S3: fix progress bar and make file transfers interruptible
2025-04-11 23:44:53 +02:00
Philipp Otterbein
49f757c24a add isInterrupted() call and replace some checkInterrupt() occurrences 2025-04-11 22:48:10 +02:00
Philipp Otterbein
db297d3dda libstore: same progress bar behavior for PUT and POST requests
- no differentiation between uploads and downloads in CLI
2025-04-11 22:48:10 +02:00
Philipp Otterbein
9da01e69f9 libstore S3: fix progress bar and make file transfers interruptible 2025-04-11 22:48:10 +02:00
Robert Hensing
bbfe39ef27
Merge pull request #12995 from fricklerhandwerk/link-building
glossary: link "building" from "realisation"
2025-04-11 00:15:12 +02:00
Robert Hensing
7a0e38a1aa
Merge pull request #12998 from fricklerhandwerk/packages
glossary: refine the definition of "package"
2025-04-11 00:14:23 +02:00
Valentin Gagarin
bf65bc7eb7 Nix language reference: highlight characteristic features
Nix shipping with Yet Another Programming Language is often questioned
among beginners. This change highlights distinctive aspects of the Nix
language to ease the learning curve and better orient readers around
what really matters for using Nix.

Since it's on topic, this change also polishes the wording on the motivation for string contexts.
2025-04-10 23:50:55 +02:00
Valentin Gagarin
a0d3003bf2 glossary: refine the definition of "package"
This change follows the definition from aptitude, but using precise notions from Nix:

> package managers deal with packages: collections of files that are
> bundled together and can be installed and removed as a group.
> [...]
> If a package A depends upon another package B, then B is required
> for A to operate properly.
> [...]
> The job of a package manager is to present an interface which assists
> the user in managing the collection of packages installed on his or her system.
>
> -- <https://www.debian.org/doc/manuals/aptitude/pr01s02.en.html>

An interesting addition:

> Packages are abstractions defining the granularity at which users can act
> (add, remove, upgrade, etc.) on available software.
> A distribution is a collection of packages maintained (hopefully) coherently.
>
> -- Package Upgrades in FOSS Distributions: Details and Challenges
>    (Roberto Di Cosmo, Stefano Zacchiroli; 2009) <https://arxiv.org/pdf/0902.1610>

Notably these quotes and this change don't say anything about installation,
or what it means for software to be available. In practice, this is
handled downstream, e.g. in NixOS or Home Manager. Nix historically
provides rudimentary facilities for package management such as
`nix-env`, but I claim they are widely agreed upon being discouraged,
with plenty of arguments provided in <https://stop-using-nix-env.privatevoid.net>.

Similarly, the specific structure of packages is determined downstream,
since Nix is policy-free:

> Nix is policy-free; it provides mechanisms to implement various deployment policies, but does not enforce a specific one.
>
> -- The Purely Functional Software Deployment Model (Eelco Dolstra; 2006) <https://edolstra.github.io/pubs/phd-thesis.pdf>

Specifically, Nix mechanisms do not define what a package is supposed to be:

> It's worth noting that the Nix language is intended as a DSL for package and configuration management, but it has no notions of "packages" or "configurations".
>
> -- <https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0dbc00d>

This is why we say, Nix *allows* denoting packages in a certain way, but
doesn't enforce any particular way.
2025-04-10 22:50:28 +02:00
Eelco Dolstra
6cd2b4e169 Move alias support from NixArgs to MultiCommand
This allows subcommands to declare aliases, e.g. `nix store ping` is
now a proper alias of `nix store info`.
2025-04-10 19:48:55 +02:00
Valentin Gagarin
fc5b1d2344 glossary: link "building" from "realisation" 2025-04-10 16:56:19 +02:00
Eelco Dolstra
3f3cc6f438
Merge pull request #12991 from Mic92/cgroup
linux/cgroup: delete double quote in error message
2025-04-10 10:11:24 +02:00
Eelco Dolstra
26cb166bca
Merge pull request #12531 from obsidiansystems/store-accessor-root
`Store::getFSAccessor`: Do not include the store dir
2025-04-10 09:55:03 +02:00
Jörg Thalheim
b3f80283a6 linux/cgroup: delete double quote in error message 2025-04-10 09:31:48 +02:00
Eelco Dolstra
9d3595646d nix shell: Resolve symlinks in storeFS
`storeFS` is the `MountedSourceAccessor` that wraps `store->getFSAccessor()`.
2025-04-09 17:34:19 -04:00
John Ericson
eb643d034f Store::getFSAccessor: Do not include the store dir
Rather than "mounting" the store inside an empty virtual filesystem,
just return the store as a virtual filesystem. This is more modular.

(FWIW, it also supports two long term hopes of mind:

1. More capability-based Nix language mode. I dream of a "super pure
   eval" where you can only use relative path literals (See #8738), and
   any `fetchTree`-fetched stuff + the store are all disjoint (none is
   mounted in another) file systems.

2. Windows, where the store dir may include drive letters, etc., and is
   thus unsuitable to be the prefix of any `CanonPath`s.

)

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-04-09 17:34:18 -04:00
Jörg Thalheim
2455bda91b
Merge pull request #12986 from obsidiansystems/fix-machine-commment-semicolon
Fix another machine config parsing bug
2025-04-09 22:12:26 +02:00
John Ericson
b74b0f4e1c Fix another machine config parsing bug
We were ignorning the result of `trim`, and after my last change we were
also trimmming too early.
2025-04-09 15:33:09 -04:00
Jörg Thalheim
d45067177e
Merge pull request #12984 from obsidiansystems/fix-machine-commment-semicolon
Fix `;` and `#` bug in machine file parsing
2025-04-09 20:26:03 +02:00
Robert Hensing
fc77a89d53
Merge pull request #12699 from rvl/subflake-locking-test
tests/functional/flakes: Add test case for subflake locking
2025-04-09 19:19:34 +02:00
John Ericson
f8b13cce19 Fix ; and # bug in machine file parsing
Comments go to the end of the line, not merely the next ; *or* \n. Fix
by splitting on `;` *within* lines, and test.
2025-04-09 12:38:42 -04:00
Jörg Thalheim
ea48a318ba
Merge pull request #12979 from DeterminateSystems/fix-ignore-local-registrie
Actually ignore system/user registries during locking
2025-04-09 18:32:54 +02:00
Jörg Thalheim
6d50980c2f
Merge pull request #12978 from SuperSandro2000/patch-2
Fix meson warning about meson_version 1.1
2025-04-09 18:31:47 +02:00
Eelco Dolstra
77d4316353 Actually ignore system/user registries during locking
Something went wrong in #12068 so this didn't work. Also added a test.
2025-04-09 17:59:51 +02:00
Sandro
f9a8fdecf5
Fix meson warning about meson_version 1.1
meson.options requires that we set meson_version to at least 1.1

similar to #12956
2025-04-09 15:31:34 +02:00
Picnoir
e12369a68e store URI: introduce multiple signatures support
Add a `secretKeyFiles` URI parameter in the store URIs receiving a
coma-separated list of Nix signing keyfiles.

For instance:

  nix copy --to "file:///tmp/store?secret-keys=/tmp/key1,/tmp/key2" \
    "$(nix build --print-out-paths nixpkgs#hello)"

The keys passed through this new store URI parameter are merged with
the key specified in the `secretKeyFile` parameter, if any.

We'd like to rotate the signing key for cache.nixos.org. To simplify
the transition, we'd like to sign the new paths with two keys: the new
one and the current one. With this, the cache can support nix
configurations only trusting the new key and legacy configurations
only trusting the current key.

See https://github.com/NixOS/rfcs/pull/149 for more informations
behind the motivation.
2025-04-09 13:30:37 +02:00
Robert Hensing
e76bbe413e
Merge pull request #12877 from roberth/c-api-libflake-override-input
C API: Flake loading, input overriding
2025-04-08 09:01:51 +02:00
John Ericson
73d3159ba0
Merge pull request #12967 from DeterminateSystems/trailing-commas
Add trailing commas on addFlag incantations
2025-04-07 19:14:31 -04:00
Graham Christensen
9b47b2b217 format as required 2025-04-07 17:24:41 -04:00
Graham Christensen
06acbd37bd Add trailing commas on addFlag incantations 2025-04-07 17:18:15 -04:00
John Ericson
596389a5f6
Merge pull request #12958 from DeterminateSystems/unlinked-tests
Fix some unlinked tests
2025-04-07 16:41:07 -04:00
John Ericson
6789202af0
Merge pull request #12962 from DeterminateSystems/clang-tidy-warnings
Fix some clang-tidy warnings
2025-04-07 16:37:02 -04:00
John Ericson
3bcc70b64f
Merge pull request #12959 from DeterminateSystems/fchmodat2-compat-private
Keep fchmodat2-compat.hh private
2025-04-07 15:17:46 -04:00
John Ericson
856f8e0e49
Merge pull request #12961 from DeterminateSystems/lexer-helpers-private
Make lexer-helpers.hh internal to fix a clang-tidy error
2025-04-07 14:28:14 -04:00
Eelco Dolstra
c0ad5d36c4 Fix some clang-tidy warnings 2025-04-07 19:55:33 +02:00
Eelco Dolstra
d1ba01235f
Merge pull request #12956 from SuperSandro2000/patch-2
Fix meson warnings on minimum version
2025-04-07 19:50:36 +02:00
Eelco Dolstra
8be24f58f2 Make lexer-helpers.hh internal to fix a clang-tidy error 2025-04-07 18:21:08 +02:00