From c36d0676033d84828ca06628ce5750d3b916a6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20VINCENT?= <44554692+comejv@users.noreply.github.com> Date: Wed, 27 Aug 2025 11:52:07 -0400 Subject: [PATCH] tools/nix: move nix flakes to tools/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit moves the flake.lock and flake.nix files from root and Documentation/ to the tools/ directory, according to @anchao's suggestion in PR #16763. Updates documentation to reflect this change. Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com> --- Documentation/guides/nix_flake.rst | 6 +++--- {Documentation => tools/nix/doc}/flake.lock | 0 {Documentation => tools/nix/doc}/flake.nix | 3 +++ flake.lock => tools/nix/flake.lock | 4 ++-- flake.nix => tools/nix/flake.nix | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) rename {Documentation => tools/nix/doc}/flake.lock (100%) rename {Documentation => tools/nix/doc}/flake.nix (94%) rename flake.lock => tools/nix/flake.lock (96%) rename flake.nix => tools/nix/flake.nix (96%) diff --git a/Documentation/guides/nix_flake.rst b/Documentation/guides/nix_flake.rst index 3fb8a63e5c..1b728f1341 100644 --- a/Documentation/guides/nix_flake.rst +++ b/Documentation/guides/nix_flake.rst @@ -22,7 +22,7 @@ the NuttX directory and run: .. code-block:: bash - nix develop + nix develop ./tools/nix This command will: @@ -50,7 +50,7 @@ To enter the documentation shell, run: .. code-block:: bash - nix develop .#docs + nix develop ./tools/nix#docs This command will: @@ -74,7 +74,7 @@ Example usage: .. code-block:: bash - # Build HTML docs + # Build HTML docs (has to but run in Documentation/ directory) make html See the :doc:`/contributing/documentation` guide for more details. diff --git a/Documentation/flake.lock b/tools/nix/doc/flake.lock similarity index 100% rename from Documentation/flake.lock rename to tools/nix/doc/flake.lock diff --git a/Documentation/flake.nix b/tools/nix/doc/flake.nix similarity index 94% rename from Documentation/flake.nix rename to tools/nix/doc/flake.nix index 659174d7d0..a33e5bc9ec 100644 --- a/Documentation/flake.nix +++ b/tools/nix/doc/flake.nix @@ -72,6 +72,9 @@ { devShells.${system}.default = pkgs.mkShell { buildInputs = [ nuttx-doc-py-env ]; + shellHook = '' + echo "Welcome to NuttX documentation devShell" + ''; }; }; } diff --git a/flake.lock b/tools/nix/flake.lock similarity index 96% rename from flake.lock rename to tools/nix/flake.lock index 26ab4e5ba8..65ac1342e8 100644 --- a/flake.lock +++ b/tools/nix/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "path": "./Documentation", + "path": "./doc/", "type": "path" }, "original": { - "path": "./Documentation", + "path": "./doc/", "type": "path" }, "parent": [] diff --git a/flake.nix b/tools/nix/flake.nix similarity index 96% rename from flake.nix rename to tools/nix/flake.nix index 8dd08be477..38f4c54282 100644 --- a/flake.nix +++ b/tools/nix/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; - documentation.url = "path:./Documentation"; + documentation.url = "path:./doc/"; }; outputs =