2 Jan 2025 |
| Oluwapelumi Adeosun joined the room. | 10:16:01 |
| error_pro joined the room. | 10:44:29 |
3 Jan 2025 |
| elikoga changed their display name from elikoga (@38c3 š488{0,1,9}) to elikoga. | 10:28:01 |
4 Jan 2025 |
| @kranzes:matrix.org left the room. | 15:30:41 |
7 Jan 2025 |
| @ruroruro:matrix.org left the room. | 03:43:11 |
allrealmsoflife | Hello,
I'm trying to build the Nix manual following the instructions here: https://nix.dev/manual/nix/2.25/development/documentation.
I have a few questions about the process:
-
Where should I run the build command?
For example, do I need to be in a specific directory for the commands to work correctly?
-
Issues with nix-build output:
When I run the following command in the src/nix directory:
nix-build -E '(import ./.).packages.${builtins.currentSystem}.nix.doc'
It generates a result directory, but it does not contain the expected index.html in a path like ./result-doc/share/doc/nix/manual/index.html . Instead, I see several subdirectories with their own index.html files. Additionally, there is no
result-doc directory, only result . Is this the intended behavior?
-
Error with nix build :
When I try to use the newer command:
nix build .#nix^doc
I get the following error:
error: derivation '/nix/store/91q76nmlb2aharvh227hlgv6xq78610m-nix-2.26.0pre20250102_442a262.drv'
does not have wanted outputs 'doc'
Could you clarify what might be going wrong or what adjustments I need to make? Thank you for your help!
| 08:39:56 |
allrealmsoflife | Also when I try the third option, enter the development shell, and run:
[nix-shell:~/src/nix]$ make manual-html-open -j $NIX_BUILD_CORES
make: *** No rule to make target 'manual-html-open'. Stop.
| 09:15:40 |
fricklerhandwerk | Hey allrealmsoflife! Thanks for sharing feedback. | 15:07:09 |
fricklerhandwerk |
- The Nix expression for
nix-build is meant relative to the repo root, so you have to run it from there.
How all this works is not optimal, and thatās one reason I have rather strong opinions about the flakes complex⦠| 15:08:45 |
fricklerhandwerk |
- This is probably an artefact in the documentation prose. The command is expected to produce
result . Iām confused why thereās no obvious entry point and will check when Iām back at the keyboard
| 15:10:43 |
fricklerhandwerk |
- The instructions are outdated, flake.nix has been refactored apparently.
Iām not even sure thereās a meaningful new-CLI way to do the same thing as with nix-build , but probably Iām wrong and not well-educated on the recently updated build setup and thereās a quick fix to make it nice. | 15:15:04 |
fricklerhandwerk | In reply to @allrealmsoflife:matrix.org
Also when I try the third option, enter the development shell, and run:
[nix-shell:~/src/nix]$ make manual-html-open -j $NIX_BUILD_CORES
make: *** No rule to make target 'manual-html-open'. Stop.
Make has been decommissioned in favor of Meson, that part can be removed from the instructions. | 15:16:05 |
fricklerhandwerk | I wonāt be able to make time to address this myself, so Iād greatly appreciate PRs to iron out these kinks and will review and merge them when I find a few quiet minutes | 15:18:21 |
fricklerhandwerk | * I wonāt be able to make time to address this myself in the next couple of weeks at the very least, so Iād greatly appreciate PRs to iron out these kinks and will review and merge them when I find a few quiet minutes | 15:18:45 |
allrealmsoflife | Okay, I built it. I do nix --version to get the version number and add that to the flake command: nix build nix/2.24.11\#nix^doc . Otherwise just the #nix^doc it won't work. One way to grab the version inside the command: nix build nix/$(nix --version | awk '{print $3}')#nix^doc
Now the flake command builds the result-doc while the nix-build command builds the result directories. Both results do have the index.html within the ./result-doc/share/doc/nix/manual/index.html or ./result/share/doc/nix/manual/index.html .
| 17:31:05 |
allrealmsoflife | * Okay, I built it. I do nix --version to get the version number and add that to the flake command: nix build nix/2.24.11#nix^doc. Otherwise just the #nix^docit won't work. One way to grab the version inside the command: nix build nix/$(nix --version | awk '{print $3}')#nix^doc`
Now the flake command builds the result-doc while the nix-build command builds the result directories. Both results do have the index.html within the ./result-doc/share/doc/nix/manual/index.html or ./result/share/doc/nix/manual/index.html .
| 17:31:27 |
allrealmsoflife | * Okay, I built it. I do nix --version to get the version number and add that to the flake command:
nix build nix/2.24.11#nix^doc
Otherwise just the #nix^doc it won't work. One way to grab the version inside the command:
nix build nix/$(nix --version | awk '{print $3}')#nix^doc\
Now the flake command builds the result-doc while the nix-build command builds the result directories. Both results do have the index.html within the ./result-doc/share/doc/nix/manual/index.html or ./result/share/doc/nix/manual/index.html .
| 17:32:05 |
allrealmsoflife | * Okay, I built it. I do nix --version to get the version number and add that to the flake command:
nix build nix/2.24.11#nix^doc
Otherwise just the #nix^doc it won't work. One way to grab the version inside the command:
nix build nix/$(nix --version | awk '{print $3}')#nix^doc\
Now the flake command builds the result-doc while the nix-build command builds the result directories. Both results do have the index.html within the ./result-doc/share/doc/nix/manual/index.html or ./result/share/doc/nix/manual/index.html .
| 17:32:43 |
allrealmsoflife | * Okay, I built it. I do nix --version to get the version number and add that to the flake command:
nix build nix/2.24.11#nix^doc
Otherwise just the #nix^doc it won't work. One way to grab the version inside the command:
nix build nix/$(nix --version | awk '{print $3}')#nix^doc
Now the flake command builds the result-doc while the nix-build command builds the result directories. Both results do have the index.html within the ./result-doc/share/doc/nix/manual/index.html or ./result/share/doc/nix/manual/index.html .
| 17:33:18 |
fricklerhandwerk | Hm, but does that build from the working directory? Why does one have to specify the version? | 17:40:29 |
allrealmsoflife | it says:
⯠nix build .#nix^doc
error: derivation '/nix/store/hddqxzfqgx2fhj8q66ss3idym7pk7aj1-nix-2.26.0pre20250107_383ab87.drv' does not have wanted outputs 'doc'
Is it missing in the flake? the nix^doc as output? I'll check
| 17:43:06 |
fricklerhandwerk | In reply to @allrealmsoflife:matrix.org
it says:
⯠nix build .#nix^doc
error: derivation '/nix/store/hddqxzfqgx2fhj8q66ss3idym7pk7aj1-nix-2.26.0pre20250107_383ab87.drv' does not have wanted outputs 'doc'
Is it missing in the flake? the nix^doc as output? I'll check
Yeah it must be missing in the flake | 18:09:28 |
allrealmsoflife | Simply running nix build .#nix-manual generates two outputs:
result : Contains the HTML manual, located at ./result/share/doc/nix/manual/index.html .
result-man : Contains the compressed man pages, located in ./result-man/man1/*.gz .
Perhaps nix^doc was used in the past, but .#nix-manual is the correct output now.
| 21:00:51 |
allrealmsoflife | * Simply running nix build .#nix-manual generates two outputs:
result : Contains the HTML manual.
result-man : Contains the compressed man pages.
Perhaps nix^doc was used in the past, but .#nix-manual is the correct output now.
| 21:02:22 |
allrealmsoflife | * Simply running nix build .#nix-manual generates two outputs:
result: Contains the HTML manual.
result-man: Contains the compressed man pages.
Perhaps nix^doc was used in the past, but .#nix-manual is the correct output now.
| 21:06:11 |
allrealmsoflife | * Simply running nix build .#nix-manual generates two outputs:
result: Contains the HTML manual.
result-man: Contains the compressed man pages.
| 21:07:24 |
fricklerhandwerk | In reply to @allrealmsoflife:matrix.org Simply running nix build .#nix-manual generates two outputs: result: Contains the HTML manual. result-man: Contains the compressed man pages. Ah, cool. Thanks for investigating! PR appreciated | 21:44:44 |
8 Jan 2025 |
allrealmsoflife | Interesting, the nix^doc command does work in the nixpkgs root directory where it generates then the NixOS manual. I'm making a pr though | 08:18:16 |
fricklerhandwerk | In reply to @allrealmsoflife:matrix.org Interesting, the nix^doc command does work in the nixpkgs root directory where it generates then the NixOS manual. I'm making a pr though You mean cd nixpkgs; nix build .#nix^doc ? This is because the change to Nix's flake.nix isn't in Nixpkgs yet (2.24 in Nixpkgs vs 2.25 on master) | 08:43:57 |
fricklerhandwerk | In reply to @allrealmsoflife:matrix.org Interesting, the nix^doc command does work in the nixpkgs root directory where it generates then the NixOS manual. I'm making a pr though * You mean cd nixpkgs; nix build .#nix^doc ? This is because the change to Nix's flake.nix isn't in Nixpkgs yet (2.24 in Nixpkgs vs 2.25 on Nix master) | 08:43:59 |