mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Merge remote-tracking branch 'origin/detsys-main' into remove-flake-compat
This commit is contained in:
commit
32b50f632f
45 changed files with 269 additions and 230 deletions
26
.github/CODEOWNERS
vendored
26
.github/CODEOWNERS
vendored
|
@ -1,26 +0,0 @@
|
||||||
# Pull requests concerning the listed files will automatically invite the respective maintainers as reviewers.
|
|
||||||
# This file is not used for denoting any kind of ownership, but is merely a tool for handling notifications.
|
|
||||||
#
|
|
||||||
# Merge permissions are required for maintaining an entry in this file.
|
|
||||||
# For documentation on this mechanism, see https://help.github.com/articles/about-codeowners/
|
|
||||||
|
|
||||||
# Default reviewers if nothing else matches
|
|
||||||
* @edolstra
|
|
||||||
|
|
||||||
# This file
|
|
||||||
.github/CODEOWNERS @edolstra
|
|
||||||
|
|
||||||
# Documentation of built-in functions
|
|
||||||
src/libexpr/primops.cc @roberth @fricklerhandwerk
|
|
||||||
|
|
||||||
# Documentation of settings
|
|
||||||
src/libexpr/eval-settings.hh @fricklerhandwerk
|
|
||||||
src/libstore/globals.hh @fricklerhandwerk
|
|
||||||
|
|
||||||
# Documentation
|
|
||||||
doc/manual @fricklerhandwerk
|
|
||||||
maintainers/*.md @fricklerhandwerk
|
|
||||||
src/**/*.md @fricklerhandwerk
|
|
||||||
|
|
||||||
# Libstore layer
|
|
||||||
/src/libstore @ericson2314
|
|
21
.github/ISSUE_TEMPLATE/bug_report.md
vendored
21
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,10 +1,9 @@
|
||||||
---
|
---
|
||||||
name: Bug report
|
name: Bug report
|
||||||
about: Report unexpected or incorrect behaviour
|
about: Report unexpected or incorrect behaviour
|
||||||
title: ''
|
title: ""
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Describe the bug
|
## Describe the bug
|
||||||
|
@ -32,7 +31,9 @@ assignees: ''
|
||||||
|
|
||||||
## Metadata
|
## Metadata
|
||||||
|
|
||||||
<!-- Please insert the output of running `nix-env --version` below this line -->
|
<!-- Please insert the output of running `determinate-nixd version` below this line -->
|
||||||
|
|
||||||
|
<!-- Please insert the output of running `nix --version` below this line -->
|
||||||
|
|
||||||
## Additional context
|
## Additional context
|
||||||
|
|
||||||
|
@ -42,13 +43,9 @@ assignees: ''
|
||||||
|
|
||||||
<!-- make sure this issue is not redundant or obsolete -->
|
<!-- make sure this issue is not redundant or obsolete -->
|
||||||
|
|
||||||
- [ ] checked [latest Nix manual] \([source])
|
- [ ] checked [latest Determinate Nix manual] \([source])
|
||||||
- [ ] checked [open bug issues and pull requests] for possible duplicates
|
- [ ] checked [open bug issues and pull requests] for possible duplicates
|
||||||
|
|
||||||
[latest Nix manual]: https://nixos.org/manual/nix/unstable/
|
[latest Determinate Nix manual]: https://manual.determinate.systems/
|
||||||
[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source
|
[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source
|
||||||
[open bug issues and pull requests]: https://github.com/NixOS/nix/labels/bug
|
[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
|
|
||||||
|
|
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,10 +1,9 @@
|
||||||
---
|
---
|
||||||
name: Feature request
|
name: Feature request
|
||||||
about: Suggest a new feature
|
about: Suggest a new feature
|
||||||
title: ''
|
title: ""
|
||||||
labels: feature
|
labels: feature
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Is your feature request related to a problem?
|
## Is your feature request related to a problem?
|
||||||
|
@ -27,13 +26,9 @@ assignees: ''
|
||||||
|
|
||||||
<!-- make sure this issue is not redundant or obsolete -->
|
<!-- make sure this issue is not redundant or obsolete -->
|
||||||
|
|
||||||
- [ ] checked [latest Nix manual] \([source])
|
- [ ] checked [latest Determinate Nix manual] \([source])
|
||||||
- [ ] checked [open feature issues and pull requests] for possible duplicates
|
- [ ] checked [open bug issues and pull requests] for possible duplicates
|
||||||
|
|
||||||
[latest Nix manual]: https://nixos.org/manual/nix/unstable/
|
[latest Determinate Nix manual]: https://manual.determinate.systems/
|
||||||
[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source
|
[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source
|
||||||
[open feature issues and pull requests]: https://github.com/NixOS/nix/labels/feature
|
[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
|
|
||||||
|
|
23
.github/ISSUE_TEMPLATE/installer.md
vendored
23
.github/ISSUE_TEMPLATE/installer.md
vendored
|
@ -1,18 +1,17 @@
|
||||||
---
|
---
|
||||||
name: Installer issue
|
name: Installer issue
|
||||||
about: Report problems with installation
|
about: Report problems with installation
|
||||||
title: ''
|
title: ""
|
||||||
labels: installer
|
labels: installer
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Platform
|
## Platform
|
||||||
|
|
||||||
<!-- select the platform on which you tried to install Nix -->
|
<!-- select the platform on which you tried to install Determinate Nix -->
|
||||||
|
|
||||||
- [ ] Linux: <!-- state your distribution, e.g. Arch Linux, Ubuntu, ... -->
|
|
||||||
- [ ] macOS
|
- [ ] macOS
|
||||||
|
- [ ] Linux: <!-- state your distribution, e.g. Arch Linux, Ubuntu, ... -->
|
||||||
- [ ] WSL
|
- [ ] WSL
|
||||||
|
|
||||||
## Additional information
|
## Additional information
|
||||||
|
@ -35,13 +34,9 @@ assignees: ''
|
||||||
|
|
||||||
<!-- make sure this issue is not redundant or obsolete -->
|
<!-- make sure this issue is not redundant or obsolete -->
|
||||||
|
|
||||||
- [ ] checked [latest Nix manual] \([source])
|
- [ ] checked [latest Determinate Nix manual] \([source])
|
||||||
- [ ] checked [open installer issues and pull requests] for possible duplicates
|
- [ ] checked [open bug issues and pull requests] for possible duplicates
|
||||||
|
|
||||||
[latest Nix manual]: https://nixos.org/manual/nix/unstable/
|
[latest Determinate Nix manual]: https://manual.determinate.systems/
|
||||||
[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source
|
[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source
|
||||||
[open installer issues and pull requests]: https://github.com/NixOS/nix/labels/installer
|
[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
|
|
||||||
|
|
19
.github/ISSUE_TEMPLATE/missing_documentation.md
vendored
19
.github/ISSUE_TEMPLATE/missing_documentation.md
vendored
|
@ -1,10 +1,9 @@
|
||||||
---
|
---
|
||||||
name: Missing or incorrect documentation
|
name: Missing or incorrect documentation
|
||||||
about: Help us improve the reference manual
|
about: Help us improve the reference manual
|
||||||
title: ''
|
title: ""
|
||||||
labels: documentation
|
labels: documentation
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Problem
|
## Problem
|
||||||
|
@ -19,13 +18,9 @@ assignees: ''
|
||||||
|
|
||||||
<!-- make sure this issue is not redundant or obsolete -->
|
<!-- make sure this issue is not redundant or obsolete -->
|
||||||
|
|
||||||
- [ ] checked [latest Nix manual] \([source])
|
- [ ] checked [latest Determinate Nix manual] \([source])
|
||||||
- [ ] checked [open documentation issues and pull requests] for possible duplicates
|
- [ ] checked [open bug issues and pull requests] for possible duplicates
|
||||||
|
|
||||||
[latest Nix manual]: https://nixos.org/manual/nix/unstable/
|
[latest Determinate Nix manual]: https://manual.determinate.systems/
|
||||||
[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source
|
[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source
|
||||||
[open documentation issues and pull requests]: https://github.com/NixOS/nix/labels/documentation
|
[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
|
|
||||||
|
|
25
.github/PULL_REQUEST_TEMPLATE.md
vendored
25
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -1,22 +1,3 @@
|
||||||
<!--
|
|
||||||
|
|
||||||
IMPORTANT
|
|
||||||
|
|
||||||
Nix is a non-trivial project, so for your contribution to be successful,
|
|
||||||
it really is important to follow the contributing guidelines:
|
|
||||||
|
|
||||||
https://github.com/NixOS/nix/blob/master/CONTRIBUTING.md
|
|
||||||
|
|
||||||
Even if you've contributed to open source before, take a moment to read it,
|
|
||||||
so you understand the process and the expectations.
|
|
||||||
|
|
||||||
- what information to include in commit messages
|
|
||||||
- proper attribution
|
|
||||||
- volunteering contributions effectively
|
|
||||||
- how to get help and our review process.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Motivation
|
## Motivation
|
||||||
|
|
||||||
<!-- Briefly explain what the change is about and why it is desirable. -->
|
<!-- Briefly explain what the change is about and why it is desirable. -->
|
||||||
|
@ -30,9 +11,3 @@ so you understand the process and the expectations.
|
||||||
<!-- Invasive change: Discuss alternative designs or approaches you considered. -->
|
<!-- Invasive change: Discuss alternative designs or approaches you considered. -->
|
||||||
|
|
||||||
<!-- Large change: Provide instructions to reviewers how to read the diff. -->
|
<!-- Large change: Provide instructions to reviewers how to read the diff. -->
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Add :+1: to [pull requests you find important](https://github.com/NixOS/nix/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc).
|
|
||||||
|
|
||||||
The Nix maintainer team uses a [GitHub project board](https://github.com/orgs/NixOS/projects/19) to [schedule and track reviews](https://github.com/NixOS/nix/tree/master/maintainers#project-board-protocol).
|
|
||||||
|
|
25
.github/STALE-BOT.md
vendored
25
.github/STALE-BOT.md
vendored
|
@ -2,34 +2,21 @@
|
||||||
|
|
||||||
- Thanks for your contribution!
|
- Thanks for your contribution!
|
||||||
- To remove the stale label, just leave a new comment.
|
- To remove the stale label, just leave a new comment.
|
||||||
- _How to find the right people to ping?_ → [`git blame`](https://git-scm.com/docs/git-blame) to the rescue! (or GitHub's history and blame buttons.)
|
- You can always ask for help on [Discord](https://determinate.systems/discord).
|
||||||
- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/) or on [Matrix - #nix:nixos.org](https://matrix.to/#/#nix:nixos.org).
|
|
||||||
|
|
||||||
## Suggestions for PRs
|
## Suggestions for PRs
|
||||||
|
|
||||||
1. GitHub sometimes doesn't notify people who commented / reviewed a PR previously, when you (force) push commits. If you have addressed the reviews you can [officially ask for a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else.
|
1. If it is unfinished but you plan to finish it, please mark it as a draft.
|
||||||
2. If it is unfinished but you plan to finish it, please mark it as a draft.
|
1. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work.
|
||||||
3. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work.
|
1. To get things rolling again, rebase the PR against the target branch and address valid comments.
|
||||||
4. To get things rolling again, rebase the PR against the target branch and address valid comments.
|
1. If you need a review to move forward, ask in [Discord](https://determinate.systems/discord).
|
||||||
5. If you need a review to move forward, ask in [the Discourse thread for PRs that need help](https://discourse.nixos.org/t/prs-in-distress/3604).
|
|
||||||
6. If all you need is a merge, check the git history to find and [request reviews](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from people who usually merge related contributions.
|
|
||||||
|
|
||||||
## Suggestions for issues
|
## Suggestions for issues
|
||||||
|
|
||||||
1. If it is resolved (either for you personally, or in general), please consider closing it.
|
1. If it is resolved (either for you personally, or in general), please consider closing it.
|
||||||
2. If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
|
2. If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
|
||||||
3. If you still have interest in resolving it, try to ping somebody who you believe might have an interest in the topic. Consider discussing the problem in [our Discourse Forum](https://discourse.nixos.org/).
|
3. If you still have interest in resolving it, try to ping somebody who you believe might have an interest in the topic. Consider discussing the problem in [Discord](https://determinate.systems/discord).
|
||||||
4. As with all open source projects, your best option is to submit a Pull Request that addresses this issue. We :heart: this attitude!
|
|
||||||
|
|
||||||
**Memorandum on closing issues**
|
**Memorandum on closing issues**
|
||||||
|
|
||||||
Don't be afraid to close an issue that holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
|
Don't be afraid to close an issue that holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
|
||||||
|
|
||||||
## Useful GitHub search queries
|
|
||||||
|
|
||||||
- [Open PRs with any stale-bot interaction](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+)
|
|
||||||
- [Open PRs with any stale-bot interaction and `stale`](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%22stale%22)
|
|
||||||
- [Open PRs with any stale-bot interaction and NOT `stale`](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%22stale%22+)
|
|
||||||
- [Open Issues with any stale-bot interaction](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+)
|
|
||||||
- [Open Issues with any stale-bot interaction and `stale`](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%22stale%22+)
|
|
||||||
- [Open Issues with any stale-bot interaction and NOT `stale`](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%22stale%22+)
|
|
||||||
|
|
68
.github/release-notes.sh
vendored
Executable file
68
.github/release-notes.sh
vendored
Executable file
|
@ -0,0 +1,68 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# SC2002 disables "useless cat" warnings.
|
||||||
|
# I prefer pipelines that start with an explicit input, and go from there.
|
||||||
|
# Overly fussy.
|
||||||
|
# shellcheck disable=SC2002
|
||||||
|
|
||||||
|
scratch=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||||
|
finish() {
|
||||||
|
rm -rf "$scratch"
|
||||||
|
}
|
||||||
|
trap finish EXIT
|
||||||
|
|
||||||
|
DATE=$(date +%Y-%m-%d)
|
||||||
|
DETERMINATE_NIX_VERSION=$(cat .version-determinate)
|
||||||
|
TAG_NAME="v${DETERMINATE_NIX_VERSION}"
|
||||||
|
NIX_VERSION=$(cat .version)
|
||||||
|
NIX_VERSION_MAJOR_MINOR=$(echo "$NIX_VERSION" | cut -d. -f1,2)
|
||||||
|
GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-DeterminateSystems/nix-src}"
|
||||||
|
|
||||||
|
gh api "/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
|
||||||
|
-f "tag_name=${TAG_NAME}" > "$scratch/notes.json"
|
||||||
|
|
||||||
|
trim_trailing_newlines() {
|
||||||
|
local text
|
||||||
|
text="$(cat)"
|
||||||
|
echo -n "${text//$'\n'}"
|
||||||
|
}
|
||||||
|
|
||||||
|
linkify_gh() {
|
||||||
|
sed \
|
||||||
|
-e 's!\(https://github.com/DeterminateSystems/nix-src/\(pull\|issue\)/\([[:digit:]]\+\)\)!' \
|
||||||
|
-e 's#\(https://github.com/DeterminateSystems/nix-src/compare/\([^ ]\+\)\)#[\2](\1)#'
|
||||||
|
}
|
||||||
|
|
||||||
|
(
|
||||||
|
cat doc/manual/source/release-notes-determinate/changes.md \
|
||||||
|
| sed 's/^.*\(<!-- differences -->\)$/This section lists the differences between upstream Nix '"$NIX_VERSION_MAJOR_MINOR"' and Determinate Nix '"$DETERMINATE_NIX_VERSION"'.\1/' \
|
||||||
|
|
||||||
|
printf "\n<!-- Determinate Nix version %s -->\n" "$DETERMINATE_NIX_VERSION"
|
||||||
|
cat "$scratch/notes.json" \
|
||||||
|
| jq -r .body \
|
||||||
|
| grep -v '^#' \
|
||||||
|
| grep -v "Full Changelog" \
|
||||||
|
| trim_trailing_newlines \
|
||||||
|
| sed -e 's/^\* /\n* /' \
|
||||||
|
| linkify_gh
|
||||||
|
) > "$scratch/changes.md"
|
||||||
|
|
||||||
|
(
|
||||||
|
printf "# Release %s (%s)\n\n" \
|
||||||
|
"$DETERMINATE_NIX_VERSION" \
|
||||||
|
"$DATE"
|
||||||
|
printf "* Based on [upstream Nix %s](../release-notes/rl-%s.md).\n\n" \
|
||||||
|
"$NIX_VERSION" \
|
||||||
|
"$NIX_VERSION_MAJOR_MINOR"
|
||||||
|
|
||||||
|
cat "$scratch/notes.json" | jq -r .body | linkify_gh
|
||||||
|
) > "$scratch/rl.md"
|
||||||
|
|
||||||
|
(
|
||||||
|
cat doc/manual/source/SUMMARY.md.in \
|
||||||
|
| sed 's/\(<!-- next -->\)$/\1\n - [Release '"$DETERMINATE_NIX_VERSION"' ('"$DATE"')](release-notes-determinate\/rl-'"$DETERMINATE_NIX_VERSION"'.md)/'
|
||||||
|
) > "$scratch/summary.md"
|
||||||
|
|
||||||
|
mv "$scratch/changes.md" doc/manual/source/release-notes-determinate/changes.md
|
||||||
|
mv "$scratch/rl.md" "doc/manual/source/release-notes-determinate/rl-${DETERMINATE_NIX_VERSION}.md"
|
||||||
|
mv "$scratch/summary.md" doc/manual/source/SUMMARY.md.in
|
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
@ -37,6 +37,7 @@ jobs:
|
||||||
path: ./tarball/*.xz
|
path: ./tarball/*.xz
|
||||||
test:
|
test:
|
||||||
if: ${{ inputs.if && inputs.run_tests}}
|
if: ${{ inputs.if && inputs.run_tests}}
|
||||||
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ inputs.os }}
|
runs-on: ${{ inputs.os }}
|
||||||
|
|
2
.github/workflows/propose-release.yml
vendored
2
.github/workflows/propose-release.yml
vendored
|
@ -26,4 +26,6 @@ jobs:
|
||||||
extra-commands-early: |
|
extra-commands-early: |
|
||||||
echo ${{ inputs.version }} > .version-determinate
|
echo ${{ inputs.version }} > .version-determinate
|
||||||
git add .version-determinate
|
git add .version-determinate
|
||||||
|
./.github/release-notes.sh
|
||||||
|
git add doc
|
||||||
git commit -m "Set .version-determinate to ${{ inputs.version }}" || true
|
git commit -m "Set .version-determinate to ${{ inputs.version }}" || true
|
||||||
|
|
2
.version
2
.version
|
@ -1 +1 @@
|
||||||
2.28.2
|
2.28.3
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
3.4.0
|
3.4.2
|
||||||
|
|
|
@ -127,7 +127,8 @@
|
||||||
- [Experimental Features](development/experimental-features.md)
|
- [Experimental Features](development/experimental-features.md)
|
||||||
- [Contributing](development/contributing.md)
|
- [Contributing](development/contributing.md)
|
||||||
- [Determinate Nix Release Notes](release-notes-determinate/index.md)
|
- [Determinate Nix Release Notes](release-notes-determinate/index.md)
|
||||||
- [Changes between Nix and Determinate Nix](release-notes-determinate/changes.md)
|
- [Changes between Nix and Determinate Nix](release-notes-determinate/changes.md)<!-- next -->
|
||||||
|
- [Release 3.4.2 (2025-05-05)](release-notes-determinate/rl-3.4.2.md)
|
||||||
- [Release 3.4.0 (2025-04-25)](release-notes-determinate/rl-3.4.0.md)
|
- [Release 3.4.0 (2025-04-25)](release-notes-determinate/rl-3.4.0.md)
|
||||||
- [Release 3.3.0 (2025-04-11)](release-notes-determinate/rl-3.3.0.md)
|
- [Release 3.3.0 (2025-04-11)](release-notes-determinate/rl-3.3.0.md)
|
||||||
- [Release 3.1.0 (2025-03-27)](release-notes-determinate/rl-3.1.0.md)
|
- [Release 3.1.0 (2025-03-27)](release-notes-determinate/rl-3.1.0.md)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Changes between Nix and Determinate Nix
|
# Changes between Nix and Determinate Nix
|
||||||
|
|
||||||
This section lists the differences between upstream Nix 2.24 and Determinate Nix 3.4.0.
|
This section lists the differences between upstream Nix 2.28 and Determinate Nix 3.4.2.<!-- differences -->
|
||||||
|
|
||||||
* In Determinate Nix, flakes are stable. You no longer need to enable the `flakes` experimental feature.
|
* In Determinate Nix, flakes are stable. You no longer need to enable the `flakes` experimental feature.
|
||||||
|
|
||||||
|
@ -15,3 +15,5 @@ This section lists the differences between upstream Nix 2.24 and Determinate Nix
|
||||||
* Using indirect flake references and implicit inputs is deprecated, see: https://github.com/DeterminateSystems/nix-src/issues/37
|
* Using indirect flake references and implicit inputs is deprecated, see: https://github.com/DeterminateSystems/nix-src/issues/37
|
||||||
|
|
||||||
* Warnings around "dirty trees" are updated to reduce "dirty" jargon, and now refers to "uncommitted changes".
|
* Warnings around "dirty trees" are updated to reduce "dirty" jargon, and now refers to "uncommitted changes".
|
||||||
|
|
||||||
|
<!-- Determinate Nix version 3.4.2 -->
|
||||||
|
|
4
doc/manual/source/release-notes-determinate/rl-3.4.2.md
Normal file
4
doc/manual/source/release-notes-determinate/rl-3.4.2.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Release 3.4.2 (2025-05-05)
|
||||||
|
|
||||||
|
* Based on [upstream Nix 2.28.3](../release-notes/rl-2.28.md).
|
||||||
|
|
34
flake.nix
34
flake.nix
|
@ -137,14 +137,15 @@
|
||||||
# without "polluting" the top level "`pkgs`" attrset.
|
# without "polluting" the top level "`pkgs`" attrset.
|
||||||
# This also has the benefit of providing us with a distinct set of packages
|
# This also has the benefit of providing us with a distinct set of packages
|
||||||
# we can iterate over.
|
# we can iterate over.
|
||||||
nixComponents =
|
# The `2` suffix is here because otherwise it interferes with `nixVersions.latest`, which is used in daemon compat tests.
|
||||||
|
nixComponents2 =
|
||||||
lib.makeScopeWithSplicing'
|
lib.makeScopeWithSplicing'
|
||||||
{
|
{
|
||||||
inherit (final) splicePackages;
|
inherit (final) splicePackages;
|
||||||
inherit (final.nixDependencies) newScope;
|
inherit (final.nixDependencies2) newScope;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
otherSplices = final.generateSplicesForMkScope "nixComponents";
|
otherSplices = final.generateSplicesForMkScope "nixComponents2";
|
||||||
f = import ./packaging/components.nix {
|
f = import ./packaging/components.nix {
|
||||||
inherit (final) lib;
|
inherit (final) lib;
|
||||||
inherit officialRelease;
|
inherit officialRelease;
|
||||||
|
@ -155,22 +156,23 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# The dependencies are in their own scope, so that they don't have to be
|
# The dependencies are in their own scope, so that they don't have to be
|
||||||
# in Nixpkgs top level `pkgs` or `nixComponents`.
|
# in Nixpkgs top level `pkgs` or `nixComponents2`.
|
||||||
nixDependencies =
|
# The `2` suffix is here because otherwise it interferes with `nixVersions.latest`, which is used in daemon compat tests.
|
||||||
|
nixDependencies2 =
|
||||||
lib.makeScopeWithSplicing'
|
lib.makeScopeWithSplicing'
|
||||||
{
|
{
|
||||||
inherit (final) splicePackages;
|
inherit (final) splicePackages;
|
||||||
inherit (final) newScope; # layered directly on pkgs, unlike nixComponents above
|
inherit (final) newScope; # layered directly on pkgs, unlike nixComponents2 above
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
otherSplices = final.generateSplicesForMkScope "nixDependencies";
|
otherSplices = final.generateSplicesForMkScope "nixDependencies2";
|
||||||
f = import ./packaging/dependencies.nix {
|
f = import ./packaging/dependencies.nix {
|
||||||
inherit inputs stdenv;
|
inherit inputs stdenv;
|
||||||
pkgs = final;
|
pkgs = final;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = final.nixComponents.nix-cli;
|
nix = final.nixComponents2.nix-cli;
|
||||||
|
|
||||||
# See https://github.com/NixOS/nixpkgs/pull/214409
|
# See https://github.com/NixOS/nixpkgs/pull/214409
|
||||||
# Remove when fixed in this flake's nixpkgs
|
# Remove when fixed in this flake's nixpkgs
|
||||||
|
@ -270,7 +272,7 @@
|
||||||
# memory leaks with detect_leaks=0.
|
# memory leaks with detect_leaks=0.
|
||||||
"" = rec {
|
"" = rec {
|
||||||
nixpkgs = nixpkgsFor.${system}.native;
|
nixpkgs = nixpkgsFor.${system}.native;
|
||||||
nixComponents = nixpkgs.nixComponents.overrideScope (
|
nixComponents = nixpkgs.nixComponents2.overrideScope (
|
||||||
nixCompFinal: nixCompPrev: {
|
nixCompFinal: nixCompPrev: {
|
||||||
mesonComponentOverrides = _finalAttrs: prevAttrs: {
|
mesonComponentOverrides = _finalAttrs: prevAttrs: {
|
||||||
mesonFlags =
|
mesonFlags =
|
||||||
|
@ -298,7 +300,7 @@
|
||||||
nixpkgsPrefix:
|
nixpkgsPrefix:
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixComponents ? nixpkgs.nixComponents,
|
nixComponents ? nixpkgs.nixComponents2,
|
||||||
}:
|
}:
|
||||||
flatMapAttrs nixComponents (
|
flatMapAttrs nixComponents (
|
||||||
pkgName: pkg:
|
pkgName: pkg:
|
||||||
|
@ -328,9 +330,9 @@
|
||||||
binaryTarball = self.hydraJobs.binaryTarball.${system};
|
binaryTarball = self.hydraJobs.binaryTarball.${system};
|
||||||
# TODO probably should be `nix-cli`
|
# TODO probably should be `nix-cli`
|
||||||
nix = self.packages.${system}.nix-everything;
|
nix = self.packages.${system}.nix-everything;
|
||||||
nix-manual = nixpkgsFor.${system}.native.nixComponents.nix-manual;
|
nix-manual = nixpkgsFor.${system}.native.nixComponents2.nix-manual;
|
||||||
nix-internal-api-docs = nixpkgsFor.${system}.native.nixComponents.nix-internal-api-docs;
|
nix-internal-api-docs = nixpkgsFor.${system}.native.nixComponents2.nix-internal-api-docs;
|
||||||
nix-external-api-docs = nixpkgsFor.${system}.native.nixComponents.nix-external-api-docs;
|
nix-external-api-docs = nixpkgsFor.${system}.native.nixComponents2.nix-external-api-docs;
|
||||||
|
|
||||||
fallbackPathsNix =
|
fallbackPathsNix =
|
||||||
let
|
let
|
||||||
|
@ -416,7 +418,7 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# These attributes go right into `packages.<system>`.
|
# These attributes go right into `packages.<system>`.
|
||||||
"${pkgName}" = nixpkgsFor.${system}.native.nixComponents.${pkgName};
|
"${pkgName}" = nixpkgsFor.${system}.native.nixComponents2.${pkgName};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs supportsCross (
|
// lib.optionalAttrs supportsCross (
|
||||||
flatMapAttrs (lib.genAttrs crossSystems (_: { })) (
|
flatMapAttrs (lib.genAttrs crossSystems (_: { })) (
|
||||||
|
@ -424,7 +426,7 @@
|
||||||
{ }:
|
{ }:
|
||||||
{
|
{
|
||||||
# These attributes go right into `packages.<system>`.
|
# These attributes go right into `packages.<system>`.
|
||||||
"${pkgName}-${crossSystem}" = nixpkgsFor.${system}.cross.${crossSystem}.nixComponents.${pkgName};
|
"${pkgName}-${crossSystem}" = nixpkgsFor.${system}.cross.${crossSystem}.nixComponents2.${pkgName};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -434,7 +436,7 @@
|
||||||
{
|
{
|
||||||
# These attributes go right into `packages.<system>`.
|
# These attributes go right into `packages.<system>`.
|
||||||
"${pkgName}-${stdenvName}" =
|
"${pkgName}-${stdenvName}" =
|
||||||
nixpkgsFor.${system}.nativeForStdenv.${stdenvName}.nixComponents.${pkgName};
|
nixpkgsFor.${system}.nativeForStdenv.${stdenvName}.nixComponents2.${pkgName};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -172,14 +172,14 @@
|
||||||
''^src/libfetchers/include/nix/fetchers/tarball\.hh$''
|
''^src/libfetchers/include/nix/fetchers/tarball\.hh$''
|
||||||
''^src/libfetchers/git\.cc$''
|
''^src/libfetchers/git\.cc$''
|
||||||
''^src/libfetchers/mercurial\.cc$''
|
''^src/libfetchers/mercurial\.cc$''
|
||||||
''^src/libflake/flake/config\.cc$''
|
''^src/libflake/config\.cc$''
|
||||||
''^src/libflake/flake/flake\.cc$''
|
''^src/libflake/flake\.cc$''
|
||||||
''^src/libflake/include/nix/flake/flake\.hh$''
|
''^src/libflake/include/nix/flake/flake\.hh$''
|
||||||
''^src/libflake/flake/flakeref\.cc$''
|
''^src/libflake/flakeref\.cc$''
|
||||||
''^src/libflake/include/nix/flake/flakeref\.hh$''
|
''^src/libflake/include/nix/flake/flakeref\.hh$''
|
||||||
''^src/libflake/flake/lockfile\.cc$''
|
''^src/libflake/lockfile\.cc$''
|
||||||
''^src/libflake/include/nix/flake/lockfile\.hh$''
|
''^src/libflake/include/nix/flake/lockfile\.hh$''
|
||||||
''^src/libflake/flake/url-name\.cc$''
|
''^src/libflake/url-name\.cc$''
|
||||||
''^src/libmain/common-args\.cc$''
|
''^src/libmain/common-args\.cc$''
|
||||||
''^src/libmain/include/nix/main/common-args\.hh$''
|
''^src/libmain/include/nix/main/common-args\.hh$''
|
||||||
''^src/libmain/loggers\.cc$''
|
''^src/libmain/loggers\.cc$''
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
pkgs.nixComponents.nix-util.overrideAttrs (
|
pkgs.nixComponents2.nix-util.overrideAttrs (
|
||||||
attrs:
|
attrs:
|
||||||
|
|
||||||
let
|
let
|
||||||
stdenv = pkgs.nixDependencies.stdenv;
|
stdenv = pkgs.nixDependencies2.stdenv;
|
||||||
buildCanExecuteHost = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
buildCanExecuteHost = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||||
modular = devFlake.getSystem stdenv.buildPlatform.system;
|
modular = devFlake.getSystem stdenv.buildPlatform.system;
|
||||||
transformFlag =
|
transformFlag =
|
||||||
|
@ -79,26 +79,26 @@ pkgs.nixComponents.nix-util.overrideAttrs (
|
||||||
};
|
};
|
||||||
|
|
||||||
mesonFlags =
|
mesonFlags =
|
||||||
map (transformFlag "libutil") (ignoreCrossFile pkgs.nixComponents.nix-util.mesonFlags)
|
map (transformFlag "libutil") (ignoreCrossFile pkgs.nixComponents2.nix-util.mesonFlags)
|
||||||
++ map (transformFlag "libstore") (ignoreCrossFile pkgs.nixComponents.nix-store.mesonFlags)
|
++ map (transformFlag "libstore") (ignoreCrossFile pkgs.nixComponents2.nix-store.mesonFlags)
|
||||||
++ map (transformFlag "libfetchers") (ignoreCrossFile pkgs.nixComponents.nix-fetchers.mesonFlags)
|
++ map (transformFlag "libfetchers") (ignoreCrossFile pkgs.nixComponents2.nix-fetchers.mesonFlags)
|
||||||
++ lib.optionals havePerl (
|
++ lib.optionals havePerl (
|
||||||
map (transformFlag "perl") (ignoreCrossFile pkgs.nixComponents.nix-perl-bindings.mesonFlags)
|
map (transformFlag "perl") (ignoreCrossFile pkgs.nixComponents2.nix-perl-bindings.mesonFlags)
|
||||||
)
|
)
|
||||||
++ map (transformFlag "libexpr") (ignoreCrossFile pkgs.nixComponents.nix-expr.mesonFlags)
|
++ map (transformFlag "libexpr") (ignoreCrossFile pkgs.nixComponents2.nix-expr.mesonFlags)
|
||||||
++ map (transformFlag "libcmd") (ignoreCrossFile pkgs.nixComponents.nix-cmd.mesonFlags);
|
++ map (transformFlag "libcmd") (ignoreCrossFile pkgs.nixComponents2.nix-cmd.mesonFlags);
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
attrs.nativeBuildInputs or [ ]
|
attrs.nativeBuildInputs or [ ]
|
||||||
++ pkgs.nixComponents.nix-util.nativeBuildInputs
|
++ pkgs.nixComponents2.nix-util.nativeBuildInputs
|
||||||
++ pkgs.nixComponents.nix-store.nativeBuildInputs
|
++ pkgs.nixComponents2.nix-store.nativeBuildInputs
|
||||||
++ pkgs.nixComponents.nix-fetchers.nativeBuildInputs
|
++ pkgs.nixComponents2.nix-fetchers.nativeBuildInputs
|
||||||
++ pkgs.nixComponents.nix-expr.nativeBuildInputs
|
++ pkgs.nixComponents2.nix-expr.nativeBuildInputs
|
||||||
++ lib.optionals havePerl pkgs.nixComponents.nix-perl-bindings.nativeBuildInputs
|
++ lib.optionals havePerl pkgs.nixComponents2.nix-perl-bindings.nativeBuildInputs
|
||||||
++ lib.optionals buildCanExecuteHost pkgs.nixComponents.nix-manual.externalNativeBuildInputs
|
++ lib.optionals buildCanExecuteHost pkgs.nixComponents2.nix-manual.externalNativeBuildInputs
|
||||||
++ pkgs.nixComponents.nix-internal-api-docs.nativeBuildInputs
|
++ pkgs.nixComponents2.nix-internal-api-docs.nativeBuildInputs
|
||||||
++ pkgs.nixComponents.nix-external-api-docs.nativeBuildInputs
|
++ pkgs.nixComponents2.nix-external-api-docs.nativeBuildInputs
|
||||||
++ pkgs.nixComponents.nix-functional-tests.externalNativeBuildInputs
|
++ pkgs.nixComponents2.nix-functional-tests.externalNativeBuildInputs
|
||||||
++ lib.optional (
|
++ lib.optional (
|
||||||
!buildCanExecuteHost
|
!buildCanExecuteHost
|
||||||
# Hack around https://github.com/nixos/nixpkgs/commit/bf7ad8cfbfa102a90463433e2c5027573b462479
|
# Hack around https://github.com/nixos/nixpkgs/commit/bf7ad8cfbfa102a90463433e2c5027573b462479
|
||||||
|
@ -123,14 +123,14 @@ pkgs.nixComponents.nix-util.overrideAttrs (
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
attrs.buildInputs or [ ]
|
attrs.buildInputs or [ ]
|
||||||
++ pkgs.nixComponents.nix-util.buildInputs
|
++ pkgs.nixComponents2.nix-util.buildInputs
|
||||||
++ pkgs.nixComponents.nix-store.buildInputs
|
++ pkgs.nixComponents2.nix-store.buildInputs
|
||||||
++ pkgs.nixComponents.nix-store-tests.externalBuildInputs
|
++ pkgs.nixComponents2.nix-store-tests.externalBuildInputs
|
||||||
++ pkgs.nixComponents.nix-fetchers.buildInputs
|
++ pkgs.nixComponents2.nix-fetchers.buildInputs
|
||||||
++ pkgs.nixComponents.nix-expr.buildInputs
|
++ pkgs.nixComponents2.nix-expr.buildInputs
|
||||||
++ pkgs.nixComponents.nix-expr.externalPropagatedBuildInputs
|
++ pkgs.nixComponents2.nix-expr.externalPropagatedBuildInputs
|
||||||
++ pkgs.nixComponents.nix-cmd.buildInputs
|
++ pkgs.nixComponents2.nix-cmd.buildInputs
|
||||||
++ lib.optionals havePerl pkgs.nixComponents.nix-perl-bindings.externalBuildInputs
|
++ lib.optionals havePerl pkgs.nixComponents2.nix-perl-bindings.externalBuildInputs
|
||||||
++ lib.optional havePerl pkgs.perl;
|
++ lib.optional havePerl pkgs.perl;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,14 +19,14 @@ let
|
||||||
|
|
||||||
testNixVersions =
|
testNixVersions =
|
||||||
pkgs: daemon:
|
pkgs: daemon:
|
||||||
pkgs.nixComponents.nix-functional-tests.override {
|
pkgs.nixComponents2.nix-functional-tests.override {
|
||||||
pname = "nix-daemon-compat-tests";
|
pname = "nix-daemon-compat-tests";
|
||||||
version = "${pkgs.nix.version}-with-daemon-${daemon.version}";
|
version = "${pkgs.nix.version}-with-daemon-${daemon.version}";
|
||||||
|
|
||||||
test-daemon = daemon;
|
test-daemon = daemon;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Technically we could just return `pkgs.nixComponents`, but for Hydra it's
|
# Technically we could just return `pkgs.nixComponents2`, but for Hydra it's
|
||||||
# convention to transpose it, and to transpose it efficiently, we need to
|
# convention to transpose it, and to transpose it efficiently, we need to
|
||||||
# enumerate them manually, so that we don't evaluate unnecessary package sets.
|
# enumerate them manually, so that we don't evaluate unnecessary package sets.
|
||||||
# See listingIsComplete below.
|
# See listingIsComplete below.
|
||||||
|
@ -85,7 +85,7 @@ in
|
||||||
} (_: null);
|
} (_: null);
|
||||||
actualPkgs = lib.concatMapAttrs (
|
actualPkgs = lib.concatMapAttrs (
|
||||||
k: v: if lib.strings.hasPrefix "nix-" k then { ${k} = null; } else { }
|
k: v: if lib.strings.hasPrefix "nix-" k then { ${k} = null; } else { }
|
||||||
) nixpkgsFor.${arbitrarySystem}.native.nixComponents;
|
) nixpkgsFor.${arbitrarySystem}.native.nixComponents2;
|
||||||
diff = lib.concatStringsSep "\n" (
|
diff = lib.concatStringsSep "\n" (
|
||||||
lib.concatLists (
|
lib.concatLists (
|
||||||
lib.mapAttrsToList (
|
lib.mapAttrsToList (
|
||||||
|
@ -111,7 +111,7 @@ in
|
||||||
|
|
||||||
# Binary package for various platforms.
|
# Binary package for various platforms.
|
||||||
build = forAllPackages (
|
build = forAllPackages (
|
||||||
pkgName: forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.${pkgName})
|
pkgName: forAllSystems (system: nixpkgsFor.${system}.native.nixComponents2.${pkgName})
|
||||||
);
|
);
|
||||||
|
|
||||||
shellInputs = removeAttrs (forAllSystems (
|
shellInputs = removeAttrs (forAllSystems (
|
||||||
|
@ -119,7 +119,7 @@ in
|
||||||
)) [ "i686-linux" ];
|
)) [ "i686-linux" ];
|
||||||
|
|
||||||
# Perl bindings for various platforms.
|
# Perl bindings for various platforms.
|
||||||
perlBindings = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.nix-perl-bindings);
|
perlBindings = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents2.nix-perl-bindings);
|
||||||
|
|
||||||
# Binary tarball for various platforms, containing a Nix store
|
# Binary tarball for various platforms, containing a Nix store
|
||||||
# with the closure of 'nix' package, and the second half of
|
# with the closure of 'nix' package, and the second half of
|
||||||
|
@ -145,13 +145,13 @@ in
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# Nix's manual
|
# Nix's manual
|
||||||
manual = nixpkgsFor.x86_64-linux.native.nixComponents.nix-manual;
|
manual = nixpkgsFor.x86_64-linux.native.nixComponents2.nix-manual;
|
||||||
|
|
||||||
# API docs for Nix's unstable internal C++ interfaces.
|
# API docs for Nix's unstable internal C++ interfaces.
|
||||||
internal-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents.nix-internal-api-docs;
|
internal-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents2.nix-internal-api-docs;
|
||||||
|
|
||||||
# API docs for Nix's C bindings.
|
# API docs for Nix's C bindings.
|
||||||
external-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents.nix-external-api-docs;
|
external-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents2.nix-external-api-docs;
|
||||||
|
|
||||||
# System tests.
|
# System tests.
|
||||||
tests =
|
tests =
|
||||||
|
|
|
@ -40,7 +40,7 @@ void completeFlakeInputAttrPath(
|
||||||
std::string_view prefix)
|
std::string_view prefix)
|
||||||
{
|
{
|
||||||
for (auto & flakeRef : flakeRefs) {
|
for (auto & flakeRef : flakeRefs) {
|
||||||
auto flake = flake::getFlake(*evalState, flakeRef, true);
|
auto flake = flake::getFlake(*evalState, flakeRef, fetchers::UseRegistries::All);
|
||||||
for (auto & input : flake.inputs)
|
for (auto & input : flake.inputs)
|
||||||
if (hasPrefix(input.first, prefix))
|
if (hasPrefix(input.first, prefix))
|
||||||
completions.add(input.first);
|
completions.add(input.first);
|
||||||
|
|
|
@ -90,7 +90,7 @@ std::string EvalSettings::resolvePseudoUrl(std::string_view url)
|
||||||
warnOnce(haveWarned,
|
warnOnce(haveWarned,
|
||||||
"Channels are deprecated in favor of flakes in Determinate Nix. "
|
"Channels are deprecated in favor of flakes in Determinate Nix. "
|
||||||
"Instead of '%s', use '%s'. "
|
"Instead of '%s', use '%s'. "
|
||||||
"For a guide on Nix flakes, see: https://zero-to-nix.com/. "
|
"See https://zero-to-nix.com for a guide to Nix flakes. "
|
||||||
"For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.",
|
"For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.",
|
||||||
url, realUrl);
|
url, realUrl);
|
||||||
return realUrl;
|
return realUrl;
|
||||||
|
|
|
@ -178,7 +178,7 @@ static void fetchTree(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.settings.pureEval && !input.isDirect())
|
if (!state.settings.pureEval && !input.isDirect())
|
||||||
input = lookupInRegistries(state.store, input).first;
|
input = lookupInRegistries(state.store, input, fetchers::UseRegistries::Limited).first;
|
||||||
|
|
||||||
if (state.settings.pureEval && !input.isLocked()) {
|
if (state.settings.pureEval && !input.isLocked()) {
|
||||||
if (input.getNarHash())
|
if (input.getNarHash())
|
||||||
|
|
|
@ -65,7 +65,11 @@ void overrideRegistry(
|
||||||
const Input & to,
|
const Input & to,
|
||||||
const Attrs & extraAttrs);
|
const Attrs & extraAttrs);
|
||||||
|
|
||||||
using RegistryFilter = std::function<bool(Registry::RegistryType)>;
|
enum class UseRegistries : int {
|
||||||
|
No,
|
||||||
|
All,
|
||||||
|
Limited, // global and flag registry only
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rewrite a flakeref using the registries. If `filter` is set, only
|
* Rewrite a flakeref using the registries. If `filter` is set, only
|
||||||
|
@ -74,6 +78,6 @@ using RegistryFilter = std::function<bool(Registry::RegistryType)>;
|
||||||
std::pair<Input, Attrs> lookupInRegistries(
|
std::pair<Input, Attrs> lookupInRegistries(
|
||||||
ref<Store> store,
|
ref<Store> store,
|
||||||
const Input & input,
|
const Input & input,
|
||||||
const RegistryFilter & filter = {});
|
UseRegistries useRegistries);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@ std::shared_ptr<Registry> Registry::read(
|
||||||
const Settings & settings,
|
const Settings & settings,
|
||||||
const Path & path, RegistryType type)
|
const Path & path, RegistryType type)
|
||||||
{
|
{
|
||||||
|
debug("reading registry '%s'", path);
|
||||||
|
|
||||||
auto registry = std::make_shared<Registry>(settings, type);
|
auto registry = std::make_shared<Registry>(settings, type);
|
||||||
|
|
||||||
if (!pathExists(path))
|
if (!pathExists(path))
|
||||||
|
@ -179,29 +181,36 @@ Registries getRegistries(const Settings & settings, ref<Store> store)
|
||||||
std::pair<Input, Attrs> lookupInRegistries(
|
std::pair<Input, Attrs> lookupInRegistries(
|
||||||
ref<Store> store,
|
ref<Store> store,
|
||||||
const Input & _input,
|
const Input & _input,
|
||||||
const RegistryFilter & filter)
|
UseRegistries useRegistries)
|
||||||
{
|
{
|
||||||
Attrs extraAttrs;
|
Attrs extraAttrs;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
Input input(_input);
|
Input input(_input);
|
||||||
|
|
||||||
|
if (useRegistries == UseRegistries::No)
|
||||||
|
return {input, extraAttrs};
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
if (n > 100) throw Error("cycle detected in flake registry for '%s'", input.to_string());
|
if (n > 100) throw Error("cycle detected in flake registry for '%s'", input.to_string());
|
||||||
|
|
||||||
for (auto & registry : getRegistries(*input.settings, store)) {
|
for (auto & registry : getRegistries(*input.settings, store)) {
|
||||||
if (filter && !filter(registry->type)) continue;
|
if (useRegistries == UseRegistries::Limited
|
||||||
|
&& !(registry->type == fetchers::Registry::Flag || registry->type == fetchers::Registry::Global))
|
||||||
|
continue;
|
||||||
// FIXME: O(n)
|
// FIXME: O(n)
|
||||||
for (auto & entry : registry->entries) {
|
for (auto & entry : registry->entries) {
|
||||||
if (entry.exact) {
|
if (entry.exact) {
|
||||||
if (entry.from == input) {
|
if (entry.from == input) {
|
||||||
|
debug("resolved flakeref '%s' against registry %d exactly", input.to_string(), registry->type);
|
||||||
input = entry.to;
|
input = entry.to;
|
||||||
extraAttrs = entry.extraAttrs;
|
extraAttrs = entry.extraAttrs;
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (entry.from.contains(input)) {
|
if (entry.from.contains(input)) {
|
||||||
|
debug("resolved flakeref '%s' against registry %d", input.to_string(), registry->type);
|
||||||
input = entry.to.applyOverrides(
|
input = entry.to.applyOverrides(
|
||||||
!entry.from.getRef() && input.getRef() ? input.getRef() : std::optional<std::string>(),
|
!entry.from.getRef() && input.getRef() ? input.getRef() : std::optional<std::string>(),
|
||||||
!entry.from.getRev() && input.getRev() ? input.getRev() : std::optional<Hash>());
|
!entry.from.getRev() && input.getRev() ? input.getRev() : std::optional<Hash>());
|
||||||
|
|
|
@ -46,7 +46,7 @@ static std::optional<FetchedFlake> lookupInFlakeCache(
|
||||||
static std::tuple<ref<SourceAccessor>, FlakeRef, FlakeRef> fetchOrSubstituteTree(
|
static std::tuple<ref<SourceAccessor>, FlakeRef, FlakeRef> fetchOrSubstituteTree(
|
||||||
EvalState & state,
|
EvalState & state,
|
||||||
const FlakeRef & originalRef,
|
const FlakeRef & originalRef,
|
||||||
bool useRegistries,
|
fetchers::UseRegistries useRegistries,
|
||||||
FlakeCache & flakeCache)
|
FlakeCache & flakeCache)
|
||||||
{
|
{
|
||||||
auto fetched = lookupInFlakeCache(flakeCache, originalRef);
|
auto fetched = lookupInFlakeCache(flakeCache, originalRef);
|
||||||
|
@ -57,14 +57,8 @@ static std::tuple<ref<SourceAccessor>, FlakeRef, FlakeRef> fetchOrSubstituteTree
|
||||||
auto [accessor, lockedRef] = originalRef.lazyFetch(state.store);
|
auto [accessor, lockedRef] = originalRef.lazyFetch(state.store);
|
||||||
fetched.emplace(FetchedFlake{.lockedRef = lockedRef, .accessor = accessor});
|
fetched.emplace(FetchedFlake{.lockedRef = lockedRef, .accessor = accessor});
|
||||||
} else {
|
} else {
|
||||||
if (useRegistries) {
|
if (useRegistries != fetchers::UseRegistries::No) {
|
||||||
resolvedRef = originalRef.resolve(
|
resolvedRef = originalRef.resolve(state.store, useRegistries);
|
||||||
state.store,
|
|
||||||
[](fetchers::Registry::RegistryType type) {
|
|
||||||
/* Only use the global registry and CLI flags
|
|
||||||
to resolve indirect flakerefs. */
|
|
||||||
return type == fetchers::Registry::Flag || type == fetchers::Registry::Global;
|
|
||||||
});
|
|
||||||
fetched = lookupInFlakeCache(flakeCache, originalRef);
|
fetched = lookupInFlakeCache(flakeCache, originalRef);
|
||||||
if (!fetched) {
|
if (!fetched) {
|
||||||
auto [accessor, lockedRef] = resolvedRef.lazyFetch(state.store);
|
auto [accessor, lockedRef] = resolvedRef.lazyFetch(state.store);
|
||||||
|
@ -399,7 +393,7 @@ static FlakeRef applySelfAttrs(
|
||||||
static Flake getFlake(
|
static Flake getFlake(
|
||||||
EvalState & state,
|
EvalState & state,
|
||||||
const FlakeRef & originalRef,
|
const FlakeRef & originalRef,
|
||||||
bool useRegistries,
|
fetchers::UseRegistries useRegistries,
|
||||||
FlakeCache & flakeCache,
|
FlakeCache & flakeCache,
|
||||||
const InputAttrPath & lockRootAttrPath)
|
const InputAttrPath & lockRootAttrPath)
|
||||||
{
|
{
|
||||||
|
@ -418,7 +412,7 @@ static Flake getFlake(
|
||||||
// FIXME: need to remove attrs that are invalidated by the changed input attrs, such as 'narHash'.
|
// FIXME: need to remove attrs that are invalidated by the changed input attrs, such as 'narHash'.
|
||||||
newLockedRef.input.attrs.erase("narHash");
|
newLockedRef.input.attrs.erase("narHash");
|
||||||
auto [accessor2, resolvedRef2, lockedRef2] = fetchOrSubstituteTree(
|
auto [accessor2, resolvedRef2, lockedRef2] = fetchOrSubstituteTree(
|
||||||
state, newLockedRef, false, flakeCache);
|
state, newLockedRef, fetchers::UseRegistries::No, flakeCache);
|
||||||
accessor = accessor2;
|
accessor = accessor2;
|
||||||
lockedRef = lockedRef2;
|
lockedRef = lockedRef2;
|
||||||
}
|
}
|
||||||
|
@ -430,7 +424,7 @@ static Flake getFlake(
|
||||||
return readFlake(state, originalRef, resolvedRef, lockedRef, state.storePath(storePath), lockRootAttrPath);
|
return readFlake(state, originalRef, resolvedRef, lockedRef, state.storePath(storePath), lockRootAttrPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
Flake getFlake(EvalState & state, const FlakeRef & originalRef, bool useRegistries)
|
Flake getFlake(EvalState & state, const FlakeRef & originalRef, fetchers::UseRegistries useRegistries)
|
||||||
{
|
{
|
||||||
FlakeCache flakeCache;
|
FlakeCache flakeCache;
|
||||||
return getFlake(state, originalRef, useRegistries, flakeCache, {});
|
return getFlake(state, originalRef, useRegistries, flakeCache, {});
|
||||||
|
@ -456,8 +450,15 @@ LockedFlake lockFlake(
|
||||||
FlakeCache flakeCache;
|
FlakeCache flakeCache;
|
||||||
|
|
||||||
auto useRegistries = lockFlags.useRegistries.value_or(settings.useRegistries);
|
auto useRegistries = lockFlags.useRegistries.value_or(settings.useRegistries);
|
||||||
|
auto useRegistriesTop = useRegistries ? fetchers::UseRegistries::All : fetchers::UseRegistries::No;
|
||||||
|
auto useRegistriesInputs = useRegistries ? fetchers::UseRegistries::Limited : fetchers::UseRegistries::No;
|
||||||
|
|
||||||
auto flake = getFlake(state, topRef, useRegistries, flakeCache, {});
|
auto flake = getFlake(
|
||||||
|
state,
|
||||||
|
topRef,
|
||||||
|
useRegistriesTop,
|
||||||
|
flakeCache,
|
||||||
|
{});
|
||||||
|
|
||||||
if (lockFlags.applyNixConfig) {
|
if (lockFlags.applyNixConfig) {
|
||||||
flake.config.apply(settings);
|
flake.config.apply(settings);
|
||||||
|
@ -632,7 +633,12 @@ LockedFlake lockFlake(
|
||||||
if (auto resolvedPath = resolveRelativePath()) {
|
if (auto resolvedPath = resolveRelativePath()) {
|
||||||
return readFlake(state, ref, ref, ref, *resolvedPath, inputAttrPath);
|
return readFlake(state, ref, ref, ref, *resolvedPath, inputAttrPath);
|
||||||
} else {
|
} else {
|
||||||
return getFlake(state, ref, useRegistries, flakeCache, inputAttrPath);
|
return getFlake(
|
||||||
|
state,
|
||||||
|
ref,
|
||||||
|
useRegistriesInputs,
|
||||||
|
flakeCache,
|
||||||
|
inputAttrPath);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -806,7 +812,7 @@ LockedFlake lockFlake(
|
||||||
return {*resolvedPath, *input.ref};
|
return {*resolvedPath, *input.ref};
|
||||||
} else {
|
} else {
|
||||||
auto [accessor, resolvedRef, lockedRef] = fetchOrSubstituteTree(
|
auto [accessor, resolvedRef, lockedRef] = fetchOrSubstituteTree(
|
||||||
state, *input.ref, useRegistries, flakeCache);
|
state, *input.ref, useRegistriesInputs, flakeCache);
|
||||||
|
|
||||||
warnRegistry(resolvedRef);
|
warnRegistry(resolvedRef);
|
||||||
|
|
||||||
|
@ -923,7 +929,10 @@ LockedFlake lockFlake(
|
||||||
repo, so we should re-read it. FIXME: we could
|
repo, so we should re-read it. FIXME: we could
|
||||||
also just clear the 'rev' field... */
|
also just clear the 'rev' field... */
|
||||||
auto prevLockedRef = flake.lockedRef;
|
auto prevLockedRef = flake.lockedRef;
|
||||||
flake = getFlake(state, topRef, useRegistries);
|
flake = getFlake(
|
||||||
|
state,
|
||||||
|
topRef,
|
||||||
|
useRegistriesTop);
|
||||||
|
|
||||||
if (lockFlags.commitLockFile &&
|
if (lockFlags.commitLockFile &&
|
||||||
flake.lockedRef.input.getRev() &&
|
flake.lockedRef.input.getRev() &&
|
|
@ -37,9 +37,9 @@ std::ostream & operator << (std::ostream & str, const FlakeRef & flakeRef)
|
||||||
|
|
||||||
FlakeRef FlakeRef::resolve(
|
FlakeRef FlakeRef::resolve(
|
||||||
ref<Store> store,
|
ref<Store> store,
|
||||||
const fetchers::RegistryFilter & filter) const
|
fetchers::UseRegistries useRegistries) const
|
||||||
{
|
{
|
||||||
auto [input2, extraAttrs] = lookupInRegistries(store, input, filter);
|
auto [input2, extraAttrs] = lookupInRegistries(store, input, useRegistries);
|
||||||
return FlakeRef(std::move(input2), fetchers::maybeGetStrAttr(extraAttrs, "dir").value_or(subdir));
|
return FlakeRef(std::move(input2), fetchers::maybeGetStrAttr(extraAttrs, "dir").value_or(subdir));
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ struct Flake
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Flake getFlake(EvalState & state, const FlakeRef & flakeRef, bool useRegistries);
|
Flake getFlake(EvalState & state, const FlakeRef & flakeRef, fetchers::UseRegistries useRegistries);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fingerprint of a locked flake; used as a cache key.
|
* Fingerprint of a locked flake; used as a cache key.
|
||||||
|
|
|
@ -65,7 +65,7 @@ struct FlakeRef
|
||||||
|
|
||||||
FlakeRef resolve(
|
FlakeRef resolve(
|
||||||
ref<Store> store,
|
ref<Store> store,
|
||||||
const fetchers::RegistryFilter & filter = {}) const;
|
fetchers::UseRegistries useRegistries = fetchers::UseRegistries::All) const;
|
||||||
|
|
||||||
static FlakeRef fromAttrs(
|
static FlakeRef fromAttrs(
|
||||||
const fetchers::Settings & fetchSettings,
|
const fetchers::Settings & fetchSettings,
|
||||||
|
|
|
@ -39,13 +39,13 @@ foreach header : [
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
'flake/config.cc',
|
'config.cc',
|
||||||
'flake/flake.cc',
|
'flake.cc',
|
||||||
'flake/flakeref.cc',
|
'flakeref.cc',
|
||||||
'flake/lockfile.cc',
|
'lockfile.cc',
|
||||||
'flake/flake-primops.cc',
|
'flake-primops.cc',
|
||||||
'flake/settings.cc',
|
'settings.cc',
|
||||||
'flake/url-name.cc',
|
'url-name.cc',
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('include/nix/flake')
|
subdir('include/nix/flake')
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <gmock/gmock.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "nix/util/file-content-address.hh"
|
#include "nix/util/file-content-address.hh"
|
||||||
|
@ -26,8 +27,11 @@ TEST(FileSerialisationMethod, testRoundTripPrintParse_2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FileSerialisationMethod, testParseFileSerialisationMethodOptException) {
|
TEST(FileSerialisationMethod, testParseFileSerialisationMethodOptException)
|
||||||
EXPECT_THROW(parseFileSerialisationMethod("narwhal"), UsageError);
|
{
|
||||||
|
EXPECT_THAT(
|
||||||
|
[]() { parseFileSerialisationMethod("narwhal"); },
|
||||||
|
testing::ThrowsMessage<UsageError>(testing::HasSubstr("narwhal")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
|
@ -54,8 +58,11 @@ TEST(FileIngestionMethod, testRoundTripPrintParse_2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FileIngestionMethod, testParseFileIngestionMethodOptException) {
|
TEST(FileIngestionMethod, testParseFileIngestionMethodOptException)
|
||||||
EXPECT_THROW(parseFileIngestionMethod("narwhal"), UsageError);
|
{
|
||||||
|
EXPECT_THAT(
|
||||||
|
[]() { parseFileIngestionMethod("narwhal"); },
|
||||||
|
testing::ThrowsMessage<UsageError>(testing::HasSubstr("narwhal")));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#ifndef _WIN32
|
||||||
|
|
||||||
# include "nix/util/util.hh"
|
# include "nix/util/util.hh"
|
||||||
# include "nix/util/monitor-fd.hh"
|
# include "nix/util/monitor-fd.hh"
|
||||||
|
|
||||||
|
@ -16,3 +18,5 @@ TEST(MonitorFdHup, shouldNotBlock)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -22,7 +22,7 @@ FileSerialisationMethod parseFileSerialisationMethod(std::string_view input)
|
||||||
if (ret)
|
if (ret)
|
||||||
return *ret;
|
return *ret;
|
||||||
else
|
else
|
||||||
throw UsageError("Unknown file serialiation method '%s', expect `flat` or `nar`");
|
throw UsageError("Unknown file serialiation method '%s', expect `flat` or `nar`", input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ FileIngestionMethod parseFileIngestionMethod(std::string_view input)
|
||||||
if (ret)
|
if (ret)
|
||||||
return static_cast<FileIngestionMethod>(*ret);
|
return static_cast<FileIngestionMethod>(*ret);
|
||||||
else
|
else
|
||||||
throw UsageError("Unknown file ingestion method '%s', expect `flat`, `nar`, or `git`");
|
throw UsageError("Unknown file ingestion method '%s', expect `flat`, `nar`, or `git`", input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ Path canonPath(PathView path, bool resolveSymlinks)
|
||||||
(std::string & result, std::string_view & remaining) {
|
(std::string & result, std::string_view & remaining) {
|
||||||
if (resolveSymlinks && fs::is_symlink(result)) {
|
if (resolveSymlinks && fs::is_symlink(result)) {
|
||||||
if (++followCount >= maxFollow)
|
if (++followCount >= maxFollow)
|
||||||
throw Error("infinite symlink recursion in path '%0%'", remaining);
|
throw Error("infinite symlink recursion in path '%1%'", remaining);
|
||||||
remaining = (temp = concatStrings(readLink(result), remaining));
|
remaining = (temp = concatStrings(readLink(result), remaining));
|
||||||
if (isAbsolute(remaining)) {
|
if (isAbsolute(remaining)) {
|
||||||
/* restart for symlinks pointing to absolute path */
|
/* restart for symlinks pointing to absolute path */
|
||||||
|
|
|
@ -134,7 +134,7 @@ void parseTree(
|
||||||
RawMode rawMode = std::stoi(perms, 0, 8);
|
RawMode rawMode = std::stoi(perms, 0, 8);
|
||||||
auto modeOpt = decodeMode(rawMode);
|
auto modeOpt = decodeMode(rawMode);
|
||||||
if (!modeOpt)
|
if (!modeOpt)
|
||||||
throw Error("Unknown Git permission: %o", perms);
|
throw Error("Unknown Git permission: %o", rawMode);
|
||||||
auto mode = std::move(*modeOpt);
|
auto mode = std::move(*modeOpt);
|
||||||
|
|
||||||
std::string name = getStringUntil(source, '\0');
|
std::string name = getStringUntil(source, '\0');
|
||||||
|
|
|
@ -202,6 +202,7 @@ static int childEntry(void * arg)
|
||||||
|
|
||||||
pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
|
pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
|
||||||
{
|
{
|
||||||
|
auto newLogger = makeSimpleLogger();
|
||||||
ChildWrapperFunction wrapper = [&] {
|
ChildWrapperFunction wrapper = [&] {
|
||||||
if (!options.allowVfork) {
|
if (!options.allowVfork) {
|
||||||
/* Set a simple logger, while releasing (not destroying)
|
/* Set a simple logger, while releasing (not destroying)
|
||||||
|
@ -210,7 +211,7 @@ pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
|
||||||
~ProgressBar() tries to join a thread that doesn't
|
~ProgressBar() tries to join a thread that doesn't
|
||||||
exist. */
|
exist. */
|
||||||
logger.release();
|
logger.release();
|
||||||
logger = makeSimpleLogger();
|
logger = std::move(newLogger);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
|
|
@ -166,7 +166,7 @@ static int main_nix_channel(int argc, char ** argv)
|
||||||
{
|
{
|
||||||
warn(
|
warn(
|
||||||
"nix-channel is deprecated in favor of flakes in Determinate Nix. \
|
"nix-channel is deprecated in favor of flakes in Determinate Nix. \
|
||||||
For a guide on Nix flakes, see: https://zero-to-nix.com/. \
|
See https://zero-to-nix.com for a guide to Nix flakes. \
|
||||||
For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.");
|
For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
mkMesonExecutable,
|
mkMesonExecutable,
|
||||||
|
|
||||||
|
@ -94,6 +95,11 @@ mkMesonExecutable (finalAttrs: {
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = lib.optionalString stdenv.hostPlatform.isStatic ''
|
||||||
|
mkdir -p $out/nix-support
|
||||||
|
echo "file binary-dist $out/bin/nix" >> $out/nix-support/hydra-build-products
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
mainProgram = "nix";
|
mainProgram = "nix";
|
||||||
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
||||||
|
|
|
@ -223,7 +223,7 @@ mv "$registry.tmp" "$registry"
|
||||||
# Ensure that locking ignores the user registry.
|
# Ensure that locking ignores the user registry.
|
||||||
mkdir -p "$TEST_HOME/.config/nix"
|
mkdir -p "$TEST_HOME/.config/nix"
|
||||||
ln -sfn "$registry" "$TEST_HOME/.config/nix/registry.json"
|
ln -sfn "$registry" "$TEST_HOME/.config/nix/registry.json"
|
||||||
nix flake metadata flake1
|
nix flake metadata --flake-registry '' flake1
|
||||||
expectStderr 1 nix flake update --flake-registry '' --flake "$flake3Dir" | grepQuiet "cannot find flake 'flake:flake1' in the flake registries"
|
expectStderr 1 nix flake update --flake-registry '' --flake "$flake3Dir" | grepQuiet "cannot find flake 'flake:flake1' in the flake registries"
|
||||||
rm "$TEST_HOME/.config/nix/registry.json"
|
rm "$TEST_HOME/.config/nix/registry.json"
|
||||||
|
|
||||||
|
@ -266,6 +266,7 @@ nix registry add user-flake2 "git+file://$percentEncodedFlake2Dir"
|
||||||
[[ $(nix --flake-registry "" registry list | wc -l) == 2 ]]
|
[[ $(nix --flake-registry "" registry list | wc -l) == 2 ]]
|
||||||
nix --flake-registry "" registry list | grepQuietInverse '^global' # nothing in global registry
|
nix --flake-registry "" registry list | grepQuietInverse '^global' # nothing in global registry
|
||||||
nix --flake-registry "" registry list | grepQuiet '^user'
|
nix --flake-registry "" registry list | grepQuiet '^user'
|
||||||
|
nix flake metadata --flake-registry "" user-flake1 | grepQuiet 'URL:.*flake1.*'
|
||||||
nix registry remove user-flake1
|
nix registry remove user-flake1
|
||||||
nix registry remove user-flake2
|
nix registry remove user-flake2
|
||||||
[[ $(nix registry list | wc -l) == 4 ]]
|
[[ $(nix registry list | wc -l) == 4 ]]
|
||||||
|
|
|
@ -31,7 +31,7 @@ let
|
||||||
nixpkgs.pkgs = nixpkgsFor.${system}.native;
|
nixpkgs.pkgs = nixpkgsFor.${system}.native;
|
||||||
nix.checkAllErrors = false;
|
nix.checkAllErrors = false;
|
||||||
# TODO: decide which packaging stage to use. `nix-cli` is efficient, but not the same as the user-facing `everything.nix` package (`default`). Perhaps a good compromise is `everything.nix` + `noTests` defined above?
|
# TODO: decide which packaging stage to use. `nix-cli` is efficient, but not the same as the user-facing `everything.nix` package (`default`). Perhaps a good compromise is `everything.nix` + `noTests` defined above?
|
||||||
nix.package = nixpkgsFor.${system}.native.nixComponents.nix-cli;
|
nix.package = nixpkgsFor.${system}.native.nixComponents2.nix-cli;
|
||||||
|
|
||||||
# Evaluate VMs faster
|
# Evaluate VMs faster
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
|
|
|
@ -49,11 +49,11 @@ in
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
|
||||||
cp -r ${pkgs.nixComponents.nix-functional-tests.src} nix
|
cp -r ${pkgs.nixComponents2.nix-functional-tests.src} nix
|
||||||
chmod -R +w nix
|
chmod -R +w nix
|
||||||
|
|
||||||
chmod u+w nix/.version
|
chmod u+w nix/.version
|
||||||
echo ${pkgs.nixComponents.version} > nix/.version
|
echo ${pkgs.nixComponents2.version} > nix/.version
|
||||||
|
|
||||||
export isTestOnNixOS=1
|
export isTestOnNixOS=1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue