From 50ff833cd80058c16c846f934dcb591b49eb8046 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Fri, 8 Nov 2024 19:06:07 +0100 Subject: [PATCH] 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"; }; --- doc/doc-support/package.nix | 5 +++-- nixos/doc/manual/shell.nix | 2 +- .../nix/web-devmode.nix => by-name/de/devmode/package.nix} | 0 3 files changed, 4 insertions(+), 3 deletions(-) rename pkgs/{tools/nix/web-devmode.nix => by-name/de/devmode/package.nix} (100%) diff --git a/doc/doc-support/package.nix b/doc/doc-support/package.nix index 5a86f4d220d9..e763f82efd7c 100644 --- a/doc/doc-support/package.nix +++ b/doc/doc-support/package.nix @@ -5,6 +5,7 @@ lib, stdenvNoCC, callPackage, + devmode, mkShellNoCC, documentation-highlighter, nixos-render-docs, @@ -98,12 +99,12 @@ stdenvNoCC.mkDerivation ( shell = let - devmode = callPackage ../../pkgs/tools/nix/web-devmode.nix { + devmode' = devmode.override { buildArgs = "./."; open = "/share/doc/nixpkgs/manual.html"; }; in - mkShellNoCC { packages = [ devmode ]; }; + mkShellNoCC { packages = [ devmode' ]; }; tests.manpage-urls = callPackage ../tests/manpage-urls.nix { }; }; diff --git a/nixos/doc/manual/shell.nix b/nixos/doc/manual/shell.nix index 1262fdc5583f..aeec93118fc0 100644 --- a/nixos/doc/manual/shell.nix +++ b/nixos/doc/manual/shell.nix @@ -6,7 +6,7 @@ let common = import ./common.nix; inherit (common) outputPath indexPath; - devmode = pkgs.callPackage ../../../pkgs/tools/nix/web-devmode.nix { + devmode = pkgs.devmode.override { buildArgs = "../../release.nix -A manualHTML.${builtins.currentSystem}"; open = "/${outputPath}/${indexPath}"; }; diff --git a/pkgs/tools/nix/web-devmode.nix b/pkgs/by-name/de/devmode/package.nix similarity index 100% rename from pkgs/tools/nix/web-devmode.nix rename to pkgs/by-name/de/devmode/package.nix