Commit Graph

7 Commits

Author SHA1 Message Date
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