nixpkgs/nixos/doc/manual/shell.nix
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

17 lines
393 B
Nix

let
pkgs = import ../../.. {
config = { };
overlays = [ ];
};
common = import ./common.nix;
inherit (common) outputPath indexPath;
devmode = pkgs.callPackage ../../../pkgs/tools/nix/web-devmode.nix {
buildArgs = "../../release.nix -A manualHTML.${builtins.currentSystem}";
open = "/${outputPath}/${indexPath}";
};
in
pkgs.mkShellNoCC {
packages = [ devmode ];
}