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

21 lines
573 B
Nix

let
pkgs = import ../../.. {
config = { };
overlays = [ ];
};
common = import ./common.nix;
inherit (common) outputPath indexPath;
devmode = pkgs.devmode.override {
buildArgs = ''${toString ../../release.nix} -A manualHTML.${builtins.currentSystem}'';
open = "/${outputPath}/${indexPath}";
};
nixos-render-docs-redirects = pkgs.writeShellScriptBin "redirects" "${pkgs.lib.getExe pkgs.nixos-render-docs-redirects} --file ${toString ./redirects.json} $@";
in
pkgs.mkShellNoCC {
packages = [
devmode
nixos-render-docs-redirects
];
}