Commit graph

13 commits

Author SHA1 Message Date
Pol Dellaiera
47f000d991 doc: add missing phase hooks 2025-04-21 07:02:49 +02:00
Pol Dellaiera
58cdd4e315 {nixpkgs-manual, nixos-manual}: add new test check-nix-code-blocks 2025-04-17 01:30:34 +02:00
Valentin Gagarin
61235d4471 docs: fix devmode for manuals
hard-coding a relative path will use the calling process's working
directory, but we want the path relative to the Nix expression.
2025-01-24 18:05:03 +01:00
Emily
2eae7d63e2 nixpkgs-manual: avoid lib.fileset
I don’t love this, and I’m not convinced it doesn’t have the
same pitfalls as filesets, but see the `flattenReferencesGraph`
commit for reasoning.

It may be better to ban the relevant builtins entirely and just move
things into subdirectories when needed, but I didn’t want to do
more surgery to this part of the tree than necessary to solve the
immediate problem.
2024-12-31 02:30:18 +00:00
Priyanshu Tripathi
836d207c6c
nixos-render-docs-redirects: init (#357383)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-11-29 15:03:08 +01:00
GetPsyched
5b8a714968 nixos-render-docs: init redirects system
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-11-15 14:09:21 +01:00
Valentin Gagarin
50ff833cd8 devmode: move to pkgs/by-name
now one can use `devmode` from anywhere Nixpkgs is available:

    devmode = pkgs.devmode.override {
      buildArgs = toString ./.;
      open = "/index.html";
    };
2024-11-12 10:16:58 +01:00
Valentin Gagarin
b94f54b7a0 devmode: make reusable
the `devmode` helper made for the Nixpkgs/NixOS manual was exposed wrapped
in `mkShell`, which made it impossible to reuse.

this change strips that wrapper and reproduces it at the call site.

now one can use `devmode` from anywhere Nixpkgs is available:

    devmode = pkgs.callPackage "${pkgs.path}/pkgs/tools/nix/web-devmode.nix" {
      buildArgs = toString ./.;
      open = "/index.html";
    };
2024-11-12 10:16:58 +01:00
Philip Taron
587f64a264
nixpkgs-manual: use injected revision only
`lib.trivial.revisionWithDefault` will change with every Git commit, which causes the manual to be rebuilt on every since PR.

Using `nixpkgs.rev` (or the dummy value "master" if it's not present) means that the manual will contain the revision if built on Hydra, but will not otherwise.

Why?

1. https://hydra.nixos.org/jobset/nixos/trunk-combined#tabs-configuration shows that `pkgs/top-level/release.nix` is passed the `nixpkgs` attrset, which is a "Git checkout".
2. Git checkouts come from [`builtins.fetchGit`](https://nix.dev/manual/nix/2.18/language/builtins#builtins-fetchGit) and include the `rev` attribute.
3. The `rev` attribute is what `lib.trivial.revisionWithDefault` would have returned.

So, using `nixpkgs.rev or "master"` exclusively will cause the rebuilds on every commit to cease, but will allow "official" nixpkgs manual built on Hydra to continue to reference a specific commit.
2024-07-29 11:29:15 -07:00
Philip Taron
b846df0a2e
nixpkgs-manual: inline common.nix 2024-07-26 13:46:13 -07:00
Philip Taron
eaa7811104
nixpkgs-manual: move shell to package 2024-07-26 13:46:12 -07:00
Philip Taron
b5dc82844f
nixpkgs-manual: init 2024-07-26 13:46:12 -07:00
Philip Taron
4252286f21
doc: extract nixpkgs-manual into its own package
Also, use `finalAttrs` style and pass through all the helper derivations.
2024-07-26 13:44:04 -07:00