-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build manual with Meson #11224
base: master
Are you sure you want to change the base?
Build manual with Meson #11224
Conversation
What does this change compared to the other PRs? Wish GitHub supported dependencies in PRs natively. |
@L-as Edited the description to be precise about it. |
036f9ac
to
b79c558
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof, this sounds like a bug? Do meson or ninja have an issue about this we can follow?
assert '\\' not in path | ||
assert ' ' not in path | ||
assert '#' not in path | ||
print("ignored:", path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does ignored
mean?
doc/manual/json-to-tree.py
Outdated
This script is a helper for this project's Meson buildsystem, to replace its | ||
usage of `nix eval --write-to`. Writing a JSON object as a nested directory | ||
tree is more generic, easier to maintain, and far, far less cursed. Nix | ||
has 'good' support for JSON output. Let's just use it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a motivation for a change, not actual documentation of what it does. Also not sure what curses have to do with this.
What is the file format and the result? Could you give an example so contributors can easily form an intuition for this program?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought: is this a File System Object?
]; | ||
|
||
# Hack for sake of the dev shell | ||
passthru.baseNativeBuildInputs = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passthru.baseNativeBuildInputs = [ | |
passthru.externalNativeBuildInputs = [ |
This seems to be the defining feature, and what we want to have in the dev shell.
I can imagine an exception where we have an infrequently changed custom development tool that's actually local, but want to treat it as external for practicality, but we can revisit the name when we get there, and that's actually about the dev shell and not about this attribute anyway, so let's go with external
for the package attribute?
jq | ||
]; | ||
|
||
nativeBuildInputs = finalAttrs.passthru.baseNativeBuildInputs ++ [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: This could be factored out into mkMesonDerivation
, or one of its layers, or maybe it should be called mkNixMesonDerivation
or something because it's getting a bit specific.
src/libcmd/repl.cc
Outdated
if (runNixPtr) | ||
(*runNixPtr)(program, args, input); | ||
else | ||
throw Error("Cannot run '%s', no method of calling the Nix CLI provided", program); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw Error("Cannot run '%s', no method of calling the Nix CLI provided", program); | |
throw Error("Cannot run '%s' because no method of calling the Nix CLI was provided. This is a configuration problem pertaining to how this program was built. See Nix 2.25 release notes.", program); |
- pet peeve: unidiomatic use of comma
- let's give some context
Ideally we could be more specific and give a URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also use a semicolon to keep the brevity
src/nix/meson.build
Outdated
subdir('scripts') | ||
subdir('misc') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like these dependencies to be inverted if possible. I don't think the CLI build should be the final do-it-all derivation, because it means that changing these configs requires a CLI rebuild, making those files unnecessarily slow to iterate on.
src/nix/self-exe.cc
Outdated
if (auto envOpt = getEnvNonEmpty("NIX_BIN_DIR")) | ||
return fs::path{*envOpt} / std::string{getBinaryName()}; | ||
|
||
// Use some-times avaiable OS tricks to get to the path of this Nix, and try that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Use some-times avaiable OS tricks to get to the path of this Nix, and try that | |
// Try OS tricks if available |
src/nix/self-exe.hh
Outdated
* Instead, we'll query the OS for the path to the current executable, | ||
* using `getSelfExe()`. | ||
* | ||
* As a last resort, we resort to `PATH`. Hopefully we find a `nix` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* As a last resort, we resort to `PATH`. Hopefully we find a `nix` | |
* As a last resort, we rely on `PATH`. Hopefully we find a `nix` |
tests/functional/meson.build
Outdated
'PS4': '+(${BASH_SOURCE[0]-$0}:$LINENO) ', | ||
}, | ||
# some tests take 15+ seconds even on an otherwise idle machine, on a loaded machine | ||
# this can easily drive them to failure. give them more time, 5min rather than 30sec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# this can easily drive them to failure. give them more time, 5min rather than 30sec | |
# this can easily drive them to failure. give them more time than the default 30sec |
Bitrot-proofing the comment.
b79c558
to
496a558
Compare
🎉 All dependencies have been resolved ! |
7688ec6
to
535f68a
Compare
🎉 All dependencies have been resolved ! |
535f68a
to
eb03773
Compare
Co-Authored-By: Qyriad <qyriad@qyriad.me> Co-Authored-By: eldritch horrors <pennae@lix.systems>
aad71b9
to
3f776da
Compare
Added the commit that @haenoe contributed, thanks! |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-09-18-nix-team-meeting-minutes-179/52361/1 |
Oh lovely, I don't think I got that eval error locally with Nix 2.18. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-10-02-nix-team-meeting-minutes-183/53815/1 |
fileset was triggering a Nix bug … while calling '_singleton' at /nix/store/7sprarsdfz9qcd7859phvr9nvhi14mri-source/lib/fileset/internal.nix:234:16: 233| # Type: Path -> fileset 234| _singleton = path: | ^ 235| let … while evaluating a branch condition at /nix/store/7sprarsdfz9qcd7859phvr9nvhi14mri-source/lib/fileset/internal.nix:238:5: 237| in 238| if type == "directory" then | ^ 239| _create path type … while calling the 'readFileType' builtin at /nix/store/7sprarsdfz9qcd7859phvr9nvhi14mri-source/lib/fileset/internal.nix:236:14: 235| let 236| type = pathType path; | ^ 237| in error: path '/nix/store/jviva9w5s7s71lfyrl287a5m2bc9hv6k-source/src/nix-manual' is a symlink
This also fixes the inclusion of conf-file-prefix.md, as that would otherwise not appear in the confused meson build.
Motivation
Meson for:
doc/manual
scripts
misc
Context
#2503
Depends on #11073
Depends on #11302
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.