diff --git a/.mergify.yml b/.mergify.yml index e134b0f46d2..36ffe6e8b91 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -128,3 +128,14 @@ pull_request_rules: labels: - automatic backport - merge-queue + + - name: backport patches to 2.28 + conditions: + - label=backport 2.28-maintenance + actions: + backport: + branches: + - "2.28-maintenance" + labels: + - automatic backport + - merge-queue diff --git a/doc/manual/source/development/testing.md b/doc/manual/source/development/testing.md index d0c3a1c784e..ebc0e27d2d4 100644 --- a/doc/manual/source/development/testing.md +++ b/doc/manual/source/development/testing.md @@ -31,7 +31,7 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks. > ├── libexpr > │ ├── meson.build > │ ├── value/context.hh -> │ ├── value/context.cc +> │ ├── include/nix/value/context.cc > │ … > │ > ├── tests @@ -46,8 +46,12 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks. > │ │ > │ ├── libexpr-test-support > │ │ ├── meson.build +> │ │ ├── include/nix +> │ │ │ ├── meson.build +> │ │ │ └── tests +> │ │ │ ├── value/context.hh +> │ │ │ … > │ │ └── tests -> │ │ ├── value/context.hh > │ │ ├── value/context.cc > │ │ … > │ │ @@ -59,7 +63,7 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks. > ``` The tests for each Nix library (`libnixexpr`, `libnixstore`, etc..) live inside a directory `src/${library_name_without-nix}-test`. -Given an interface (header) and implementation pair in the original library, say, `src/libexpr/value/context.{hh,cc}`, we write tests for it in `src/libexpr-tests/value/context.cc`, and (possibly) declare/define additional interfaces for testing purposes in `src/libexpr-test-support/tests/value/context.{hh,cc}`. +Given an interface (header) and implementation pair in the original library, say, `src/libexpr/include/nix/value/context.hh` and `src/libexpr/value/context.cc`, we write tests for it in `src/libexpr-tests/value/context.cc`, and (possibly) declare/define additional interfaces for testing purposes in `src/libexpr-test-support/include/nix/tests/value/context.hh` and `src/libexpr-test-support/tests/value/context.cc`. Data for unit tests is stored in a `data` subdir of the directory for each unit test executable. For example, `libnixstore` code is in `src/libstore`, and its test data is in `src/libstore-tests/data`. @@ -67,7 +71,7 @@ The path to the `src/${library_name_without-nix}-test/data` directory is passed Note that each executable only gets the data for its tests. The unit test libraries are in `src/${library_name_without-nix}-test-support`. -All headers are in a `tests` subdirectory so they are included with `#include "tests/"`. +All headers are in a `tests` subdirectory so they are included with `#include "nix/tests/"`. The use of all these separate directories for the unit tests might seem inconvenient, as for example the tests are not "right next to" the part of the code they are testing. But organizing the tests this way has one big benefit: diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index 4c75df24608..87dc1e18a04 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -84,340 +84,340 @@ ''^precompiled-headers\.h$'' ''^src/build-remote/build-remote\.cc$'' ''^src/libcmd/built-path\.cc$'' - ''^src/libcmd/built-path\.hh$'' + ''^src/libcmd/include/nix/built-path\.hh$'' ''^src/libcmd/common-eval-args\.cc$'' - ''^src/libcmd/common-eval-args\.hh$'' + ''^src/libcmd/include/nix/common-eval-args\.hh$'' ''^src/libcmd/editor-for\.cc$'' ''^src/libcmd/installable-attr-path\.cc$'' - ''^src/libcmd/installable-attr-path\.hh$'' + ''^src/libcmd/include/nix/installable-attr-path\.hh$'' ''^src/libcmd/installable-derived-path\.cc$'' - ''^src/libcmd/installable-derived-path\.hh$'' + ''^src/libcmd/include/nix/installable-derived-path\.hh$'' ''^src/libcmd/installable-flake\.cc$'' - ''^src/libcmd/installable-flake\.hh$'' + ''^src/libcmd/include/nix/installable-flake\.hh$'' ''^src/libcmd/installable-value\.cc$'' - ''^src/libcmd/installable-value\.hh$'' + ''^src/libcmd/include/nix/installable-value\.hh$'' ''^src/libcmd/installables\.cc$'' - ''^src/libcmd/installables\.hh$'' - ''^src/libcmd/legacy\.hh$'' + ''^src/libcmd/include/nix/installables\.hh$'' + ''^src/libcmd/include/nix/legacy\.hh$'' ''^src/libcmd/markdown\.cc$'' ''^src/libcmd/misc-store-flags\.cc$'' ''^src/libcmd/repl-interacter\.cc$'' - ''^src/libcmd/repl-interacter\.hh$'' + ''^src/libcmd/include/nix/repl-interacter\.hh$'' ''^src/libcmd/repl\.cc$'' - ''^src/libcmd/repl\.hh$'' + ''^src/libcmd/include/nix/repl\.hh$'' ''^src/libexpr-c/nix_api_expr\.cc$'' ''^src/libexpr-c/nix_api_external\.cc$'' ''^src/libexpr/attr-path\.cc$'' - ''^src/libexpr/attr-path\.hh$'' + ''^src/libexpr/include/nix/attr-path\.hh$'' ''^src/libexpr/attr-set\.cc$'' - ''^src/libexpr/attr-set\.hh$'' + ''^src/libexpr/include/nix/attr-set\.hh$'' ''^src/libexpr/eval-cache\.cc$'' - ''^src/libexpr/eval-cache\.hh$'' + ''^src/libexpr/include/nix/eval-cache\.hh$'' ''^src/libexpr/eval-error\.cc$'' - ''^src/libexpr/eval-inline\.hh$'' + ''^src/libexpr/include/nix/eval-inline\.hh$'' ''^src/libexpr/eval-settings\.cc$'' - ''^src/libexpr/eval-settings\.hh$'' + ''^src/libexpr/include/nix/eval-settings\.hh$'' ''^src/libexpr/eval\.cc$'' - ''^src/libexpr/eval\.hh$'' + ''^src/libexpr/include/nix/eval\.hh$'' ''^src/libexpr/function-trace\.cc$'' - ''^src/libexpr/gc-small-vector\.hh$'' + ''^src/libexpr/include/nix/gc-small-vector\.hh$'' ''^src/libexpr/get-drvs\.cc$'' - ''^src/libexpr/get-drvs\.hh$'' + ''^src/libexpr/include/nix/get-drvs\.hh$'' ''^src/libexpr/json-to-value\.cc$'' ''^src/libexpr/nixexpr\.cc$'' - ''^src/libexpr/nixexpr\.hh$'' - ''^src/libexpr/parser-state\.hh$'' + ''^src/libexpr/include/nix/nixexpr\.hh$'' + ''^src/libexpr/include/nix/parser-state\.hh$'' ''^src/libexpr/primops\.cc$'' - ''^src/libexpr/primops\.hh$'' + ''^src/libexpr/include/nix/primops\.hh$'' ''^src/libexpr/primops/context\.cc$'' ''^src/libexpr/primops/fetchClosure\.cc$'' ''^src/libexpr/primops/fetchMercurial\.cc$'' ''^src/libexpr/primops/fetchTree\.cc$'' ''^src/libexpr/primops/fromTOML\.cc$'' ''^src/libexpr/print-ambiguous\.cc$'' - ''^src/libexpr/print-ambiguous\.hh$'' - ''^src/libexpr/print-options\.hh$'' + ''^src/libexpr/include/nix/print-ambiguous\.hh$'' + ''^src/libexpr/include/nix/print-options\.hh$'' ''^src/libexpr/print\.cc$'' - ''^src/libexpr/print\.hh$'' + ''^src/libexpr/include/nix/print\.hh$'' ''^src/libexpr/search-path\.cc$'' - ''^src/libexpr/symbol-table\.hh$'' + ''^src/libexpr/include/nix/symbol-table\.hh$'' ''^src/libexpr/value-to-json\.cc$'' - ''^src/libexpr/value-to-json\.hh$'' + ''^src/libexpr/include/nix/value-to-json\.hh$'' ''^src/libexpr/value-to-xml\.cc$'' - ''^src/libexpr/value-to-xml\.hh$'' - ''^src/libexpr/value\.hh$'' + ''^src/libexpr/include/nix/value-to-xml\.hh$'' + ''^src/libexpr/include/nix/value\.hh$'' ''^src/libexpr/value/context\.cc$'' - ''^src/libexpr/value/context\.hh$'' + ''^src/libexpr/include/nix/value/context\.hh$'' ''^src/libfetchers/attrs\.cc$'' ''^src/libfetchers/cache\.cc$'' - ''^src/libfetchers/cache\.hh$'' + ''^src/libfetchers/include/nix/cache\.hh$'' ''^src/libfetchers/fetch-settings\.cc$'' - ''^src/libfetchers/fetch-settings\.hh$'' + ''^src/libfetchers/include/nix/fetch-settings\.hh$'' ''^src/libfetchers/fetch-to-store\.cc$'' ''^src/libfetchers/fetchers\.cc$'' - ''^src/libfetchers/fetchers\.hh$'' + ''^src/libfetchers/include/nix/fetchers\.hh$'' ''^src/libfetchers/filtering-source-accessor\.cc$'' - ''^src/libfetchers/filtering-source-accessor\.hh$'' + ''^src/libfetchers/include/nix/filtering-source-accessor\.hh$'' ''^src/libfetchers/fs-source-accessor\.cc$'' - ''^src/libfetchers/fs-source-accessor\.hh$'' + ''^src/libfetchers/include/nix/fs-source-accessor\.hh$'' ''^src/libfetchers/git-utils\.cc$'' - ''^src/libfetchers/git-utils\.hh$'' + ''^src/libfetchers/include/nix/git-utils\.hh$'' ''^src/libfetchers/github\.cc$'' ''^src/libfetchers/indirect\.cc$'' ''^src/libfetchers/memory-source-accessor\.cc$'' ''^src/libfetchers/path\.cc$'' ''^src/libfetchers/registry\.cc$'' - ''^src/libfetchers/registry\.hh$'' + ''^src/libfetchers/include/nix/registry\.hh$'' ''^src/libfetchers/tarball\.cc$'' - ''^src/libfetchers/tarball\.hh$'' + ''^src/libfetchers/include/nix/tarball\.hh$'' ''^src/libfetchers/git\.cc$'' ''^src/libfetchers/mercurial\.cc$'' ''^src/libflake/flake/config\.cc$'' ''^src/libflake/flake/flake\.cc$'' - ''^src/libflake/flake/flake\.hh$'' + ''^src/libflake/include/nix/flake/flake\.hh$'' ''^src/libflake/flake/flakeref\.cc$'' - ''^src/libflake/flake/flakeref\.hh$'' + ''^src/libflake/include/nix/flake/flakeref\.hh$'' ''^src/libflake/flake/lockfile\.cc$'' - ''^src/libflake/flake/lockfile\.hh$'' + ''^src/libflake/include/nix/flake/lockfile\.hh$'' ''^src/libflake/flake/url-name\.cc$'' ''^src/libmain/common-args\.cc$'' - ''^src/libmain/common-args\.hh$'' + ''^src/libmain/include/nix/common-args\.hh$'' ''^src/libmain/loggers\.cc$'' - ''^src/libmain/loggers\.hh$'' + ''^src/libmain/include/nix/loggers\.hh$'' ''^src/libmain/progress-bar\.cc$'' ''^src/libmain/shared\.cc$'' - ''^src/libmain/shared\.hh$'' + ''^src/libmain/include/nix/shared\.hh$'' ''^src/libmain/unix/stack\.cc$'' ''^src/libstore/binary-cache-store\.cc$'' - ''^src/libstore/binary-cache-store\.hh$'' - ''^src/libstore/build-result\.hh$'' - ''^src/libstore/builtins\.hh$'' + ''^src/libstore/include/nix/binary-cache-store\.hh$'' + ''^src/libstore/include/nix/build-result\.hh$'' + ''^src/libstore/include/nix/builtins\.hh$'' ''^src/libstore/builtins/buildenv\.cc$'' - ''^src/libstore/builtins/buildenv\.hh$'' - ''^src/libstore/common-protocol-impl\.hh$'' + ''^src/libstore/include/nix/builtins/buildenv\.hh$'' + ''^src/libstore/include/nix/common-protocol-impl\.hh$'' ''^src/libstore/common-protocol\.cc$'' - ''^src/libstore/common-protocol\.hh$'' - ''^src/libstore/common-ssh-store-config\.hh$'' + ''^src/libstore/include/nix/common-protocol\.hh$'' + ''^src/libstore/include/nix/common-ssh-store-config\.hh$'' ''^src/libstore/content-address\.cc$'' - ''^src/libstore/content-address\.hh$'' + ''^src/libstore/include/nix/content-address\.hh$'' ''^src/libstore/daemon\.cc$'' - ''^src/libstore/daemon\.hh$'' + ''^src/libstore/include/nix/daemon\.hh$'' ''^src/libstore/derivations\.cc$'' - ''^src/libstore/derivations\.hh$'' + ''^src/libstore/include/nix/derivations\.hh$'' ''^src/libstore/derived-path-map\.cc$'' - ''^src/libstore/derived-path-map\.hh$'' + ''^src/libstore/include/nix/derived-path-map\.hh$'' ''^src/libstore/derived-path\.cc$'' - ''^src/libstore/derived-path\.hh$'' + ''^src/libstore/include/nix/derived-path\.hh$'' ''^src/libstore/downstream-placeholder\.cc$'' - ''^src/libstore/downstream-placeholder\.hh$'' + ''^src/libstore/include/nix/downstream-placeholder\.hh$'' ''^src/libstore/dummy-store\.cc$'' ''^src/libstore/export-import\.cc$'' ''^src/libstore/filetransfer\.cc$'' - ''^src/libstore/filetransfer\.hh$'' - ''^src/libstore/gc-store\.hh$'' + ''^src/libstore/include/nix/filetransfer\.hh$'' + ''^src/libstore/include/nix/gc-store\.hh$'' ''^src/libstore/globals\.cc$'' - ''^src/libstore/globals\.hh$'' + ''^src/libstore/include/nix/globals\.hh$'' ''^src/libstore/http-binary-cache-store\.cc$'' ''^src/libstore/legacy-ssh-store\.cc$'' - ''^src/libstore/legacy-ssh-store\.hh$'' - ''^src/libstore/length-prefixed-protocol-helper\.hh$'' + ''^src/libstore/include/nix/legacy-ssh-store\.hh$'' + ''^src/libstore/include/nix/length-prefixed-protocol-helper\.hh$'' ''^src/libstore/linux/personality\.cc$'' - ''^src/libstore/linux/personality\.hh$'' + ''^src/libstore/linux/include/nix/personality\.hh$'' ''^src/libstore/local-binary-cache-store\.cc$'' ''^src/libstore/local-fs-store\.cc$'' - ''^src/libstore/local-fs-store\.hh$'' + ''^src/libstore/include/nix/local-fs-store\.hh$'' ''^src/libstore/log-store\.cc$'' - ''^src/libstore/log-store\.hh$'' + ''^src/libstore/include/nix/log-store\.hh$'' ''^src/libstore/machines\.cc$'' - ''^src/libstore/machines\.hh$'' + ''^src/libstore/include/nix/machines\.hh$'' ''^src/libstore/make-content-addressed\.cc$'' - ''^src/libstore/make-content-addressed\.hh$'' + ''^src/libstore/include/nix/make-content-addressed\.hh$'' ''^src/libstore/misc\.cc$'' ''^src/libstore/names\.cc$'' - ''^src/libstore/names\.hh$'' + ''^src/libstore/include/nix/names\.hh$'' ''^src/libstore/nar-accessor\.cc$'' - ''^src/libstore/nar-accessor\.hh$'' + ''^src/libstore/include/nix/nar-accessor\.hh$'' ''^src/libstore/nar-info-disk-cache\.cc$'' - ''^src/libstore/nar-info-disk-cache\.hh$'' + ''^src/libstore/include/nix/nar-info-disk-cache\.hh$'' ''^src/libstore/nar-info\.cc$'' - ''^src/libstore/nar-info\.hh$'' + ''^src/libstore/include/nix/nar-info\.hh$'' ''^src/libstore/outputs-spec\.cc$'' - ''^src/libstore/outputs-spec\.hh$'' + ''^src/libstore/include/nix/outputs-spec\.hh$'' ''^src/libstore/parsed-derivations\.cc$'' ''^src/libstore/path-info\.cc$'' - ''^src/libstore/path-info\.hh$'' + ''^src/libstore/include/nix/path-info\.hh$'' ''^src/libstore/path-references\.cc$'' - ''^src/libstore/path-regex\.hh$'' + ''^src/libstore/include/nix/path-regex\.hh$'' ''^src/libstore/path-with-outputs\.cc$'' ''^src/libstore/path\.cc$'' - ''^src/libstore/path\.hh$'' + ''^src/libstore/include/nix/path\.hh$'' ''^src/libstore/pathlocks\.cc$'' - ''^src/libstore/pathlocks\.hh$'' + ''^src/libstore/include/nix/pathlocks\.hh$'' ''^src/libstore/profiles\.cc$'' - ''^src/libstore/profiles\.hh$'' + ''^src/libstore/include/nix/profiles\.hh$'' ''^src/libstore/realisation\.cc$'' - ''^src/libstore/realisation\.hh$'' + ''^src/libstore/include/nix/realisation\.hh$'' ''^src/libstore/remote-fs-accessor\.cc$'' - ''^src/libstore/remote-fs-accessor\.hh$'' - ''^src/libstore/remote-store-connection\.hh$'' + ''^src/libstore/include/nix/remote-fs-accessor\.hh$'' + ''^src/libstore/include/nix/remote-store-connection\.hh$'' ''^src/libstore/remote-store\.cc$'' - ''^src/libstore/remote-store\.hh$'' + ''^src/libstore/include/nix/remote-store\.hh$'' ''^src/libstore/s3-binary-cache-store\.cc$'' - ''^src/libstore/s3\.hh$'' + ''^src/libstore/include/nix/s3\.hh$'' ''^src/libstore/serve-protocol-impl\.cc$'' - ''^src/libstore/serve-protocol-impl\.hh$'' + ''^src/libstore/include/nix/serve-protocol-impl\.hh$'' ''^src/libstore/serve-protocol\.cc$'' - ''^src/libstore/serve-protocol\.hh$'' + ''^src/libstore/include/nix/serve-protocol\.hh$'' ''^src/libstore/sqlite\.cc$'' - ''^src/libstore/sqlite\.hh$'' + ''^src/libstore/include/nix/sqlite\.hh$'' ''^src/libstore/ssh-store\.cc$'' ''^src/libstore/ssh\.cc$'' - ''^src/libstore/ssh\.hh$'' + ''^src/libstore/include/nix/ssh\.hh$'' ''^src/libstore/store-api\.cc$'' - ''^src/libstore/store-api\.hh$'' - ''^src/libstore/store-dir-config\.hh$'' + ''^src/libstore/include/nix/store-api\.hh$'' + ''^src/libstore/include/nix/store-dir-config\.hh$'' ''^src/libstore/build/derivation-goal\.cc$'' - ''^src/libstore/build/derivation-goal\.hh$'' + ''^src/libstore/include/nix/build/derivation-goal\.hh$'' ''^src/libstore/build/drv-output-substitution-goal\.cc$'' - ''^src/libstore/build/drv-output-substitution-goal\.hh$'' + ''^src/libstore/include/nix/build/drv-output-substitution-goal\.hh$'' ''^src/libstore/build/entry-points\.cc$'' ''^src/libstore/build/goal\.cc$'' - ''^src/libstore/build/goal\.hh$'' + ''^src/libstore/include/nix/build/goal\.hh$'' ''^src/libstore/unix/build/hook-instance\.cc$'' ''^src/libstore/unix/build/local-derivation-goal\.cc$'' - ''^src/libstore/unix/build/local-derivation-goal\.hh$'' + ''^src/libstore/unix/include/nix/build/local-derivation-goal\.hh$'' ''^src/libstore/build/substitution-goal\.cc$'' - ''^src/libstore/build/substitution-goal\.hh$'' + ''^src/libstore/include/nix/build/substitution-goal\.hh$'' ''^src/libstore/build/worker\.cc$'' - ''^src/libstore/build/worker\.hh$'' + ''^src/libstore/include/nix/build/worker\.hh$'' ''^src/libstore/builtins/fetchurl\.cc$'' ''^src/libstore/builtins/unpack-channel\.cc$'' ''^src/libstore/gc\.cc$'' ''^src/libstore/local-overlay-store\.cc$'' - ''^src/libstore/local-overlay-store\.hh$'' + ''^src/libstore/include/nix/local-overlay-store\.hh$'' ''^src/libstore/local-store\.cc$'' - ''^src/libstore/local-store\.hh$'' + ''^src/libstore/include/nix/local-store\.hh$'' ''^src/libstore/unix/user-lock\.cc$'' - ''^src/libstore/unix/user-lock\.hh$'' + ''^src/libstore/unix/include/nix/user-lock\.hh$'' ''^src/libstore/optimise-store\.cc$'' ''^src/libstore/unix/pathlocks\.cc$'' ''^src/libstore/posix-fs-canonicalise\.cc$'' - ''^src/libstore/posix-fs-canonicalise\.hh$'' + ''^src/libstore/include/nix/posix-fs-canonicalise\.hh$'' ''^src/libstore/uds-remote-store\.cc$'' - ''^src/libstore/uds-remote-store\.hh$'' + ''^src/libstore/include/nix/uds-remote-store\.hh$'' ''^src/libstore/windows/build\.cc$'' - ''^src/libstore/worker-protocol-impl\.hh$'' + ''^src/libstore/include/nix/worker-protocol-impl\.hh$'' ''^src/libstore/worker-protocol\.cc$'' - ''^src/libstore/worker-protocol\.hh$'' + ''^src/libstore/include/nix/worker-protocol\.hh$'' ''^src/libutil-c/nix_api_util_internal\.h$'' ''^src/libutil/archive\.cc$'' - ''^src/libutil/archive\.hh$'' + ''^src/libutil/include/nix/archive\.hh$'' ''^src/libutil/args\.cc$'' - ''^src/libutil/args\.hh$'' - ''^src/libutil/args/root\.hh$'' - ''^src/libutil/callback\.hh$'' + ''^src/libutil/include/nix/args\.hh$'' + ''^src/libutil/include/nix/args/root\.hh$'' + ''^src/libutil/include/nix/callback\.hh$'' ''^src/libutil/canon-path\.cc$'' - ''^src/libutil/canon-path\.hh$'' - ''^src/libutil/chunked-vector\.hh$'' - ''^src/libutil/closure\.hh$'' - ''^src/libutil/comparator\.hh$'' + ''^src/libutil/include/nix/canon-path\.hh$'' + ''^src/libutil/include/nix/chunked-vector\.hh$'' + ''^src/libutil/include/nix/closure\.hh$'' + ''^src/libutil/include/nix/comparator\.hh$'' ''^src/libutil/compute-levels\.cc$'' - ''^src/libutil/config-impl\.hh$'' + ''^src/libutil/include/nix/config-impl\.hh$'' ''^src/libutil/config\.cc$'' - ''^src/libutil/config\.hh$'' + ''^src/libutil/include/nix/config\.hh$'' ''^src/libutil/current-process\.cc$'' - ''^src/libutil/current-process\.hh$'' + ''^src/libutil/include/nix/current-process\.hh$'' ''^src/libutil/english\.cc$'' - ''^src/libutil/english\.hh$'' + ''^src/libutil/include/nix/english\.hh$'' ''^src/libutil/error\.cc$'' - ''^src/libutil/error\.hh$'' - ''^src/libutil/exit\.hh$'' + ''^src/libutil/include/nix/error\.hh$'' + ''^src/libutil/include/nix/exit\.hh$'' ''^src/libutil/experimental-features\.cc$'' - ''^src/libutil/experimental-features\.hh$'' + ''^src/libutil/include/nix/experimental-features\.hh$'' ''^src/libutil/file-content-address\.cc$'' - ''^src/libutil/file-content-address\.hh$'' + ''^src/libutil/include/nix/file-content-address\.hh$'' ''^src/libutil/file-descriptor\.cc$'' - ''^src/libutil/file-descriptor\.hh$'' - ''^src/libutil/file-path-impl\.hh$'' - ''^src/libutil/file-path\.hh$'' + ''^src/libutil/include/nix/file-descriptor\.hh$'' + ''^src/libutil/include/nix/file-path-impl\.hh$'' + ''^src/libutil/include/nix/file-path\.hh$'' ''^src/libutil/file-system\.cc$'' - ''^src/libutil/file-system\.hh$'' - ''^src/libutil/finally\.hh$'' - ''^src/libutil/fmt\.hh$'' + ''^src/libutil/include/nix/file-system\.hh$'' + ''^src/libutil/include/nix/finally\.hh$'' + ''^src/libutil/include/nix/fmt\.hh$'' ''^src/libutil/fs-sink\.cc$'' - ''^src/libutil/fs-sink\.hh$'' + ''^src/libutil/include/nix/fs-sink\.hh$'' ''^src/libutil/git\.cc$'' - ''^src/libutil/git\.hh$'' + ''^src/libutil/include/nix/git\.hh$'' ''^src/libutil/hash\.cc$'' - ''^src/libutil/hash\.hh$'' + ''^src/libutil/include/nix/hash\.hh$'' ''^src/libutil/hilite\.cc$'' - ''^src/libutil/hilite\.hh$'' + ''^src/libutil/include/nix/hilite\.hh$'' ''^src/libutil/source-accessor\.hh$'' - ''^src/libutil/json-impls\.hh$'' + ''^src/libutil/include/nix/json-impls\.hh$'' ''^src/libutil/json-utils\.cc$'' - ''^src/libutil/json-utils\.hh$'' + ''^src/libutil/include/nix/json-utils\.hh$'' ''^src/libutil/linux/cgroup\.cc$'' ''^src/libutil/linux/namespaces\.cc$'' ''^src/libutil/logging\.cc$'' - ''^src/libutil/logging\.hh$'' - ''^src/libutil/lru-cache\.hh$'' + ''^src/libutil/include/nix/logging\.hh$'' + ''^src/libutil/include/nix/lru-cache\.hh$'' ''^src/libutil/memory-source-accessor\.cc$'' - ''^src/libutil/memory-source-accessor\.hh$'' - ''^src/libutil/pool\.hh$'' + ''^src/libutil/include/nix/memory-source-accessor\.hh$'' + ''^src/libutil/include/nix/pool\.hh$'' ''^src/libutil/position\.cc$'' - ''^src/libutil/position\.hh$'' + ''^src/libutil/include/nix/position\.hh$'' ''^src/libutil/posix-source-accessor\.cc$'' - ''^src/libutil/posix-source-accessor\.hh$'' - ''^src/libutil/processes\.hh$'' - ''^src/libutil/ref\.hh$'' + ''^src/libutil/include/nix/posix-source-accessor\.hh$'' + ''^src/libutil/include/nix/processes\.hh$'' + ''^src/libutil/include/nix/ref\.hh$'' ''^src/libutil/references\.cc$'' - ''^src/libutil/references\.hh$'' + ''^src/libutil/include/nix/references\.hh$'' ''^src/libutil/regex-combinators\.hh$'' ''^src/libutil/serialise\.cc$'' - ''^src/libutil/serialise\.hh$'' - ''^src/libutil/signals\.hh$'' + ''^src/libutil/include/nix/serialise\.hh$'' + ''^src/libutil/include/nix/signals\.hh$'' ''^src/libutil/signature/local-keys\.cc$'' - ''^src/libutil/signature/local-keys\.hh$'' + ''^src/libutil/include/nix/signature/local-keys\.hh$'' ''^src/libutil/signature/signer\.cc$'' - ''^src/libutil/signature/signer\.hh$'' + ''^src/libutil/include/nix/signature/signer\.hh$'' ''^src/libutil/source-accessor\.cc$'' - ''^src/libutil/source-accessor\.hh$'' + ''^src/libutil/include/nix/source-accessor\.hh$'' ''^src/libutil/source-path\.cc$'' - ''^src/libutil/source-path\.hh$'' - ''^src/libutil/split\.hh$'' + ''^src/libutil/include/nix/source-path\.hh$'' + ''^src/libutil/include/nix/split\.hh$'' ''^src/libutil/suggestions\.cc$'' - ''^src/libutil/suggestions\.hh$'' - ''^src/libutil/sync\.hh$'' + ''^src/libutil/include/nix/suggestions\.hh$'' + ''^src/libutil/include/nix/sync\.hh$'' ''^src/libutil/terminal\.cc$'' - ''^src/libutil/terminal\.hh$'' + ''^src/libutil/include/nix/terminal\.hh$'' ''^src/libutil/thread-pool\.cc$'' - ''^src/libutil/thread-pool\.hh$'' - ''^src/libutil/topo-sort\.hh$'' - ''^src/libutil/types\.hh$'' + ''^src/libutil/include/nix/thread-pool\.hh$'' + ''^src/libutil/include/nix/topo-sort\.hh$'' + ''^src/libutil/include/nix/types\.hh$'' ''^src/libutil/unix/file-descriptor\.cc$'' ''^src/libutil/unix/file-path\.cc$'' ''^src/libutil/unix/processes\.cc$'' - ''^src/libutil/unix/signals-impl\.hh$'' + ''^src/libutil/unix/include/nix/signals-impl\.hh$'' ''^src/libutil/unix/signals\.cc$'' ''^src/libutil/unix-domain-socket\.cc$'' ''^src/libutil/unix/users\.cc$'' - ''^src/libutil/url-parts\.hh$'' + ''^src/libutil/include/nix/url-parts\.hh$'' ''^src/libutil/url\.cc$'' - ''^src/libutil/url\.hh$'' + ''^src/libutil/include/nix/url\.hh$'' ''^src/libutil/users\.cc$'' - ''^src/libutil/users\.hh$'' + ''^src/libutil/include/nix/users\.hh$'' ''^src/libutil/util\.cc$'' - ''^src/libutil/util\.hh$'' - ''^src/libutil/variant-wrapper\.hh$'' + ''^src/libutil/include/nix/util\.hh$'' + ''^src/libutil/include/nix/variant-wrapper\.hh$'' ''^src/libutil/widecharwidth/widechar_width\.h$'' # vendored source ''^src/libutil/windows/file-descriptor\.cc$'' ''^src/libutil/windows/file-path\.cc$'' ''^src/libutil/windows/processes\.cc$'' ''^src/libutil/windows/users\.cc$'' ''^src/libutil/windows/windows-error\.cc$'' - ''^src/libutil/windows/windows-error\.hh$'' + ''^src/libutil/windows/include/nix/windows-error\.hh$'' ''^src/libutil/xml-writer\.cc$'' - ''^src/libutil/xml-writer\.hh$'' + ''^src/libutil/include/nix/xml-writer\.hh$'' ''^src/nix-build/nix-build\.cc$'' ''^src/nix-channel/nix-channel\.cc$'' ''^src/nix-collect-garbage/nix-collect-garbage\.cc$'' @@ -481,9 +481,9 @@ ''^tests/nixos/ca-fd-leak/sender\.c'' ''^tests/nixos/ca-fd-leak/smuggler\.c'' ''^tests/nixos/user-sandboxing/attacker\.c'' - ''^src/libexpr-test-support/tests/libexpr\.hh'' + ''^src/libexpr-test-support/include/nix/tests/libexpr\.hh'' ''^src/libexpr-test-support/tests/value/context\.cc'' - ''^src/libexpr-test-support/tests/value/context\.hh'' + ''^src/libexpr-test-support/include/nix/tests/value/context\.hh'' ''^src/libexpr-tests/derived-path\.cc'' ''^src/libexpr-tests/error_traces\.cc'' ''^src/libexpr-tests/eval\.cc'' @@ -498,13 +498,13 @@ ''^src/libflake-tests/flakeref\.cc'' ''^src/libflake-tests/url-name\.cc'' ''^src/libstore-test-support/tests/derived-path\.cc'' - ''^src/libstore-test-support/tests/derived-path\.hh'' - ''^src/libstore-test-support/tests/nix_api_store\.hh'' + ''^src/libstore-test-support/include/nix/tests/derived-path\.hh'' + ''^src/libstore-test-support/include/nix/tests/nix_api_store\.hh'' ''^src/libstore-test-support/tests/outputs-spec\.cc'' - ''^src/libstore-test-support/tests/outputs-spec\.hh'' - ''^src/libstore-test-support/tests/path\.cc'' - ''^src/libstore-test-support/tests/path\.hh'' - ''^src/libstore-test-support/tests/protocol\.hh'' + ''^src/libstore-test-support/include/nix/tests/outputs-spec\.hh'' + ''^src/libstore-test-support/path\.cc'' + ''^src/libstore-test-support/include/nix/tests/path\.hh'' + ''^src/libstore-test-support/include/nix/tests/protocol\.hh'' ''^src/libstore-tests/common-protocol\.cc'' ''^src/libstore-tests/content-address\.cc'' ''^src/libstore-tests/derivation\.cc'' @@ -518,9 +518,9 @@ ''^src/libstore-tests/path\.cc'' ''^src/libstore-tests/serve-protocol\.cc'' ''^src/libstore-tests/worker-protocol\.cc'' - ''^src/libutil-test-support/tests/characterization\.hh'' - ''^src/libutil-test-support/tests/hash\.cc'' - ''^src/libutil-test-support/tests/hash\.hh'' + ''^src/libutil-test-support/include/nix/tests/characterization\.hh'' + ''^src/libutil-test-support/hash\.cc'' + ''^src/libutil-test-support/include/nix/tests/hash\.hh'' ''^src/libutil-tests/args\.cc'' ''^src/libutil-tests/canon-path\.cc'' ''^src/libutil-tests/chunked-vector\.cc'' diff --git a/nix-meson-build-support/export/meson.build b/nix-meson-build-support/export/meson.build index 9f59505721e..b2409de8571 100644 --- a/nix-meson-build-support/export/meson.build +++ b/nix-meson-build-support/export/meson.build @@ -16,7 +16,6 @@ import('pkgconfig').generate( filebase : meson.project_name(), name : 'Nix', description : 'Nix Package Manager', - subdirs : ['nix'], extra_cflags : ['-std=c++2a'], requires : requires_public, requires_private : requires_private, diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 88b70428845..56eb248a5d4 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -9,19 +9,19 @@ #include #endif -#include "machines.hh" -#include "shared.hh" -#include "plugin.hh" -#include "pathlocks.hh" -#include "globals.hh" -#include "serialise.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "strings.hh" -#include "derivations.hh" -#include "local-store.hh" -#include "legacy.hh" -#include "experimental-features.hh" +#include "nix/machines.hh" +#include "nix/shared.hh" +#include "nix/plugin.hh" +#include "nix/pathlocks.hh" +#include "nix/globals.hh" +#include "nix/serialise.hh" +#include "nix/build-result.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" +#include "nix/derivations.hh" +#include "nix/local-store.hh" +#include "nix/legacy.hh" +#include "nix/experimental-features.hh" using namespace nix; using std::cin; diff --git a/src/libcmd/built-path.cc b/src/libcmd/built-path.cc index 905e70f32c9..21b52cea5f2 100644 --- a/src/libcmd/built-path.cc +++ b/src/libcmd/built-path.cc @@ -1,7 +1,7 @@ -#include "built-path.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "comparator.hh" +#include "nix/built-path.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/comparator.hh" #include diff --git a/src/libcmd/command-installable-value.cc b/src/libcmd/command-installable-value.cc index 7e0c15eb8cb..52fa610916a 100644 --- a/src/libcmd/command-installable-value.cc +++ b/src/libcmd/command-installable-value.cc @@ -1,4 +1,4 @@ -#include "command-installable-value.hh" +#include "nix/command-installable-value.hh" namespace nix { diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 86d13fab796..efcdb799de0 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -1,16 +1,16 @@ #include #include -#include "command.hh" -#include "markdown.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "derivations.hh" -#include "nixexpr.hh" -#include "profiles.hh" -#include "repl.hh" -#include "strings.hh" -#include "environment-variables.hh" +#include "nix/command.hh" +#include "nix/markdown.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/derivations.hh" +#include "nix/nixexpr.hh" +#include "nix/profiles.hh" +#include "nix/repl.hh" +#include "nix/strings.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libcmd/common-eval-args.cc b/src/libcmd/common-eval-args.cc index 57e1774be7b..805701749e2 100644 --- a/src/libcmd/common-eval-args.cc +++ b/src/libcmd/common-eval-args.cc @@ -1,20 +1,20 @@ -#include "fetch-settings.hh" -#include "eval-settings.hh" -#include "common-eval-args.hh" -#include "shared.hh" -#include "config-global.hh" -#include "filetransfer.hh" -#include "eval.hh" -#include "fetchers.hh" -#include "registry.hh" -#include "flake/flakeref.hh" -#include "flake/settings.hh" -#include "store-api.hh" -#include "command.hh" -#include "tarball.hh" -#include "fetch-to-store.hh" -#include "compatibility-settings.hh" -#include "eval-settings.hh" +#include "nix/fetch-settings.hh" +#include "nix/eval-settings.hh" +#include "nix/common-eval-args.hh" +#include "nix/shared.hh" +#include "nix/config-global.hh" +#include "nix/filetransfer.hh" +#include "nix/eval.hh" +#include "nix/fetchers.hh" +#include "nix/registry.hh" +#include "nix/flake/flakeref.hh" +#include "nix/flake/settings.hh" +#include "nix/store-api.hh" +#include "nix/command.hh" +#include "nix/tarball.hh" +#include "nix/fetch-to-store.hh" +#include "nix/compatibility-settings.hh" +#include "nix/eval-settings.hh" namespace nix { diff --git a/src/libcmd/editor-for.cc b/src/libcmd/editor-for.cc index 6bf36bd647b..b82f41d2b8f 100644 --- a/src/libcmd/editor-for.cc +++ b/src/libcmd/editor-for.cc @@ -1,6 +1,6 @@ -#include "editor-for.hh" -#include "environment-variables.hh" -#include "source-path.hh" +#include "nix/editor-for.hh" +#include "nix/environment-variables.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libcmd/built-path.hh b/src/libcmd/include/nix/built-path.hh similarity index 98% rename from src/libcmd/built-path.hh rename to src/libcmd/include/nix/built-path.hh index dc78d3e599d..bd8f685e005 100644 --- a/src/libcmd/built-path.hh +++ b/src/libcmd/include/nix/built-path.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "derived-path.hh" -#include "realisation.hh" +#include "nix/derived-path.hh" +#include "nix/realisation.hh" namespace nix { diff --git a/src/libcmd/command-installable-value.hh b/src/libcmd/include/nix/command-installable-value.hh similarity index 87% rename from src/libcmd/command-installable-value.hh rename to src/libcmd/include/nix/command-installable-value.hh index 7880d411998..5ce352a6345 100644 --- a/src/libcmd/command-installable-value.hh +++ b/src/libcmd/include/nix/command-installable-value.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "installable-value.hh" -#include "command.hh" +#include "nix/installable-value.hh" +#include "nix/command.hh" namespace nix { diff --git a/src/libcmd/command.hh b/src/libcmd/include/nix/command.hh similarity index 98% rename from src/libcmd/command.hh rename to src/libcmd/include/nix/command.hh index 9570ce3e7ac..9d3c8e343d4 100644 --- a/src/libcmd/command.hh +++ b/src/libcmd/include/nix/command.hh @@ -1,11 +1,11 @@ #pragma once ///@file -#include "installable-value.hh" -#include "args.hh" -#include "common-eval-args.hh" -#include "path.hh" -#include "flake/lockfile.hh" +#include "nix/installable-value.hh" +#include "nix/args.hh" +#include "nix/common-eval-args.hh" +#include "nix/path.hh" +#include "nix/flake/lockfile.hh" #include diff --git a/src/libcmd/common-eval-args.hh b/src/libcmd/include/nix/common-eval-args.hh similarity index 92% rename from src/libcmd/common-eval-args.hh rename to src/libcmd/include/nix/common-eval-args.hh index c62365b32e2..e7217589162 100644 --- a/src/libcmd/common-eval-args.hh +++ b/src/libcmd/include/nix/common-eval-args.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "args.hh" -#include "canon-path.hh" -#include "common-args.hh" -#include "search-path.hh" +#include "nix/args.hh" +#include "nix/canon-path.hh" +#include "nix/common-args.hh" +#include "nix/search-path.hh" #include diff --git a/src/libcmd/compatibility-settings.hh b/src/libcmd/include/nix/compatibility-settings.hh similarity index 98% rename from src/libcmd/compatibility-settings.hh rename to src/libcmd/include/nix/compatibility-settings.hh index a129a957a64..18319c1f2d2 100644 --- a/src/libcmd/compatibility-settings.hh +++ b/src/libcmd/include/nix/compatibility-settings.hh @@ -1,5 +1,5 @@ #pragma once -#include "config.hh" +#include "nix/config.hh" namespace nix { struct CompatibilitySettings : public Config diff --git a/src/libcmd/editor-for.hh b/src/libcmd/include/nix/editor-for.hh similarity index 77% rename from src/libcmd/editor-for.hh rename to src/libcmd/include/nix/editor-for.hh index 8acd7011e69..0a8aa48bc6c 100644 --- a/src/libcmd/editor-for.hh +++ b/src/libcmd/include/nix/editor-for.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "source-path.hh" +#include "nix/types.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libcmd/installable-attr-path.hh b/src/libcmd/include/nix/installable-attr-path.hh similarity index 65% rename from src/libcmd/installable-attr-path.hh rename to src/libcmd/include/nix/installable-attr-path.hh index 86c2f82192c..ceb2eca616c 100644 --- a/src/libcmd/installable-attr-path.hh +++ b/src/libcmd/include/nix/installable-attr-path.hh @@ -1,22 +1,22 @@ #pragma once ///@file -#include "globals.hh" -#include "installable-value.hh" -#include "outputs-spec.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installable-value.hh" +#include "nix/outputs-spec.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include diff --git a/src/libcmd/installable-derived-path.hh b/src/libcmd/include/nix/installable-derived-path.hh similarity index 94% rename from src/libcmd/installable-derived-path.hh rename to src/libcmd/include/nix/installable-derived-path.hh index e0b4f18b38b..8f86e6c4cdf 100644 --- a/src/libcmd/installable-derived-path.hh +++ b/src/libcmd/include/nix/installable-derived-path.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "installables.hh" +#include "nix/installables.hh" namespace nix { diff --git a/src/libcmd/installable-flake.hh b/src/libcmd/include/nix/installable-flake.hh similarity index 97% rename from src/libcmd/installable-flake.hh rename to src/libcmd/include/nix/installable-flake.hh index 212403dd42c..5bbe4beb5b2 100644 --- a/src/libcmd/installable-flake.hh +++ b/src/libcmd/include/nix/installable-flake.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "common-eval-args.hh" -#include "installable-value.hh" +#include "nix/common-eval-args.hh" +#include "nix/installable-value.hh" namespace nix { diff --git a/src/libcmd/installable-value.hh b/src/libcmd/include/nix/installable-value.hh similarity index 98% rename from src/libcmd/installable-value.hh rename to src/libcmd/include/nix/installable-value.hh index 4b6dbd306aa..f8840103f7c 100644 --- a/src/libcmd/installable-value.hh +++ b/src/libcmd/include/nix/installable-value.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "installables.hh" -#include "flake/flake.hh" +#include "nix/installables.hh" +#include "nix/flake/flake.hh" namespace nix { diff --git a/src/libcmd/installables.hh b/src/libcmd/include/nix/installables.hh similarity index 96% rename from src/libcmd/installables.hh rename to src/libcmd/include/nix/installables.hh index c995c3019f4..2393cbcffe6 100644 --- a/src/libcmd/installables.hh +++ b/src/libcmd/include/nix/installables.hh @@ -1,12 +1,12 @@ #pragma once ///@file -#include "path.hh" -#include "outputs-spec.hh" -#include "derived-path.hh" -#include "built-path.hh" -#include "store-api.hh" -#include "build-result.hh" +#include "nix/path.hh" +#include "nix/outputs-spec.hh" +#include "nix/derived-path.hh" +#include "nix/built-path.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" #include diff --git a/src/libcmd/legacy.hh b/src/libcmd/include/nix/legacy.hh similarity index 100% rename from src/libcmd/legacy.hh rename to src/libcmd/include/nix/legacy.hh diff --git a/src/libcmd/markdown.hh b/src/libcmd/include/nix/markdown.hh similarity index 100% rename from src/libcmd/markdown.hh rename to src/libcmd/include/nix/markdown.hh diff --git a/src/libcmd/include/nix/meson.build b/src/libcmd/include/nix/meson.build new file mode 100644 index 00000000000..debe4a60522 --- /dev/null +++ b/src/libcmd/include/nix/meson.build @@ -0,0 +1,23 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +headers = files( + 'built-path.hh', + 'command-installable-value.hh', + 'command.hh', + 'common-eval-args.hh', + 'compatibility-settings.hh', + 'editor-for.hh', + 'installable-attr-path.hh', + 'installable-derived-path.hh', + 'installable-flake.hh', + 'installable-value.hh', + 'installables.hh', + 'legacy.hh', + 'markdown.hh', + 'misc-store-flags.hh', + 'network-proxy.hh', + 'repl-interacter.hh', + 'repl.hh', +) diff --git a/src/libcmd/misc-store-flags.hh b/src/libcmd/include/nix/misc-store-flags.hh similarity index 92% rename from src/libcmd/misc-store-flags.hh rename to src/libcmd/include/nix/misc-store-flags.hh index 124372af78c..b8579e90fb1 100644 --- a/src/libcmd/misc-store-flags.hh +++ b/src/libcmd/include/nix/misc-store-flags.hh @@ -1,5 +1,5 @@ -#include "args.hh" -#include "content-address.hh" +#include "nix/args.hh" +#include "nix/content-address.hh" namespace nix::flag { diff --git a/src/libcmd/network-proxy.hh b/src/libcmd/include/nix/network-proxy.hh similarity index 94% rename from src/libcmd/network-proxy.hh rename to src/libcmd/include/nix/network-proxy.hh index 0b6856acbf4..ca797f465ec 100644 --- a/src/libcmd/network-proxy.hh +++ b/src/libcmd/include/nix/network-proxy.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libcmd/repl-interacter.hh b/src/libcmd/include/nix/repl-interacter.hh similarity index 95% rename from src/libcmd/repl-interacter.hh rename to src/libcmd/include/nix/repl-interacter.hh index cc70efd0729..463ba68184c 100644 --- a/src/libcmd/repl-interacter.hh +++ b/src/libcmd/include/nix/repl-interacter.hh @@ -1,8 +1,8 @@ #pragma once /// @file -#include "finally.hh" -#include "types.hh" +#include "nix/finally.hh" +#include "nix/types.hh" #include #include diff --git a/src/libcmd/repl.hh b/src/libcmd/include/nix/repl.hh similarity index 97% rename from src/libcmd/repl.hh rename to src/libcmd/include/nix/repl.hh index 11d1820f504..b22fb9438a6 100644 --- a/src/libcmd/repl.hh +++ b/src/libcmd/include/nix/repl.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "eval.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libcmd/installable-attr-path.cc b/src/libcmd/installable-attr-path.cc index 8917e7a018a..dfd7bdd65b2 100644 --- a/src/libcmd/installable-attr-path.cc +++ b/src/libcmd/installable-attr-path.cc @@ -1,21 +1,21 @@ -#include "globals.hh" -#include "installable-attr-path.hh" -#include "outputs-spec.hh" -#include "util.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "flake/flake.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installable-attr-path.hh" +#include "nix/outputs-spec.hh" +#include "nix/util.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/flake/flake.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include diff --git a/src/libcmd/installable-derived-path.cc b/src/libcmd/installable-derived-path.cc index abacd73502c..2e53f61982e 100644 --- a/src/libcmd/installable-derived-path.cc +++ b/src/libcmd/installable-derived-path.cc @@ -1,5 +1,5 @@ -#include "installable-derived-path.hh" -#include "derivations.hh" +#include "nix/installable-derived-path.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libcmd/installable-flake.cc b/src/libcmd/installable-flake.cc index 6c9ee674808..f4c27251529 100644 --- a/src/libcmd/installable-flake.cc +++ b/src/libcmd/installable-flake.cc @@ -1,22 +1,22 @@ -#include "globals.hh" -#include "installable-flake.hh" -#include "installable-derived-path.hh" -#include "outputs-spec.hh" -#include "util.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "flake/flake.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installable-flake.hh" +#include "nix/installable-derived-path.hh" +#include "nix/outputs-spec.hh" +#include "nix/util.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/flake/flake.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include diff --git a/src/libcmd/installable-value.cc b/src/libcmd/installable-value.cc index 1aa2e65c1e5..ac2da0ed20c 100644 --- a/src/libcmd/installable-value.cc +++ b/src/libcmd/installable-value.cc @@ -1,6 +1,6 @@ -#include "installable-value.hh" -#include "eval-cache.hh" -#include "fetch-to-store.hh" +#include "nix/installable-value.hh" +#include "nix/eval-cache.hh" +#include "nix/fetch-to-store.hh" namespace nix { diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 81eb883daba..f1eaa71e9b0 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -1,33 +1,33 @@ -#include "globals.hh" -#include "installables.hh" -#include "installable-derived-path.hh" -#include "installable-attr-path.hh" -#include "installable-flake.hh" -#include "outputs-spec.hh" -#include "users.hh" -#include "util.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "flake/flake.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installables.hh" +#include "nix/installable-derived-path.hh" +#include "nix/installable-attr-path.hh" +#include "nix/installable-flake.hh" +#include "nix/outputs-spec.hh" +#include "nix/users.hh" +#include "nix/util.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/flake/flake.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include #include -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libcmd/legacy.cc b/src/libcmd/legacy.cc index 6df09ee37a5..25da75d3fb4 100644 --- a/src/libcmd/legacy.cc +++ b/src/libcmd/legacy.cc @@ -1,4 +1,4 @@ -#include "legacy.hh" +#include "nix/legacy.hh" namespace nix { diff --git a/src/libcmd/markdown.cc b/src/libcmd/markdown.cc index 4566e6ba63c..5670b590bcb 100644 --- a/src/libcmd/markdown.cc +++ b/src/libcmd/markdown.cc @@ -1,8 +1,10 @@ -#include "markdown.hh" -#include "environment-variables.hh" -#include "error.hh" -#include "finally.hh" -#include "terminal.hh" +#include "nix/markdown.hh" +#include "nix/environment-variables.hh" +#include "nix/error.hh" +#include "nix/finally.hh" +#include "nix/terminal.hh" + +#include "cmd-config-private.hh" #if HAVE_LOWDOWN # include diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build index 85d22a5f3fa..727f4e14d35 100644 --- a/src/libcmd/meson.build +++ b/src/libcmd/meson.build @@ -55,16 +55,15 @@ endif config_h = configure_file( configuration : configdata, - output : 'config-cmd.hh', + output : 'cmd-config-private.hh', ) add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', - '-include', 'config-cmd.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -89,27 +88,7 @@ sources = files( 'repl.cc', ) -include_dirs = [include_directories('.')] - -headers = files( - 'built-path.hh', - 'command-installable-value.hh', - 'command.hh', - 'common-eval-args.hh', - 'compatibility-settings.hh', - 'editor-for.hh', - 'installable-attr-path.hh', - 'installable-derived-path.hh', - 'installable-flake.hh', - 'installable-value.hh', - 'installables.hh', - 'legacy.hh', - 'markdown.hh', - 'misc-store-flags.hh', - 'network-proxy.hh', - 'repl-interacter.hh', - 'repl.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libcmd/misc-store-flags.cc b/src/libcmd/misc-store-flags.cc index 4e29e8981ae..70933648ff0 100644 --- a/src/libcmd/misc-store-flags.cc +++ b/src/libcmd/misc-store-flags.cc @@ -1,4 +1,4 @@ -#include "misc-store-flags.hh" +#include "nix/misc-store-flags.hh" namespace nix::flag { diff --git a/src/libcmd/network-proxy.cc b/src/libcmd/network-proxy.cc index 738bf614729..31e9eb8ddb7 100644 --- a/src/libcmd/network-proxy.cc +++ b/src/libcmd/network-proxy.cc @@ -1,8 +1,8 @@ -#include "network-proxy.hh" +#include "nix/network-proxy.hh" #include -#include "environment-variables.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libcmd/package.nix b/src/libcmd/package.nix index d459d1c20fb..5cfe550a332 100644 --- a/src/libcmd/package.nix +++ b/src/libcmd/package.nix @@ -46,6 +46,7 @@ mkMesonLibrary (finalAttrs: { ./.version ./meson.build ./meson.options + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libcmd/repl-interacter.cc b/src/libcmd/repl-interacter.cc index 187af46eaa4..773e111b297 100644 --- a/src/libcmd/repl-interacter.cc +++ b/src/libcmd/repl-interacter.cc @@ -1,3 +1,5 @@ +#include "cmd-config-private.hh" + #include #ifdef USE_READLINE @@ -14,12 +16,12 @@ extern "C" { } #endif -#include "signals.hh" -#include "finally.hh" -#include "repl-interacter.hh" -#include "file-system.hh" -#include "repl.hh" -#include "environment-variables.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/repl-interacter.hh" +#include "nix/file-system.hh" +#include "nix/repl.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 38b2196434e..8bd5417d7fb 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -2,34 +2,34 @@ #include #include -#include "error.hh" -#include "repl-interacter.hh" -#include "repl.hh" - -#include "ansicolor.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "attr-path.hh" -#include "signals.hh" -#include "store-api.hh" -#include "log-store.hh" -#include "common-eval-args.hh" -#include "get-drvs.hh" -#include "derivations.hh" -#include "globals.hh" -#include "flake/flake.hh" -#include "flake/lockfile.hh" -#include "users.hh" -#include "editor-for.hh" -#include "finally.hh" -#include "markdown.hh" -#include "local-fs-store.hh" -#include "print.hh" -#include "ref.hh" -#include "value.hh" - -#include "strings.hh" +#include "nix/error.hh" +#include "nix/repl-interacter.hh" +#include "nix/repl.hh" + +#include "nix/ansicolor.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/attr-path.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/log-store.hh" +#include "nix/common-eval-args.hh" +#include "nix/get-drvs.hh" +#include "nix/derivations.hh" +#include "nix/globals.hh" +#include "nix/flake/flake.hh" +#include "nix/flake/lockfile.hh" +#include "nix/users.hh" +#include "nix/editor-for.hh" +#include "nix/finally.hh" +#include "nix/markdown.hh" +#include "nix/local-fs-store.hh" +#include "nix/print.hh" +#include "nix/ref.hh" +#include "nix/value.hh" + +#include "nix/strings.hh" namespace nix { diff --git a/src/libexpr-c/meson.build b/src/libexpr-c/meson.build index 8405525ca2e..8b00b8d70b0 100644 --- a/src/libexpr-c/meson.build +++ b/src/libexpr-c/meson.build @@ -30,9 +30,9 @@ add_project_arguments( # It would be nice for our headers to be idempotent instead. # From C++ libraries, only for internals - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -69,7 +69,7 @@ this_library = library( install : true, ) -install_headers(headers, subdir : 'nix', preserve_path : true) +install_headers(headers, preserve_path : true) libraries_private = [] diff --git a/src/libexpr-c/nix_api_expr.cc b/src/libexpr-c/nix_api_expr.cc index 1df8acd1eba..c7682c7921f 100644 --- a/src/libexpr-c/nix_api_expr.cc +++ b/src/libexpr-c/nix_api_expr.cc @@ -2,11 +2,11 @@ #include #include -#include "eval.hh" -#include "eval-gc.hh" -#include "globals.hh" -#include "eval-settings.hh" -#include "ref.hh" +#include "nix/eval.hh" +#include "nix/eval-gc.hh" +#include "nix/globals.hh" +#include "nix/eval-settings.hh" +#include "nix/ref.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" diff --git a/src/libexpr-c/nix_api_expr_internal.h b/src/libexpr-c/nix_api_expr_internal.h index f596640115f..205a2ee6240 100644 --- a/src/libexpr-c/nix_api_expr_internal.h +++ b/src/libexpr-c/nix_api_expr_internal.h @@ -1,12 +1,12 @@ #ifndef NIX_API_EXPR_INTERNAL_H #define NIX_API_EXPR_INTERNAL_H -#include "fetch-settings.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "attr-set.hh" +#include "nix/fetch-settings.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/attr-set.hh" #include "nix_api_value.h" -#include "search-path.hh" +#include "nix/search-path.hh" struct nix_eval_state_builder { diff --git a/src/libexpr-c/nix_api_external.cc b/src/libexpr-c/nix_api_external.cc index d673bcb0b30..7f4cd6a8c4d 100644 --- a/src/libexpr-c/nix_api_external.cc +++ b/src/libexpr-c/nix_api_external.cc @@ -1,8 +1,8 @@ -#include "attr-set.hh" -#include "config.hh" -#include "eval.hh" -#include "globals.hh" -#include "value.hh" +#include "nix/attr-set.hh" +#include "nix/config.hh" +#include "nix/eval.hh" +#include "nix/globals.hh" +#include "nix/value.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" @@ -10,7 +10,7 @@ #include "nix_api_util.h" #include "nix_api_util_internal.h" #include "nix_api_value.h" -#include "value/context.hh" +#include "nix/value/context.hh" #include diff --git a/src/libexpr-c/nix_api_external.h b/src/libexpr-c/nix_api_external.h index 6c524b9755d..f4a32728100 100644 --- a/src/libexpr-c/nix_api_external.h +++ b/src/libexpr-c/nix_api_external.h @@ -12,9 +12,10 @@ #include "nix_api_expr.h" #include "nix_api_util.h" #include "nix_api_value.h" -#include "stdbool.h" -#include "stddef.h" -#include "stdint.h" + +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/libexpr-c/nix_api_value.cc b/src/libexpr-c/nix_api_value.cc index 448f4a58a78..3116cb59f7d 100644 --- a/src/libexpr-c/nix_api_value.cc +++ b/src/libexpr-c/nix_api_value.cc @@ -1,10 +1,10 @@ -#include "attr-set.hh" -#include "config.hh" -#include "eval.hh" -#include "globals.hh" -#include "path.hh" -#include "primops.hh" -#include "value.hh" +#include "nix/attr-set.hh" +#include "nix/config.hh" +#include "nix/eval.hh" +#include "nix/globals.hh" +#include "nix/path.hh" +#include "nix/primops.hh" +#include "nix/value.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" @@ -12,7 +12,7 @@ #include "nix_api_util_internal.h" #include "nix_api_store_internal.h" #include "nix_api_value.h" -#include "value/context.hh" +#include "nix/value/context.hh" // Internal helper functions to check [in] and [out] `Value *` parameters static const nix::Value & check_value_not_null(const nix_value * value) diff --git a/src/libexpr-c/nix_api_value.h b/src/libexpr-c/nix_api_value.h index 711b0adbc82..7cd6ad18087 100644 --- a/src/libexpr-c/nix_api_value.h +++ b/src/libexpr-c/nix_api_value.h @@ -10,9 +10,10 @@ #include "nix_api_util.h" #include "nix_api_store.h" -#include "stdbool.h" -#include "stddef.h" -#include "stdint.h" + +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/libexpr-test-support/include/nix/meson.build b/src/libexpr-test-support/include/nix/meson.build new file mode 100644 index 00000000000..9e517c7f6c5 --- /dev/null +++ b/src/libexpr-test-support/include/nix/meson.build @@ -0,0 +1,9 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +headers = files( + 'tests/libexpr.hh', + 'tests/nix_api_expr.hh', + 'tests/value/context.hh', +) diff --git a/src/libexpr-test-support/tests/libexpr.hh b/src/libexpr-test-support/include/nix/tests/libexpr.hh similarity index 94% rename from src/libexpr-test-support/tests/libexpr.hh rename to src/libexpr-test-support/include/nix/tests/libexpr.hh index 095ea1d0e4b..dfd5fbd3d2a 100644 --- a/src/libexpr-test-support/tests/libexpr.hh +++ b/src/libexpr-test-support/include/nix/tests/libexpr.hh @@ -4,16 +4,16 @@ #include #include -#include "fetch-settings.hh" -#include "value.hh" -#include "nixexpr.hh" -#include "nixexpr.hh" -#include "eval.hh" -#include "eval-gc.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" - -#include "tests/libstore.hh" +#include "nix/fetch-settings.hh" +#include "nix/value.hh" +#include "nix/nixexpr.hh" +#include "nix/nixexpr.hh" +#include "nix/eval.hh" +#include "nix/eval-gc.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" + +#include "nix/tests/libstore.hh" namespace nix { class LibExprTest : public LibStoreTest { diff --git a/src/libexpr-test-support/tests/nix_api_expr.hh b/src/libexpr-test-support/include/nix/tests/nix_api_expr.hh similarity index 93% rename from src/libexpr-test-support/tests/nix_api_expr.hh rename to src/libexpr-test-support/include/nix/tests/nix_api_expr.hh index 6ddca0d14d4..e5960b177a5 100644 --- a/src/libexpr-test-support/tests/nix_api_expr.hh +++ b/src/libexpr-test-support/include/nix/tests/nix_api_expr.hh @@ -2,7 +2,7 @@ ///@file #include "nix_api_expr.h" #include "nix_api_value.h" -#include "tests/nix_api_store.hh" +#include "nix/tests/nix_api_store.hh" #include diff --git a/src/libexpr-test-support/tests/value/context.hh b/src/libexpr-test-support/include/nix/tests/value/context.hh similarity index 94% rename from src/libexpr-test-support/tests/value/context.hh rename to src/libexpr-test-support/include/nix/tests/value/context.hh index 8c68c78bbd1..d98e722421a 100644 --- a/src/libexpr-test-support/tests/value/context.hh +++ b/src/libexpr-test-support/include/nix/tests/value/context.hh @@ -3,7 +3,7 @@ #include -#include "value/context.hh" +#include "nix/value/context.hh" namespace rc { using namespace nix; diff --git a/src/libexpr-test-support/meson.build b/src/libexpr-test-support/meson.build index 56e814cd132..b68adb2c27d 100644 --- a/src/libexpr-test-support/meson.build +++ b/src/libexpr-test-support/meson.build @@ -32,9 +32,9 @@ deps_public += rapidcheck add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -44,13 +44,7 @@ sources = files( 'tests/value/context.cc', ) -include_dirs = [include_directories('.')] - -headers = files( - 'tests/libexpr.hh', - 'tests/nix_api_expr.hh', - 'tests/value/context.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libexpr-test-support/package.nix b/src/libexpr-test-support/package.nix index 44b0ff38631..5d4af1088d9 100644 --- a/src/libexpr-test-support/package.nix +++ b/src/libexpr-test-support/package.nix @@ -29,6 +29,7 @@ mkMesonLibrary (finalAttrs: { ./.version ./meson.build # ./meson.options + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libexpr-test-support/tests/value/context.cc b/src/libexpr-test-support/tests/value/context.cc index 36837cd6a1b..7b2d60269a8 100644 --- a/src/libexpr-test-support/tests/value/context.cc +++ b/src/libexpr-test-support/tests/value/context.cc @@ -1,7 +1,7 @@ #include -#include "tests/path.hh" -#include "tests/value/context.hh" +#include "nix/tests/path.hh" +#include "nix/tests/value/context.hh" namespace rc { using namespace nix; diff --git a/src/libexpr-tests/derived-path.cc b/src/libexpr-tests/derived-path.cc index 634f9bf69d9..1e427ffa527 100644 --- a/src/libexpr-tests/derived-path.cc +++ b/src/libexpr-tests/derived-path.cc @@ -2,8 +2,8 @@ #include #include -#include "tests/derived-path.hh" -#include "tests/libexpr.hh" +#include "nix/tests/derived-path.hh" +#include "nix/tests/libexpr.hh" namespace nix { diff --git a/src/libexpr-tests/error_traces.cc b/src/libexpr-tests/error_traces.cc index 53013a34a36..abba15db8cd 100644 --- a/src/libexpr-tests/error_traces.cc +++ b/src/libexpr-tests/error_traces.cc @@ -1,7 +1,7 @@ #include #include -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" namespace nix { diff --git a/src/libexpr-tests/eval.cc b/src/libexpr-tests/eval.cc index 61f6be0db6f..3bc672746ab 100644 --- a/src/libexpr-tests/eval.cc +++ b/src/libexpr-tests/eval.cc @@ -1,8 +1,8 @@ #include #include -#include "eval.hh" -#include "tests/libexpr.hh" +#include "nix/eval.hh" +#include "nix/tests/libexpr.hh" namespace nix { diff --git a/src/libexpr-tests/json.cc b/src/libexpr-tests/json.cc index f4cc118d664..67fdcf209a6 100644 --- a/src/libexpr-tests/json.cc +++ b/src/libexpr-tests/json.cc @@ -1,5 +1,5 @@ -#include "tests/libexpr.hh" -#include "value-to-json.hh" +#include "nix/tests/libexpr.hh" +#include "nix/value-to-json.hh" namespace nix { // Testing the conversion to JSON diff --git a/src/libexpr-tests/main.cc b/src/libexpr-tests/main.cc index e3412d9ef9a..719b5a727b1 100644 --- a/src/libexpr-tests/main.cc +++ b/src/libexpr-tests/main.cc @@ -1,7 +1,7 @@ #include #include -#include "globals.hh" -#include "logging.hh" +#include "nix/globals.hh" +#include "nix/logging.hh" using namespace nix; diff --git a/src/libexpr-tests/meson.build b/src/libexpr-tests/meson.build index 9f6edb9b391..3fc726cb2f0 100644 --- a/src/libexpr-tests/meson.build +++ b/src/libexpr-tests/meson.build @@ -38,9 +38,9 @@ deps_private += gtest add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', language : 'cpp', ) diff --git a/src/libexpr-tests/nix_api_expr.cc b/src/libexpr-tests/nix_api_expr.cc index 633224ae6d2..903c7a23971 100644 --- a/src/libexpr-tests/nix_api_expr.cc +++ b/src/libexpr-tests/nix_api_expr.cc @@ -5,9 +5,9 @@ #include "nix_api_expr.h" #include "nix_api_value.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" -#include "file-system.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" +#include "nix/file-system.hh" #include #include diff --git a/src/libexpr-tests/nix_api_external.cc b/src/libexpr-tests/nix_api_external.cc index 27bef9a6a9a..49a86b8266f 100644 --- a/src/libexpr-tests/nix_api_external.cc +++ b/src/libexpr-tests/nix_api_external.cc @@ -7,8 +7,8 @@ #include "nix_api_value.h" #include "nix_api_external.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" #include diff --git a/src/libexpr-tests/nix_api_value.cc b/src/libexpr-tests/nix_api_value.cc index 7fc8b4f641f..0f86ba6502a 100644 --- a/src/libexpr-tests/nix_api_value.cc +++ b/src/libexpr-tests/nix_api_value.cc @@ -6,10 +6,10 @@ #include "nix_api_value.h" #include "nix_api_expr_internal.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" -#include "gmock/gmock.h" +#include #include #include #include diff --git a/src/libexpr-tests/primops.cc b/src/libexpr-tests/primops.cc index 2bf72647737..4114f08f6f9 100644 --- a/src/libexpr-tests/primops.cc +++ b/src/libexpr-tests/primops.cc @@ -1,10 +1,10 @@ #include #include -#include "eval-settings.hh" -#include "memory-source-accessor.hh" +#include "nix/eval-settings.hh" +#include "nix/memory-source-accessor.hh" -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" namespace nix { class CaptureLogger : public Logger diff --git a/src/libexpr-tests/search-path.cc b/src/libexpr-tests/search-path.cc index 0806793557d..72f2335971f 100644 --- a/src/libexpr-tests/search-path.cc +++ b/src/libexpr-tests/search-path.cc @@ -1,7 +1,7 @@ #include #include -#include "search-path.hh" +#include "nix/search-path.hh" namespace nix { diff --git a/src/libexpr-tests/trivial.cc b/src/libexpr-tests/trivial.cc index d77b4d53b47..4ddd24d12f3 100644 --- a/src/libexpr-tests/trivial.cc +++ b/src/libexpr-tests/trivial.cc @@ -1,4 +1,4 @@ -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" namespace nix { // Testing of trivial expressions diff --git a/src/libexpr-tests/value/context.cc b/src/libexpr-tests/value/context.cc index c8d62772f21..bf3b501f433 100644 --- a/src/libexpr-tests/value/context.cc +++ b/src/libexpr-tests/value/context.cc @@ -2,9 +2,9 @@ #include #include -#include "tests/path.hh" -#include "tests/libexpr.hh" -#include "tests/value/context.hh" +#include "nix/tests/path.hh" +#include "nix/tests/libexpr.hh" +#include "nix/tests/value/context.hh" namespace nix { diff --git a/src/libexpr-tests/value/print.cc b/src/libexpr-tests/value/print.cc index 43b54503546..8590f9aac68 100644 --- a/src/libexpr-tests/value/print.cc +++ b/src/libexpr-tests/value/print.cc @@ -1,7 +1,7 @@ -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" -#include "value.hh" -#include "print.hh" +#include "nix/value.hh" +#include "nix/print.hh" namespace nix { diff --git a/src/libexpr-tests/value/value.cc b/src/libexpr-tests/value/value.cc index 5762d5891f8..9f91f8ff5ae 100644 --- a/src/libexpr-tests/value/value.cc +++ b/src/libexpr-tests/value/value.cc @@ -1,6 +1,6 @@ -#include "value.hh" +#include "nix/value.hh" -#include "tests/libstore.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc index 822ec7620c2..8dde6479066 100644 --- a/src/libexpr/attr-path.cc +++ b/src/libexpr/attr-path.cc @@ -1,5 +1,5 @@ -#include "attr-path.hh" -#include "eval-inline.hh" +#include "nix/attr-path.hh" +#include "nix/eval-inline.hh" namespace nix { diff --git a/src/libexpr/attr-set.cc b/src/libexpr/attr-set.cc index 866ef817aa4..c6fc9f32a50 100644 --- a/src/libexpr/attr-set.cc +++ b/src/libexpr/attr-set.cc @@ -1,5 +1,5 @@ -#include "attr-set.hh" -#include "eval-inline.hh" +#include "nix/attr-set.hh" +#include "nix/eval-inline.hh" #include diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc index ea3319f9939..f35c332c986 100644 --- a/src/libexpr/eval-cache.cc +++ b/src/libexpr/eval-cache.cc @@ -1,11 +1,11 @@ -#include "users.hh" -#include "eval-cache.hh" -#include "sqlite.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "store-api.hh" +#include "nix/users.hh" +#include "nix/eval-cache.hh" +#include "nix/sqlite.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/store-api.hh" // Need specialization involving `SymbolStr` just in this one module. -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix::eval_cache { diff --git a/src/libexpr/eval-error.cc b/src/libexpr/eval-error.cc index 58a5d951a47..d80fa473e91 100644 --- a/src/libexpr/eval-error.cc +++ b/src/libexpr/eval-error.cc @@ -1,6 +1,6 @@ -#include "eval-error.hh" -#include "eval.hh" -#include "value.hh" +#include "nix/eval-error.hh" +#include "nix/eval.hh" +#include "nix/value.hh" namespace nix { diff --git a/src/libexpr/eval-gc.cc b/src/libexpr/eval-gc.cc index 07ce05a2c73..defa4e9d28e 100644 --- a/src/libexpr/eval-gc.cc +++ b/src/libexpr/eval-gc.cc @@ -1,9 +1,9 @@ -#include "error.hh" -#include "environment-variables.hh" -#include "eval-settings.hh" -#include "config-global.hh" -#include "serialise.hh" -#include "eval-gc.hh" +#include "nix/error.hh" +#include "nix/environment-variables.hh" +#include "nix/eval-settings.hh" +#include "nix/config-global.hh" +#include "nix/serialise.hh" +#include "nix/eval-gc.hh" #if HAVE_BOEHMGC diff --git a/src/libexpr/eval-settings.cc b/src/libexpr/eval-settings.cc index b54afdce124..458507db813 100644 --- a/src/libexpr/eval-settings.cc +++ b/src/libexpr/eval-settings.cc @@ -1,8 +1,8 @@ -#include "users.hh" -#include "globals.hh" -#include "profiles.hh" -#include "eval.hh" -#include "eval-settings.hh" +#include "nix/users.hh" +#include "nix/globals.hh" +#include "nix/profiles.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" namespace nix { diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 2dcee49d9dc..f534cc49474 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1,24 +1,25 @@ -#include "eval.hh" -#include "eval-settings.hh" -#include "primops.hh" -#include "print-options.hh" -#include "exit.hh" -#include "types.hh" -#include "util.hh" -#include "store-api.hh" -#include "derivations.hh" -#include "downstream-placeholder.hh" -#include "eval-inline.hh" -#include "filetransfer.hh" -#include "function-trace.hh" -#include "profiles.hh" -#include "print.hh" -#include "filtering-source-accessor.hh" -#include "memory-source-accessor.hh" -#include "gc-small-vector.hh" -#include "url.hh" -#include "fetch-to-store.hh" -#include "tarball.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/primops.hh" +#include "nix/print-options.hh" +#include "nix/exit.hh" +#include "nix/types.hh" +#include "nix/util.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/eval-inline.hh" +#include "nix/filetransfer.hh" +#include "nix/function-trace.hh" +#include "nix/profiles.hh" +#include "nix/print.hh" +#include "nix/filtering-source-accessor.hh" +#include "nix/memory-source-accessor.hh" +#include "nix/gc-small-vector.hh" +#include "nix/url.hh" +#include "nix/fetch-to-store.hh" +#include "nix/tarball.hh" + #include "parser-tab.hh" #include @@ -38,7 +39,7 @@ # include #endif -#include "strings-inline.hh" +#include "nix/strings-inline.hh" using json = nlohmann::json; diff --git a/src/libexpr/function-trace.cc b/src/libexpr/function-trace.cc index c6057b3842f..9c6e54e4b51 100644 --- a/src/libexpr/function-trace.cc +++ b/src/libexpr/function-trace.cc @@ -1,5 +1,5 @@ -#include "function-trace.hh" -#include "logging.hh" +#include "nix/function-trace.hh" +#include "nix/logging.hh" namespace nix { diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index 1ac13fcd2b1..61b44aa1768 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -1,8 +1,8 @@ -#include "get-drvs.hh" -#include "eval-inline.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "path-with-outputs.hh" +#include "nix/get-drvs.hh" +#include "nix/eval-inline.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/path-with-outputs.hh" #include #include diff --git a/src/libexpr/attr-path.hh b/src/libexpr/include/nix/attr-path.hh similarity index 95% rename from src/libexpr/attr-path.hh rename to src/libexpr/include/nix/attr-path.hh index eb00ffb93e4..06d00efc268 100644 --- a/src/libexpr/attr-path.hh +++ b/src/libexpr/include/nix/attr-path.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "eval.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/attr-set.hh b/src/libexpr/include/nix/attr-set.hh similarity index 98% rename from src/libexpr/attr-set.hh rename to src/libexpr/include/nix/attr-set.hh index 4df9a1acdc9..93360e4e3df 100644 --- a/src/libexpr/attr-set.hh +++ b/src/libexpr/include/nix/attr-set.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "nixexpr.hh" -#include "symbol-table.hh" +#include "nix/nixexpr.hh" +#include "nix/symbol-table.hh" #include diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/include/nix/eval-cache.hh similarity index 97% rename from src/libexpr/eval-cache.hh rename to src/libexpr/include/nix/eval-cache.hh index b1911e3a4f7..899ae715b88 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/include/nix/eval-cache.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "sync.hh" -#include "hash.hh" -#include "eval.hh" +#include "nix/sync.hh" +#include "nix/hash.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/eval-error.hh b/src/libexpr/include/nix/eval-error.hh similarity index 98% rename from src/libexpr/eval-error.hh rename to src/libexpr/include/nix/eval-error.hh index b4e5007b0aa..ebed23dbb03 100644 --- a/src/libexpr/eval-error.hh +++ b/src/libexpr/include/nix/eval-error.hh @@ -1,7 +1,7 @@ #pragma once -#include "error.hh" -#include "pos-idx.hh" +#include "nix/error.hh" +#include "nix/pos-idx.hh" namespace nix { diff --git a/src/libexpr/eval-gc.hh b/src/libexpr/include/nix/eval-gc.hh similarity index 100% rename from src/libexpr/eval-gc.hh rename to src/libexpr/include/nix/eval-gc.hh diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/include/nix/eval-inline.hh similarity index 97% rename from src/libexpr/eval-inline.hh rename to src/libexpr/include/nix/eval-inline.hh index 5d1a0c4d60c..c00b0600635 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/include/nix/eval-inline.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "print.hh" -#include "eval.hh" -#include "eval-error.hh" -#include "eval-settings.hh" +#include "nix/print.hh" +#include "nix/eval.hh" +#include "nix/eval-error.hh" +#include "nix/eval-settings.hh" namespace nix { diff --git a/src/libexpr/eval-settings.hh b/src/libexpr/include/nix/eval-settings.hh similarity index 99% rename from src/libexpr/eval-settings.hh rename to src/libexpr/include/nix/eval-settings.hh index d16fd403592..48d8a544b35 100644 --- a/src/libexpr/eval-settings.hh +++ b/src/libexpr/include/nix/eval-settings.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "config.hh" -#include "source-path.hh" +#include "nix/config.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libexpr/eval.hh b/src/libexpr/include/nix/eval.hh similarity index 98% rename from src/libexpr/eval.hh rename to src/libexpr/include/nix/eval.hh index 8bb8bbd3240..42091b9ba9e 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/include/nix/eval.hh @@ -1,20 +1,20 @@ #pragma once ///@file -#include "attr-set.hh" -#include "eval-error.hh" -#include "types.hh" -#include "value.hh" -#include "nixexpr.hh" -#include "symbol-table.hh" -#include "config.hh" -#include "experimental-features.hh" -#include "position.hh" -#include "pos-table.hh" -#include "source-accessor.hh" -#include "search-path.hh" -#include "repl-exit-status.hh" -#include "ref.hh" +#include "nix/attr-set.hh" +#include "nix/eval-error.hh" +#include "nix/types.hh" +#include "nix/value.hh" +#include "nix/nixexpr.hh" +#include "nix/symbol-table.hh" +#include "nix/config.hh" +#include "nix/experimental-features.hh" +#include "nix/position.hh" +#include "nix/pos-table.hh" +#include "nix/source-accessor.hh" +#include "nix/search-path.hh" +#include "nix/repl-exit-status.hh" +#include "nix/ref.hh" #include #include @@ -944,4 +944,4 @@ bool isAllowedURI(std::string_view uri, const Strings & allowedPaths); } -#include "eval-inline.hh" +#include "nix/eval-inline.hh" diff --git a/src/libexpr/function-trace.hh b/src/libexpr/include/nix/function-trace.hh similarity index 88% rename from src/libexpr/function-trace.hh rename to src/libexpr/include/nix/function-trace.hh index 91439b0aad2..59743fe79e9 100644 --- a/src/libexpr/function-trace.hh +++ b/src/libexpr/include/nix/function-trace.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "eval.hh" +#include "nix/eval.hh" #include diff --git a/src/libexpr/gc-small-vector.hh b/src/libexpr/include/nix/gc-small-vector.hh similarity index 96% rename from src/libexpr/gc-small-vector.hh rename to src/libexpr/include/nix/gc-small-vector.hh index 8330dd2dca1..2becffe7ca1 100644 --- a/src/libexpr/gc-small-vector.hh +++ b/src/libexpr/include/nix/gc-small-vector.hh @@ -2,7 +2,7 @@ #include -#include "value.hh" +#include "nix/value.hh" namespace nix { diff --git a/src/libexpr/get-drvs.hh b/src/libexpr/include/nix/get-drvs.hh similarity index 98% rename from src/libexpr/get-drvs.hh rename to src/libexpr/include/nix/get-drvs.hh index e4e277af8cc..aeb70c79e2b 100644 --- a/src/libexpr/get-drvs.hh +++ b/src/libexpr/include/nix/get-drvs.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "eval.hh" -#include "path.hh" +#include "nix/eval.hh" +#include "nix/path.hh" #include #include diff --git a/src/libexpr/json-to-value.hh b/src/libexpr/include/nix/json-to-value.hh similarity index 89% rename from src/libexpr/json-to-value.hh rename to src/libexpr/include/nix/json-to-value.hh index 3c8fa5cc00a..a2e0d303d13 100644 --- a/src/libexpr/json-to-value.hh +++ b/src/libexpr/include/nix/json-to-value.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "error.hh" +#include "nix/error.hh" #include diff --git a/src/libexpr/lexer-helpers.hh b/src/libexpr/include/nix/lexer-helpers.hh similarity index 100% rename from src/libexpr/lexer-helpers.hh rename to src/libexpr/include/nix/lexer-helpers.hh diff --git a/src/libexpr/include/nix/meson.build b/src/libexpr/include/nix/meson.build new file mode 100644 index 00000000000..d712cc798bc --- /dev/null +++ b/src/libexpr/include/nix/meson.build @@ -0,0 +1,37 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +config_h = configure_file( + configuration : configdata, + output : 'config-expr.hh', +) + +headers = [config_h] + files( + 'attr-path.hh', + 'attr-set.hh', + 'eval-cache.hh', + 'eval-error.hh', + 'eval-gc.hh', + 'eval-inline.hh', + 'eval-settings.hh', + 'eval.hh', + 'function-trace.hh', + 'gc-small-vector.hh', + 'get-drvs.hh', + 'json-to-value.hh', + # internal: 'lexer-helpers.hh', + 'nixexpr.hh', + 'parser-state.hh', + 'primops.hh', + 'print-ambiguous.hh', + 'print-options.hh', + 'print.hh', + 'repl-exit-status.hh', + 'search-path.hh', + 'symbol-table.hh', + 'value-to-json.hh', + 'value-to-xml.hh', + 'value.hh', + 'value/context.hh', +) diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/include/nix/nixexpr.hh similarity index 99% rename from src/libexpr/nixexpr.hh rename to src/libexpr/include/nix/nixexpr.hh index 88ebc80f8f9..deb26dd29f8 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/include/nix/nixexpr.hh @@ -4,10 +4,10 @@ #include #include -#include "value.hh" -#include "symbol-table.hh" -#include "eval-error.hh" -#include "pos-idx.hh" +#include "nix/value.hh" +#include "nix/symbol-table.hh" +#include "nix/eval-error.hh" +#include "nix/pos-idx.hh" namespace nix { diff --git a/src/libexpr/parser-state.hh b/src/libexpr/include/nix/parser-state.hh similarity index 99% rename from src/libexpr/parser-state.hh rename to src/libexpr/include/nix/parser-state.hh index 21a880e8eb7..aa3c2455dd1 100644 --- a/src/libexpr/parser-state.hh +++ b/src/libexpr/include/nix/parser-state.hh @@ -3,7 +3,7 @@ #include -#include "eval.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/primops.hh b/src/libexpr/include/nix/primops.hh similarity index 98% rename from src/libexpr/primops.hh rename to src/libexpr/include/nix/primops.hh index 9f76975db8d..75c6f0d4668 100644 --- a/src/libexpr/primops.hh +++ b/src/libexpr/include/nix/primops.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "eval.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/print-ambiguous.hh b/src/libexpr/include/nix/print-ambiguous.hh similarity index 95% rename from src/libexpr/print-ambiguous.hh rename to src/libexpr/include/nix/print-ambiguous.hh index 50c260a9b84..06f4e805c9d 100644 --- a/src/libexpr/print-ambiguous.hh +++ b/src/libexpr/include/nix/print-ambiguous.hh @@ -1,6 +1,6 @@ #pragma once -#include "value.hh" +#include "nix/value.hh" namespace nix { diff --git a/src/libexpr/print-options.hh b/src/libexpr/include/nix/print-options.hh similarity index 100% rename from src/libexpr/print-options.hh rename to src/libexpr/include/nix/print-options.hh diff --git a/src/libexpr/print.hh b/src/libexpr/include/nix/print.hh similarity index 97% rename from src/libexpr/print.hh rename to src/libexpr/include/nix/print.hh index 7ddda81b88f..09405e8f00b 100644 --- a/src/libexpr/print.hh +++ b/src/libexpr/include/nix/print.hh @@ -9,8 +9,8 @@ #include -#include "fmt.hh" -#include "print-options.hh" +#include "nix/fmt.hh" +#include "nix/print-options.hh" namespace nix { diff --git a/src/libexpr/repl-exit-status.hh b/src/libexpr/include/nix/repl-exit-status.hh similarity index 100% rename from src/libexpr/repl-exit-status.hh rename to src/libexpr/include/nix/repl-exit-status.hh diff --git a/src/libexpr/search-path.hh b/src/libexpr/include/nix/search-path.hh similarity index 98% rename from src/libexpr/search-path.hh rename to src/libexpr/include/nix/search-path.hh index acd84363853..22a97b5f362 100644 --- a/src/libexpr/search-path.hh +++ b/src/libexpr/include/nix/search-path.hh @@ -3,8 +3,8 @@ #include -#include "types.hh" -#include "comparator.hh" +#include "nix/types.hh" +#include "nix/comparator.hh" namespace nix { diff --git a/src/libexpr/symbol-table.hh b/src/libexpr/include/nix/symbol-table.hh similarity index 97% rename from src/libexpr/symbol-table.hh rename to src/libexpr/include/nix/symbol-table.hh index be12f6248dc..b55674b1239 100644 --- a/src/libexpr/symbol-table.hh +++ b/src/libexpr/include/nix/symbol-table.hh @@ -5,9 +5,9 @@ #include #include -#include "types.hh" -#include "chunked-vector.hh" -#include "error.hh" +#include "nix/types.hh" +#include "nix/chunked-vector.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libexpr/value-to-json.hh b/src/libexpr/include/nix/value-to-json.hh similarity index 90% rename from src/libexpr/value-to-json.hh rename to src/libexpr/include/nix/value-to-json.hh index 867c4e3a849..9875c83c6bb 100644 --- a/src/libexpr/value-to-json.hh +++ b/src/libexpr/include/nix/value-to-json.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "nixexpr.hh" -#include "eval.hh" +#include "nix/nixexpr.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/value-to-xml.hh b/src/libexpr/include/nix/value-to-xml.hh similarity index 82% rename from src/libexpr/value-to-xml.hh rename to src/libexpr/include/nix/value-to-xml.hh index 6d702c0f236..3e9dce4d69b 100644 --- a/src/libexpr/value-to-xml.hh +++ b/src/libexpr/include/nix/value-to-xml.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "nixexpr.hh" -#include "eval.hh" +#include "nix/nixexpr.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/value.hh b/src/libexpr/include/nix/value.hh similarity index 98% rename from src/libexpr/value.hh rename to src/libexpr/include/nix/value.hh index 8925693e3d0..45155b3d446 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/include/nix/value.hh @@ -4,12 +4,12 @@ #include #include -#include "eval-gc.hh" -#include "symbol-table.hh" -#include "value/context.hh" -#include "source-path.hh" -#include "print-options.hh" -#include "checked-arithmetic.hh" +#include "nix/eval-gc.hh" +#include "nix/symbol-table.hh" +#include "nix/value/context.hh" +#include "nix/source-path.hh" +#include "nix/print-options.hh" +#include "nix/checked-arithmetic.hh" #include diff --git a/src/libexpr/value/context.hh b/src/libexpr/include/nix/value/context.hh similarity index 95% rename from src/libexpr/value/context.hh rename to src/libexpr/include/nix/value/context.hh index d6791c6e49c..f996cce42e1 100644 --- a/src/libexpr/value/context.hh +++ b/src/libexpr/include/nix/value/context.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "comparator.hh" -#include "derived-path.hh" -#include "variant-wrapper.hh" +#include "nix/comparator.hh" +#include "nix/derived-path.hh" +#include "nix/variant-wrapper.hh" #include diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc index 17cab7ad5da..d5da3f2b119 100644 --- a/src/libexpr/json-to-value.cc +++ b/src/libexpr/json-to-value.cc @@ -1,6 +1,6 @@ -#include "json-to-value.hh" -#include "value.hh" -#include "eval.hh" +#include "nix/json-to-value.hh" +#include "nix/value.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/lexer-helpers.cc b/src/libexpr/lexer-helpers.cc index d9eeb73e269..9eb4502fc97 100644 --- a/src/libexpr/lexer-helpers.cc +++ b/src/libexpr/lexer-helpers.cc @@ -1,7 +1,8 @@ #include "lexer-tab.hh" -#include "lexer-helpers.hh" #include "parser-tab.hh" +#include "nix/lexer-helpers.hh" + void nix::lexer::internal::initLoc(YYLTYPE * loc) { loc->beginOffset = loc->endOffset = 0; diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index 067f86e0161..c8a5ec9fdd0 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -16,7 +16,7 @@ %top { #include "parser-tab.hh" // YYSTYPE -#include "parser-state.hh" +#include "nix/parser-state.hh" } %{ @@ -24,9 +24,9 @@ #pragma clang diagnostic ignored "-Wunneeded-internal-declaration" #endif -#include "nixexpr.hh" +#include "nix/nixexpr.hh" #include "parser-tab.hh" -#include "lexer-helpers.hh" +#include "nix/lexer-helpers.hh" namespace nix { struct LexerState; diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build index 040da3dbc61..3fd4dca7f21 100644 --- a/src/libexpr/meson.build +++ b/src/libexpr/meson.build @@ -61,18 +61,13 @@ toml11 = dependency( ) deps_other += toml11 -config_h = configure_file( - configuration : configdata, - output : 'config-expr.hh', -) - add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - # '-include', 'config-fetchers.h', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + # '-include', 'nix_api_fetchers_config.h', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -153,36 +148,7 @@ sources = files( 'value/context.cc', ) -include_dirs = [include_directories('.')] - -headers = [config_h] + files( - 'attr-path.hh', - 'attr-set.hh', - 'eval-cache.hh', - 'eval-error.hh', - 'eval-gc.hh', - 'eval-inline.hh', - 'eval-settings.hh', - 'eval.hh', - 'function-trace.hh', - 'gc-small-vector.hh', - 'get-drvs.hh', - 'json-to-value.hh', - # internal: 'lexer-helpers.hh', - 'nixexpr.hh', - 'parser-state.hh', - 'primops.hh', - 'print-ambiguous.hh', - 'print-options.hh', - 'print.hh', - 'repl-exit-status.hh', - 'search-path.hh', - 'symbol-table.hh', - 'value-to-json.hh', - 'value-to-xml.hh', - 'value.hh', - 'value/context.hh', -) +subdir('include/nix') subdir('primops') diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index f172267281e..e5289de6aae 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -1,13 +1,13 @@ -#include "nixexpr.hh" -#include "eval.hh" -#include "symbol-table.hh" -#include "util.hh" -#include "print.hh" +#include "nix/nixexpr.hh" +#include "nix/eval.hh" +#include "nix/symbol-table.hh" +#include "nix/util.hh" +#include "nix/print.hh" #include #include -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libexpr/package.nix b/src/libexpr/package.nix index 141b77fac21..8f309b14ebb 100644 --- a/src/libexpr/package.nix +++ b/src/libexpr/package.nix @@ -48,6 +48,7 @@ mkMesonLibrary (finalAttrs: { ./meson.build ./meson.options ./primops/meson.build + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ./lexer.l diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index dc58e8d5355..27fec4c511b 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -17,14 +17,14 @@ #include -#include "finally.hh" -#include "util.hh" -#include "users.hh" +#include "nix/finally.hh" +#include "nix/util.hh" +#include "nix/users.hh" -#include "nixexpr.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "parser-state.hh" +#include "nix/nixexpr.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/parser-state.hh" // Bison seems to have difficulty growing the parser stack when using C++ with // a custom location type. This undocumented macro tells Bison that our @@ -519,7 +519,7 @@ formal %% -#include "eval.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index 3d602ae2dcd..5aae69f9da5 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -1,5 +1,5 @@ -#include "store-api.hh" -#include "eval.hh" +#include "nix/store-api.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 05c8ed3df44..2e2f2c18e08 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1,19 +1,19 @@ -#include "derivations.hh" -#include "downstream-placeholder.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "gc-small-vector.hh" -#include "json-to-value.hh" -#include "names.hh" -#include "path-references.hh" -#include "store-api.hh" -#include "util.hh" -#include "processes.hh" -#include "value-to-json.hh" -#include "value-to-xml.hh" -#include "primops.hh" -#include "fetch-to-store.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/gc-small-vector.hh" +#include "nix/json-to-value.hh" +#include "nix/names.hh" +#include "nix/path-references.hh" +#include "nix/store-api.hh" +#include "nix/util.hh" +#include "nix/processes.hh" +#include "nix/value-to-json.hh" +#include "nix/value-to-xml.hh" +#include "nix/primops.hh" +#include "nix/fetch-to-store.hh" #include #include diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc index ede7d97ba34..832d17cbb90 100644 --- a/src/libexpr/primops/context.cc +++ b/src/libexpr/primops/context.cc @@ -1,7 +1,7 @@ -#include "primops.hh" -#include "eval-inline.hh" -#include "derivations.hh" -#include "store-api.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libexpr/primops/fetchClosure.cc b/src/libexpr/primops/fetchClosure.cc index 04b8d059599..fc48c54eea3 100644 --- a/src/libexpr/primops/fetchClosure.cc +++ b/src/libexpr/primops/fetchClosure.cc @@ -1,8 +1,8 @@ -#include "primops.hh" -#include "store-api.hh" -#include "realisation.hh" -#include "make-content-addressed.hh" -#include "url.hh" +#include "nix/primops.hh" +#include "nix/store-api.hh" +#include "nix/realisation.hh" +#include "nix/make-content-addressed.hh" +#include "nix/url.hh" namespace nix { diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc index 64e3abf2db4..59698552e8a 100644 --- a/src/libexpr/primops/fetchMercurial.cc +++ b/src/libexpr/primops/fetchMercurial.cc @@ -1,10 +1,10 @@ -#include "primops.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "url.hh" -#include "url-parts.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" namespace nix { diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index bd013eab294..b14d5411315 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -1,15 +1,15 @@ -#include "attrs.hh" -#include "primops.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "filetransfer.hh" -#include "registry.hh" -#include "tarball.hh" -#include "url.hh" -#include "value-to-json.hh" -#include "fetch-to-store.hh" +#include "nix/attrs.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/filetransfer.hh" +#include "nix/registry.hh" +#include "nix/tarball.hh" +#include "nix/url.hh" +#include "nix/value-to-json.hh" +#include "nix/fetch-to-store.hh" #include diff --git a/src/libexpr/primops/fromTOML.cc b/src/libexpr/primops/fromTOML.cc index 40442505407..05fe2e7bdaa 100644 --- a/src/libexpr/primops/fromTOML.cc +++ b/src/libexpr/primops/fromTOML.cc @@ -1,5 +1,5 @@ -#include "primops.hh" -#include "eval-inline.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" #include diff --git a/src/libexpr/print-ambiguous.cc b/src/libexpr/print-ambiguous.cc index a40c98643e3..b275e1e5c4b 100644 --- a/src/libexpr/print-ambiguous.cc +++ b/src/libexpr/print-ambiguous.cc @@ -1,7 +1,7 @@ -#include "print-ambiguous.hh" -#include "print.hh" -#include "signals.hh" -#include "eval.hh" +#include "nix/print-ambiguous.hh" +#include "nix/print.hh" +#include "nix/signals.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index d62aaf25f78..39f97e68b76 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -2,13 +2,13 @@ #include #include -#include "print.hh" -#include "ansicolor.hh" -#include "signals.hh" -#include "store-api.hh" -#include "terminal.hh" -#include "english.hh" -#include "eval.hh" +#include "nix/print.hh" +#include "nix/ansicolor.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/terminal.hh" +#include "nix/english.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/search-path.cc b/src/libexpr/search-path.cc index 657744e745c..8c33430f1bb 100644 --- a/src/libexpr/search-path.cc +++ b/src/libexpr/search-path.cc @@ -1,4 +1,4 @@ -#include "search-path.hh" +#include "nix/search-path.hh" namespace nix { diff --git a/src/libexpr/value-to-json.cc b/src/libexpr/value-to-json.cc index 5aa4fe4fdca..846776aed15 100644 --- a/src/libexpr/value-to-json.cc +++ b/src/libexpr/value-to-json.cc @@ -1,7 +1,7 @@ -#include "value-to-json.hh" -#include "eval-inline.hh" -#include "store-api.hh" -#include "signals.hh" +#include "nix/value-to-json.hh" +#include "nix/eval-inline.hh" +#include "nix/store-api.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libexpr/value-to-xml.cc b/src/libexpr/value-to-xml.cc index 9734ebec498..e4df226a433 100644 --- a/src/libexpr/value-to-xml.cc +++ b/src/libexpr/value-to-xml.cc @@ -1,7 +1,7 @@ -#include "value-to-xml.hh" -#include "xml-writer.hh" -#include "eval-inline.hh" -#include "signals.hh" +#include "nix/value-to-xml.hh" +#include "nix/xml-writer.hh" +#include "nix/eval-inline.hh" +#include "nix/signals.hh" #include diff --git a/src/libexpr/value/context.cc b/src/libexpr/value/context.cc index 6d9633268df..2052e193aab 100644 --- a/src/libexpr/value/context.cc +++ b/src/libexpr/value/context.cc @@ -1,5 +1,5 @@ -#include "util.hh" -#include "value/context.hh" +#include "nix/util.hh" +#include "nix/value/context.hh" #include diff --git a/src/libfetchers-tests/access-tokens.cc b/src/libfetchers-tests/access-tokens.cc index 5f4ceedaafa..25c3e6b5f92 100644 --- a/src/libfetchers-tests/access-tokens.cc +++ b/src/libfetchers-tests/access-tokens.cc @@ -1,9 +1,10 @@ -#include -#include "fetchers.hh" -#include "fetch-settings.hh" -#include "json-utils.hh" #include -#include "tests/characterization.hh" +#include + +#include "nix/fetchers.hh" +#include "nix/fetch-settings.hh" +#include "nix/json-utils.hh" +#include "nix/tests/characterization.hh" namespace nix::fetchers { diff --git a/src/libfetchers-tests/git-utils.cc b/src/libfetchers-tests/git-utils.cc index ee6ef17349e..e41db0b5b34 100644 --- a/src/libfetchers-tests/git-utils.cc +++ b/src/libfetchers-tests/git-utils.cc @@ -1,13 +1,13 @@ -#include "git-utils.hh" -#include "file-system.hh" -#include "gmock/gmock.h" +#include "nix/git-utils.hh" +#include "nix/file-system.hh" +#include #include #include #include #include -#include "fs-sink.hh" -#include "serialise.hh" -#include "git-lfs-fetch.hh" +#include "nix/fs-sink.hh" +#include "nix/serialise.hh" +#include "nix/git-lfs-fetch.hh" namespace nix { diff --git a/src/libfetchers-tests/meson.build b/src/libfetchers-tests/meson.build index b60ff5675c8..80f99c85994 100644 --- a/src/libfetchers-tests/meson.build +++ b/src/libfetchers-tests/meson.build @@ -37,9 +37,9 @@ deps_private += libgit2 add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - # '-include', 'config-fetchers.h', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + # '-include', 'nix_api_fetchers_config.h', language : 'cpp', ) diff --git a/src/libfetchers-tests/public-key.cc b/src/libfetchers-tests/public-key.cc index 80796bd0fc9..98965cf79f9 100644 --- a/src/libfetchers-tests/public-key.cc +++ b/src/libfetchers-tests/public-key.cc @@ -1,8 +1,8 @@ #include -#include "fetchers.hh" -#include "json-utils.hh" +#include "nix/fetchers.hh" +#include "nix/json-utils.hh" #include -#include "tests/characterization.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libfetchers/attrs.cc b/src/libfetchers/attrs.cc index 25d04cdc950..68e5e932b13 100644 --- a/src/libfetchers/attrs.cc +++ b/src/libfetchers/attrs.cc @@ -1,5 +1,5 @@ -#include "attrs.hh" -#include "fetchers.hh" +#include "nix/attrs.hh" +#include "nix/fetchers.hh" #include diff --git a/src/libfetchers/cache.cc b/src/libfetchers/cache.cc index 6c2241f3af7..089c8d6f3fb 100644 --- a/src/libfetchers/cache.cc +++ b/src/libfetchers/cache.cc @@ -1,8 +1,8 @@ -#include "cache.hh" -#include "users.hh" -#include "sqlite.hh" -#include "sync.hh" -#include "store-api.hh" +#include "nix/cache.hh" +#include "nix/users.hh" +#include "nix/sqlite.hh" +#include "nix/sync.hh" +#include "nix/store-api.hh" #include diff --git a/src/libfetchers/fetch-settings.cc b/src/libfetchers/fetch-settings.cc index c7ed4c7af08..bdd09553865 100644 --- a/src/libfetchers/fetch-settings.cc +++ b/src/libfetchers/fetch-settings.cc @@ -1,4 +1,4 @@ -#include "fetch-settings.hh" +#include "nix/fetch-settings.hh" namespace nix::fetchers { diff --git a/src/libfetchers/fetch-to-store.cc b/src/libfetchers/fetch-to-store.cc index fe347a59d5b..2be08feaf49 100644 --- a/src/libfetchers/fetch-to-store.cc +++ b/src/libfetchers/fetch-to-store.cc @@ -1,6 +1,6 @@ -#include "fetch-to-store.hh" -#include "fetchers.hh" -#include "cache.hh" +#include "nix/fetch-to-store.hh" +#include "nix/fetchers.hh" +#include "nix/cache.hh" namespace nix { diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc index abf021554e7..068a6722f83 100644 --- a/src/libfetchers/fetchers.cc +++ b/src/libfetchers/fetchers.cc @@ -1,10 +1,10 @@ -#include "fetchers.hh" -#include "store-api.hh" -#include "source-path.hh" -#include "fetch-to-store.hh" -#include "json-utils.hh" -#include "store-path-accessor.hh" -#include "fetch-settings.hh" +#include "nix/fetchers.hh" +#include "nix/store-api.hh" +#include "nix/source-path.hh" +#include "nix/fetch-to-store.hh" +#include "nix/json-utils.hh" +#include "nix/store-path-accessor.hh" +#include "nix/fetch-settings.hh" #include diff --git a/src/libfetchers/filtering-source-accessor.cc b/src/libfetchers/filtering-source-accessor.cc index d4557b6d4dd..1a9c8ae6bde 100644 --- a/src/libfetchers/filtering-source-accessor.cc +++ b/src/libfetchers/filtering-source-accessor.cc @@ -1,4 +1,4 @@ -#include "filtering-source-accessor.hh" +#include "nix/filtering-source-accessor.hh" namespace nix { diff --git a/src/libfetchers/git-lfs-fetch.cc b/src/libfetchers/git-lfs-fetch.cc index bd6c0143548..9f48d1e981f 100644 --- a/src/libfetchers/git-lfs-fetch.cc +++ b/src/libfetchers/git-lfs-fetch.cc @@ -1,10 +1,10 @@ -#include "git-lfs-fetch.hh" -#include "git-utils.hh" -#include "filetransfer.hh" -#include "processes.hh" -#include "url.hh" -#include "users.hh" -#include "hash.hh" +#include "nix/git-lfs-fetch.hh" +#include "nix/git-utils.hh" +#include "nix/filetransfer.hh" +#include "nix/processes.hh" +#include "nix/url.hh" +#include "nix/users.hh" +#include "nix/hash.hh" #include #include diff --git a/src/libfetchers/git-utils.cc b/src/libfetchers/git-utils.cc index 2217595a5d8..a4adbdea966 100644 --- a/src/libfetchers/git-utils.cc +++ b/src/libfetchers/git-utils.cc @@ -1,12 +1,12 @@ -#include "git-utils.hh" -#include "git-lfs-fetch.hh" -#include "cache.hh" -#include "finally.hh" -#include "processes.hh" -#include "signals.hh" -#include "users.hh" -#include "fs-sink.hh" -#include "sync.hh" +#include "nix/git-utils.hh" +#include "nix/git-lfs-fetch.hh" +#include "nix/cache.hh" +#include "nix/finally.hh" +#include "nix/processes.hh" +#include "nix/signals.hh" +#include "nix/users.hh" +#include "nix/fs-sink.hh" +#include "nix/sync.hh" #include #include diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index 4e8f5808d36..f41e8e86313 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -1,20 +1,20 @@ -#include "error.hh" -#include "fetchers.hh" -#include "users.hh" -#include "cache.hh" -#include "globals.hh" -#include "tarfile.hh" -#include "store-api.hh" -#include "url-parts.hh" -#include "pathlocks.hh" -#include "processes.hh" -#include "git.hh" -#include "git-utils.hh" -#include "logging.hh" -#include "finally.hh" -#include "fetch-settings.hh" -#include "json-utils.hh" -#include "archive.hh" +#include "nix/error.hh" +#include "nix/fetchers.hh" +#include "nix/users.hh" +#include "nix/cache.hh" +#include "nix/globals.hh" +#include "nix/tarfile.hh" +#include "nix/store-api.hh" +#include "nix/url-parts.hh" +#include "nix/pathlocks.hh" +#include "nix/processes.hh" +#include "nix/git.hh" +#include "nix/git-utils.hh" +#include "nix/logging.hh" +#include "nix/finally.hh" +#include "nix/fetch-settings.hh" +#include "nix/json-utils.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc index ea4dbe3384d..80b7e7156b2 100644 --- a/src/libfetchers/github.cc +++ b/src/libfetchers/github.cc @@ -1,15 +1,15 @@ -#include "filetransfer.hh" -#include "cache.hh" -#include "globals.hh" -#include "store-api.hh" -#include "types.hh" -#include "url-parts.hh" -#include "git.hh" -#include "fetchers.hh" -#include "fetch-settings.hh" -#include "tarball.hh" -#include "tarfile.hh" -#include "git-utils.hh" +#include "nix/filetransfer.hh" +#include "nix/cache.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/types.hh" +#include "nix/url-parts.hh" +#include "nix/git.hh" +#include "nix/fetchers.hh" +#include "nix/fetch-settings.hh" +#include "nix/tarball.hh" +#include "nix/tarfile.hh" +#include "nix/git-utils.hh" #include #include diff --git a/src/libfetchers/attrs.hh b/src/libfetchers/include/nix/attrs.hh similarity index 96% rename from src/libfetchers/attrs.hh rename to src/libfetchers/include/nix/attrs.hh index 97a74bce013..f1fdee35f05 100644 --- a/src/libfetchers/attrs.hh +++ b/src/libfetchers/include/nix/attrs.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "hash.hh" +#include "nix/types.hh" +#include "nix/hash.hh" #include diff --git a/src/libfetchers/cache.hh b/src/libfetchers/include/nix/cache.hh similarity index 97% rename from src/libfetchers/cache.hh rename to src/libfetchers/include/nix/cache.hh index 4d834fe0ca3..5924017858d 100644 --- a/src/libfetchers/cache.hh +++ b/src/libfetchers/include/nix/cache.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "fetchers.hh" -#include "path.hh" +#include "nix/fetchers.hh" +#include "nix/path.hh" namespace nix::fetchers { diff --git a/src/libfetchers/fetch-settings.hh b/src/libfetchers/include/nix/fetch-settings.hh similarity index 98% rename from src/libfetchers/fetch-settings.hh rename to src/libfetchers/include/nix/fetch-settings.hh index c6c3ca7a7b7..811e27b30f9 100644 --- a/src/libfetchers/fetch-settings.hh +++ b/src/libfetchers/include/nix/fetch-settings.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "config.hh" +#include "nix/types.hh" +#include "nix/config.hh" #include #include diff --git a/src/libfetchers/fetch-to-store.hh b/src/libfetchers/include/nix/fetch-to-store.hh similarity index 71% rename from src/libfetchers/fetch-to-store.hh rename to src/libfetchers/include/nix/fetch-to-store.hh index c762629f3cb..7ef809c1cdf 100644 --- a/src/libfetchers/fetch-to-store.hh +++ b/src/libfetchers/include/nix/fetch-to-store.hh @@ -1,10 +1,10 @@ #pragma once -#include "source-path.hh" -#include "store-api.hh" -#include "file-system.hh" -#include "repair-flag.hh" -#include "file-content-address.hh" +#include "nix/source-path.hh" +#include "nix/store-api.hh" +#include "nix/file-system.hh" +#include "nix/repair-flag.hh" +#include "nix/file-content-address.hh" namespace nix { diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/include/nix/fetchers.hh similarity index 97% rename from src/libfetchers/fetchers.hh rename to src/libfetchers/include/nix/fetchers.hh index 01354a6e38d..07a9adfbeaf 100644 --- a/src/libfetchers/fetchers.hh +++ b/src/libfetchers/include/nix/fetchers.hh @@ -1,17 +1,17 @@ #pragma once ///@file -#include "types.hh" -#include "hash.hh" -#include "canon-path.hh" -#include "json-impls.hh" -#include "attrs.hh" -#include "url.hh" +#include "nix/types.hh" +#include "nix/hash.hh" +#include "nix/canon-path.hh" +#include "nix/json-impls.hh" +#include "nix/attrs.hh" +#include "nix/url.hh" #include #include -#include "ref.hh" +#include "nix/ref.hh" namespace nix { class Store; class StorePath; struct SourceAccessor; } diff --git a/src/libfetchers/filtering-source-accessor.hh b/src/libfetchers/include/nix/filtering-source-accessor.hh similarity index 98% rename from src/libfetchers/filtering-source-accessor.hh rename to src/libfetchers/include/nix/filtering-source-accessor.hh index 1f8d84e531e..04855c070fd 100644 --- a/src/libfetchers/filtering-source-accessor.hh +++ b/src/libfetchers/include/nix/filtering-source-accessor.hh @@ -1,6 +1,6 @@ #pragma once -#include "source-path.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libfetchers/git-lfs-fetch.hh b/src/libfetchers/include/nix/git-lfs-fetch.hh similarity index 92% rename from src/libfetchers/git-lfs-fetch.hh rename to src/libfetchers/include/nix/git-lfs-fetch.hh index 36df9196207..cd7c86a828f 100644 --- a/src/libfetchers/git-lfs-fetch.hh +++ b/src/libfetchers/include/nix/git-lfs-fetch.hh @@ -1,6 +1,6 @@ -#include "canon-path.hh" -#include "serialise.hh" -#include "url.hh" +#include "nix/canon-path.hh" +#include "nix/serialise.hh" +#include "nix/url.hh" #include diff --git a/src/libfetchers/git-utils.hh b/src/libfetchers/include/nix/git-utils.hh similarity index 98% rename from src/libfetchers/git-utils.hh rename to src/libfetchers/include/nix/git-utils.hh index c683bd05805..65c86a7c4d0 100644 --- a/src/libfetchers/git-utils.hh +++ b/src/libfetchers/include/nix/git-utils.hh @@ -1,7 +1,7 @@ #pragma once -#include "filtering-source-accessor.hh" -#include "fs-sink.hh" +#include "nix/filtering-source-accessor.hh" +#include "nix/fs-sink.hh" namespace nix { diff --git a/src/libfetchers/include/nix/meson.build b/src/libfetchers/include/nix/meson.build new file mode 100644 index 00000000000..eb02be43cc1 --- /dev/null +++ b/src/libfetchers/include/nix/meson.build @@ -0,0 +1,15 @@ +include_dirs = [include_directories('..')] + +headers = files( + 'attrs.hh', + 'cache.hh', + 'fetch-settings.hh', + 'fetch-to-store.hh', + 'fetchers.hh', + 'filtering-source-accessor.hh', + 'git-lfs-fetch.hh', + 'git-utils.hh', + 'registry.hh', + 'store-path-accessor.hh', + 'tarball.hh', +) diff --git a/src/libfetchers/registry.hh b/src/libfetchers/include/nix/registry.hh similarity index 96% rename from src/libfetchers/registry.hh rename to src/libfetchers/include/nix/registry.hh index 8f47e15905e..7c091ea12c9 100644 --- a/src/libfetchers/registry.hh +++ b/src/libfetchers/include/nix/registry.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "fetchers.hh" +#include "nix/types.hh" +#include "nix/fetchers.hh" namespace nix { class Store; } diff --git a/src/libfetchers/store-path-accessor.hh b/src/libfetchers/include/nix/store-path-accessor.hh similarity index 87% rename from src/libfetchers/store-path-accessor.hh rename to src/libfetchers/include/nix/store-path-accessor.hh index 989cf3fa29c..8e65fda1160 100644 --- a/src/libfetchers/store-path-accessor.hh +++ b/src/libfetchers/include/nix/store-path-accessor.hh @@ -1,6 +1,6 @@ #pragma once -#include "source-path.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libfetchers/tarball.hh b/src/libfetchers/include/nix/tarball.hh similarity index 90% rename from src/libfetchers/tarball.hh rename to src/libfetchers/include/nix/tarball.hh index 2042041d5ad..63a21712496 100644 --- a/src/libfetchers/tarball.hh +++ b/src/libfetchers/include/nix/tarball.hh @@ -2,10 +2,10 @@ #include -#include "hash.hh" -#include "path.hh" -#include "ref.hh" -#include "types.hh" +#include "nix/hash.hh" +#include "nix/path.hh" +#include "nix/ref.hh" +#include "nix/types.hh" namespace nix { class Store; diff --git a/src/libfetchers/indirect.cc b/src/libfetchers/indirect.cc index 0e1b86711f0..7e5eb0be348 100644 --- a/src/libfetchers/indirect.cc +++ b/src/libfetchers/indirect.cc @@ -1,6 +1,6 @@ -#include "fetchers.hh" -#include "url-parts.hh" -#include "path.hh" +#include "nix/fetchers.hh" +#include "nix/url-parts.hh" +#include "nix/path.hh" namespace nix::fetchers { diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc index 61cbca202c3..73e677f447b 100644 --- a/src/libfetchers/mercurial.cc +++ b/src/libfetchers/mercurial.cc @@ -1,13 +1,13 @@ -#include "fetchers.hh" -#include "processes.hh" -#include "users.hh" -#include "cache.hh" -#include "globals.hh" -#include "tarfile.hh" -#include "store-api.hh" -#include "url-parts.hh" -#include "store-path-accessor.hh" -#include "fetch-settings.hh" +#include "nix/fetchers.hh" +#include "nix/processes.hh" +#include "nix/users.hh" +#include "nix/cache.hh" +#include "nix/globals.hh" +#include "nix/tarfile.hh" +#include "nix/store-api.hh" +#include "nix/url-parts.hh" +#include "nix/store-path-accessor.hh" +#include "nix/fetch-settings.hh" #include diff --git a/src/libfetchers/meson.build b/src/libfetchers/meson.build index f8efbc8d3e0..aaf52ff7444 100644 --- a/src/libfetchers/meson.build +++ b/src/libfetchers/meson.build @@ -33,9 +33,9 @@ deps_private += libgit2 add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - # '-include', 'config-fetchers.h', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + # '-include', 'nix_api_fetchers_config.h', language : 'cpp', ) @@ -60,21 +60,7 @@ sources = files( 'tarball.cc', ) -include_dirs = [include_directories('.')] - -headers = files( - 'attrs.hh', - 'cache.hh', - 'fetch-settings.hh', - 'fetch-to-store.hh', - 'fetchers.hh', - 'filtering-source-accessor.hh', - 'git-lfs-fetch.hh', - 'git-utils.hh', - 'registry.hh', - 'store-path-accessor.hh', - 'tarball.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libfetchers/package.nix b/src/libfetchers/package.nix index 3f52e987800..aaeaa4b5def 100644 --- a/src/libfetchers/package.nix +++ b/src/libfetchers/package.nix @@ -27,6 +27,7 @@ mkMesonLibrary (finalAttrs: { ../../.version ./.version ./meson.build + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libfetchers/path.cc b/src/libfetchers/path.cc index bdc7538e20f..95bc2ce5021 100644 --- a/src/libfetchers/path.cc +++ b/src/libfetchers/path.cc @@ -1,7 +1,7 @@ -#include "fetchers.hh" -#include "store-api.hh" -#include "archive.hh" -#include "store-path-accessor.hh" +#include "nix/fetchers.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/store-path-accessor.hh" namespace nix::fetchers { diff --git a/src/libfetchers/registry.cc b/src/libfetchers/registry.cc index c18e12d2339..ec470159bc0 100644 --- a/src/libfetchers/registry.cc +++ b/src/libfetchers/registry.cc @@ -1,10 +1,10 @@ -#include "fetch-settings.hh" -#include "registry.hh" -#include "tarball.hh" -#include "users.hh" -#include "globals.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/fetch-settings.hh" +#include "nix/registry.hh" +#include "nix/tarball.hh" +#include "nix/users.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" #include diff --git a/src/libfetchers/store-path-accessor.cc b/src/libfetchers/store-path-accessor.cc index 528bf2a4f51..997582b577c 100644 --- a/src/libfetchers/store-path-accessor.cc +++ b/src/libfetchers/store-path-accessor.cc @@ -1,5 +1,5 @@ -#include "store-path-accessor.hh" -#include "store-api.hh" +#include "nix/store-path-accessor.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index 699612e250c..01bff82f720 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -1,14 +1,14 @@ -#include "tarball.hh" -#include "fetchers.hh" -#include "cache.hh" -#include "filetransfer.hh" -#include "store-api.hh" -#include "archive.hh" -#include "tarfile.hh" -#include "types.hh" -#include "store-path-accessor.hh" -#include "store-api.hh" -#include "git-utils.hh" +#include "nix/tarball.hh" +#include "nix/fetchers.hh" +#include "nix/cache.hh" +#include "nix/filetransfer.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/tarfile.hh" +#include "nix/types.hh" +#include "nix/store-path-accessor.hh" +#include "nix/store-api.hh" +#include "nix/git-utils.hh" namespace nix::fetchers { diff --git a/src/libflake-c/meson.build b/src/libflake-c/meson.build index 469e0ade432..ec754dfaaa9 100644 --- a/src/libflake-c/meson.build +++ b/src/libflake-c/meson.build @@ -32,11 +32,11 @@ add_project_arguments( # It would be nice for our headers to be idempotent instead. # From C++ libraries, only for internals - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', # not generated (yet?) - # '-include', 'config-flake.hh', + # '-include', 'nix/config-flake.hh', language : 'cpp', ) @@ -69,7 +69,7 @@ this_library = library( install : true, ) -install_headers(headers, subdir : 'nix', preserve_path : true) +install_headers(headers, preserve_path : true) libraries_private = [] diff --git a/src/libflake-c/nix_api_flake.cc b/src/libflake-c/nix_api_flake.cc index 2479bf2e020..a1b586e82ad 100644 --- a/src/libflake-c/nix_api_flake.cc +++ b/src/libflake-c/nix_api_flake.cc @@ -3,7 +3,7 @@ #include "nix_api_util_internal.h" #include "nix_api_expr_internal.h" -#include "flake/flake.hh" +#include "nix/flake/flake.hh" nix_flake_settings * nix_flake_settings_new(nix_c_context * context) { diff --git a/src/libflake-c/nix_api_flake_internal.hh b/src/libflake-c/nix_api_flake_internal.hh index 4c154a34229..4565b4f5dca 100644 --- a/src/libflake-c/nix_api_flake_internal.hh +++ b/src/libflake-c/nix_api_flake_internal.hh @@ -1,7 +1,7 @@ #pragma once -#include "ref.hh" -#include "flake/settings.hh" +#include "nix/ref.hh" +#include "nix/flake/settings.hh" struct nix_flake_settings { diff --git a/src/libflake-tests/flakeref.cc b/src/libflake-tests/flakeref.cc index 2b1f5124b52..f378ba6d6e8 100644 --- a/src/libflake-tests/flakeref.cc +++ b/src/libflake-tests/flakeref.cc @@ -1,7 +1,7 @@ #include -#include "fetch-settings.hh" -#include "flake/flakeref.hh" +#include "nix/fetch-settings.hh" +#include "nix/flake/flakeref.hh" namespace nix { diff --git a/src/libflake-tests/meson.build b/src/libflake-tests/meson.build index 1c8765f21d6..4012582f2ba 100644 --- a/src/libflake-tests/meson.build +++ b/src/libflake-tests/meson.build @@ -35,9 +35,9 @@ deps_private += gtest add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', language : 'cpp', ) diff --git a/src/libflake-tests/nix_api_flake.cc b/src/libflake-tests/nix_api_flake.cc index 9aa7773a0a1..eb6de4e6e3b 100644 --- a/src/libflake-tests/nix_api_flake.cc +++ b/src/libflake-tests/nix_api_flake.cc @@ -6,8 +6,8 @@ #include "nix_api_value.h" #include "nix_api_flake.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" #include #include diff --git a/src/libflake-tests/url-name.cc b/src/libflake-tests/url-name.cc index 15bc6b11165..c795850f97b 100644 --- a/src/libflake-tests/url-name.cc +++ b/src/libflake-tests/url-name.cc @@ -1,4 +1,4 @@ -#include "flake/url-name.hh" +#include "nix/flake/url-name.hh" #include namespace nix { diff --git a/src/libflake/flake/config.cc b/src/libflake/flake/config.cc index 4879de46330..a0ddf0387f5 100644 --- a/src/libflake/flake/config.cc +++ b/src/libflake/flake/config.cc @@ -1,7 +1,7 @@ -#include "users.hh" -#include "config-global.hh" -#include "flake/settings.hh" -#include "flake.hh" +#include "nix/users.hh" +#include "nix/config-global.hh" +#include "nix/flake/settings.hh" +#include "nix/flake/flake.hh" #include diff --git a/src/libflake/flake/flake-primops.cc b/src/libflake/flake/flake-primops.cc index 98ebdee5fc8..508274dbd0f 100644 --- a/src/libflake/flake/flake-primops.cc +++ b/src/libflake/flake/flake-primops.cc @@ -1,8 +1,8 @@ -#include "flake-primops.hh" -#include "eval.hh" -#include "flake.hh" -#include "flakeref.hh" -#include "settings.hh" +#include "nix/flake/flake-primops.hh" +#include "nix/eval.hh" +#include "nix/flake/flake.hh" +#include "nix/flake/flakeref.hh" +#include "nix/flake/settings.hh" namespace nix::flake::primops { diff --git a/src/libflake/flake/flake.cc b/src/libflake/flake/flake.cc index 18325913799..8bf9fa19609 100644 --- a/src/libflake/flake/flake.cc +++ b/src/libflake/flake/flake.cc @@ -1,23 +1,22 @@ -#include "terminal.hh" -#include "flake.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "lockfile.hh" -#include "primops.hh" -#include "eval-inline.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "finally.hh" -#include "fetch-settings.hh" -#include "flake/settings.hh" -#include "value-to-json.hh" -#include "local-fs-store.hh" -#include "fetch-to-store.hh" +#include "nix/terminal.hh" +#include "nix/flake/flake.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/flake/lockfile.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/finally.hh" +#include "nix/fetch-settings.hh" +#include "nix/flake/settings.hh" +#include "nix/value-to-json.hh" +#include "nix/local-fs-store.hh" +#include "nix/fetch-to-store.hh" +#include "nix/memory-source-accessor.hh" #include -#include "memory-source-accessor.hh" - namespace nix { using namespace flake; diff --git a/src/libflake/flake/flakeref.cc b/src/libflake/flake/flakeref.cc index 4fc720eb5a3..340fe4dc73c 100644 --- a/src/libflake/flake/flakeref.cc +++ b/src/libflake/flake/flakeref.cc @@ -1,8 +1,8 @@ -#include "flakeref.hh" -#include "store-api.hh" -#include "url.hh" -#include "url-parts.hh" -#include "fetchers.hh" +#include "nix/flake/flakeref.hh" +#include "nix/store-api.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" +#include "nix/fetchers.hh" namespace nix { diff --git a/src/libflake/flake/lockfile.cc b/src/libflake/flake/lockfile.cc index b0971a6969a..08a3843668a 100644 --- a/src/libflake/flake/lockfile.cc +++ b/src/libflake/flake/lockfile.cc @@ -1,10 +1,10 @@ #include -#include "fetch-settings.hh" -#include "flake/settings.hh" -#include "lockfile.hh" -#include "store-api.hh" -#include "strings.hh" +#include "nix/fetch-settings.hh" +#include "nix/flake/settings.hh" +#include "nix/flake/lockfile.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libflake/flake/settings.cc b/src/libflake/flake/settings.cc index cac7c4384b8..bab7f9439db 100644 --- a/src/libflake/flake/settings.cc +++ b/src/libflake/flake/settings.cc @@ -1,5 +1,5 @@ -#include "flake/settings.hh" -#include "flake/flake-primops.hh" +#include "nix/flake/settings.hh" +#include "nix/flake/flake-primops.hh" namespace nix::flake { diff --git a/src/libflake/flake/url-name.cc b/src/libflake/flake/url-name.cc index d62b345522a..3e3311cf740 100644 --- a/src/libflake/flake/url-name.cc +++ b/src/libflake/flake/url-name.cc @@ -1,4 +1,4 @@ -#include "url-name.hh" +#include "nix/flake/url-name.hh" #include #include diff --git a/src/libflake/flake/flake-primops.hh b/src/libflake/include/nix/flake/flake-primops.hh similarity index 75% rename from src/libflake/flake/flake-primops.hh rename to src/libflake/include/nix/flake/flake-primops.hh index 2030605637c..07be7512319 100644 --- a/src/libflake/flake/flake-primops.hh +++ b/src/libflake/include/nix/flake/flake-primops.hh @@ -1,7 +1,7 @@ #pragma once -#include "eval.hh" -#include "flake/settings.hh" +#include "nix/eval.hh" +#include "nix/flake/settings.hh" namespace nix::flake::primops { @@ -13,4 +13,4 @@ nix::PrimOp getFlake(const Settings & settings); extern nix::PrimOp parseFlakeRef; extern nix::PrimOp flakeRefToString; -} // namespace nix::flake \ No newline at end of file +} // namespace nix::flake diff --git a/src/libflake/flake/flake.hh b/src/libflake/include/nix/flake/flake.hh similarity index 98% rename from src/libflake/flake/flake.hh rename to src/libflake/include/nix/flake/flake.hh index d7a15158715..2fa3850604c 100644 --- a/src/libflake/flake/flake.hh +++ b/src/libflake/include/nix/flake/flake.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "types.hh" -#include "flakeref.hh" -#include "lockfile.hh" -#include "value.hh" +#include "nix/types.hh" +#include "nix/flake/flakeref.hh" +#include "nix/flake/lockfile.hh" +#include "nix/value.hh" namespace nix { diff --git a/src/libflake/flake/flakeref.hh b/src/libflake/include/nix/flake/flakeref.hh similarity index 97% rename from src/libflake/flake/flakeref.hh rename to src/libflake/include/nix/flake/flakeref.hh index d3c15018e24..93ebaa497bf 100644 --- a/src/libflake/flake/flakeref.hh +++ b/src/libflake/include/nix/flake/flakeref.hh @@ -3,10 +3,10 @@ #include -#include "types.hh" -#include "fetchers.hh" -#include "outputs-spec.hh" -#include "registry.hh" +#include "nix/types.hh" +#include "nix/fetchers.hh" +#include "nix/outputs-spec.hh" +#include "nix/registry.hh" namespace nix { diff --git a/src/libflake/flake/lockfile.hh b/src/libflake/include/nix/flake/lockfile.hh similarity index 98% rename from src/libflake/flake/lockfile.hh rename to src/libflake/include/nix/flake/lockfile.hh index cbc6d01ebce..97bd7a49538 100644 --- a/src/libflake/flake/lockfile.hh +++ b/src/libflake/include/nix/flake/lockfile.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "flakeref.hh" +#include "nix/flake/flakeref.hh" #include diff --git a/src/libflake/flake/settings.hh b/src/libflake/include/nix/flake/settings.hh similarity index 97% rename from src/libflake/flake/settings.hh rename to src/libflake/include/nix/flake/settings.hh index 5f0d9fb21c3..54f501e1196 100644 --- a/src/libflake/flake/settings.hh +++ b/src/libflake/include/nix/flake/settings.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "config.hh" +#include "nix/config.hh" #include diff --git a/src/libflake/flake/url-name.hh b/src/libflake/include/nix/flake/url-name.hh similarity index 85% rename from src/libflake/flake/url-name.hh rename to src/libflake/include/nix/flake/url-name.hh index 6f32754d268..4577e8f38d6 100644 --- a/src/libflake/flake/url-name.hh +++ b/src/libflake/include/nix/flake/url-name.hh @@ -1,7 +1,7 @@ -#include "url.hh" -#include "url-parts.hh" -#include "util.hh" -#include "split.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" +#include "nix/util.hh" +#include "nix/split.hh" namespace nix { diff --git a/src/libflake/include/nix/meson.build b/src/libflake/include/nix/meson.build new file mode 100644 index 00000000000..023bd64bdbc --- /dev/null +++ b/src/libflake/include/nix/meson.build @@ -0,0 +1,11 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +headers = files( + 'flake/flake.hh', + 'flake/flakeref.hh', + 'flake/lockfile.hh', + 'flake/settings.hh', + 'flake/url-name.hh', +) diff --git a/src/libflake/meson.build b/src/libflake/meson.build index b780722de95..e231de9c137 100644 --- a/src/libflake/meson.build +++ b/src/libflake/meson.build @@ -30,10 +30,10 @@ deps_public += nlohmann_json add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - # '-include', 'config-fetchers.h', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + # '-include', 'nix_api_fetchers_config.h', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -58,15 +58,7 @@ sources = files( 'flake/url-name.cc', ) -include_dirs = [include_directories('.')] - -headers = files( - 'flake/flake.hh', - 'flake/flakeref.hh', - 'flake/lockfile.hh', - 'flake/settings.hh', - 'flake/url-name.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libflake/package.nix b/src/libflake/package.nix index d7250c252c6..683880b20d0 100644 --- a/src/libflake/package.nix +++ b/src/libflake/package.nix @@ -28,6 +28,7 @@ mkMesonLibrary (finalAttrs: { ../../.version ./.version ./meson.build + ./include/nix/meson.build ./call-flake.nix (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) diff --git a/src/libmain-c/meson.build b/src/libmain-c/meson.build index 0e9380a127c..0229ef86b5f 100644 --- a/src/libmain-c/meson.build +++ b/src/libmain-c/meson.build @@ -30,8 +30,8 @@ add_project_arguments( # It would be nice for our headers to be idempotent instead. # From C++ libraries, only for internals - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', language : 'cpp', ) @@ -61,7 +61,7 @@ this_library = library( install : true, ) -install_headers(headers, subdir : 'nix', preserve_path : true) +install_headers(headers, preserve_path : true) libraries_private = [] diff --git a/src/libmain-c/nix_api_main.cc b/src/libmain-c/nix_api_main.cc index 692d53f47e0..61dbceff8c4 100644 --- a/src/libmain-c/nix_api_main.cc +++ b/src/libmain-c/nix_api_main.cc @@ -3,7 +3,7 @@ #include "nix_api_util.h" #include "nix_api_util_internal.h" -#include "plugin.hh" +#include "nix/plugin.hh" nix_err nix_init_plugins(nix_c_context * context) { diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc index 0e347d26f80..090d8b46462 100644 --- a/src/libmain/common-args.cc +++ b/src/libmain/common-args.cc @@ -1,13 +1,13 @@ #include -#include "common-args.hh" -#include "args/root.hh" -#include "config-global.hh" -#include "globals.hh" -#include "logging.hh" -#include "loggers.hh" -#include "util.hh" -#include "plugin.hh" +#include "nix/common-args.hh" +#include "nix/args/root.hh" +#include "nix/config-global.hh" +#include "nix/globals.hh" +#include "nix/logging.hh" +#include "nix/loggers.hh" +#include "nix/util.hh" +#include "nix/plugin.hh" namespace nix { diff --git a/src/libmain/common-args.hh b/src/libmain/include/nix/common-args.hh similarity index 98% rename from src/libmain/common-args.hh rename to src/libmain/include/nix/common-args.hh index 7481702f6f5..f7b2e2d1c31 100644 --- a/src/libmain/common-args.hh +++ b/src/libmain/include/nix/common-args.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "args.hh" -#include "repair-flag.hh" +#include "nix/args.hh" +#include "nix/repair-flag.hh" namespace nix { diff --git a/src/libmain/loggers.hh b/src/libmain/include/nix/loggers.hh similarity index 90% rename from src/libmain/loggers.hh rename to src/libmain/include/nix/loggers.hh index 98b287fa73a..dabdae83c40 100644 --- a/src/libmain/loggers.hh +++ b/src/libmain/include/nix/loggers.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libmain/include/nix/meson.build b/src/libmain/include/nix/meson.build new file mode 100644 index 00000000000..8584b9042ad --- /dev/null +++ b/src/libmain/include/nix/meson.build @@ -0,0 +1,16 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +config_h = configure_file( + configuration : configdata, + output : 'config-main.hh', +) + +headers = [config_h] + files( + 'common-args.hh', + 'loggers.hh', + 'plugin.hh', + 'progress-bar.hh', + 'shared.hh', +) diff --git a/src/libmain/plugin.hh b/src/libmain/include/nix/plugin.hh similarity index 100% rename from src/libmain/plugin.hh rename to src/libmain/include/nix/plugin.hh diff --git a/src/libmain/progress-bar.hh b/src/libmain/include/nix/progress-bar.hh similarity index 76% rename from src/libmain/progress-bar.hh rename to src/libmain/include/nix/progress-bar.hh index fc1b0fe78ab..195c5ceeeba 100644 --- a/src/libmain/progress-bar.hh +++ b/src/libmain/include/nix/progress-bar.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "logging.hh" +#include "nix/logging.hh" namespace nix { diff --git a/src/libmain/shared.hh b/src/libmain/include/nix/shared.hh similarity index 94% rename from src/libmain/shared.hh rename to src/libmain/include/nix/shared.hh index a6a18ceb068..8144ad84528 100644 --- a/src/libmain/shared.hh +++ b/src/libmain/include/nix/shared.hh @@ -1,13 +1,13 @@ #pragma once ///@file -#include "file-descriptor.hh" -#include "processes.hh" -#include "args.hh" -#include "args/root.hh" -#include "common-args.hh" -#include "path.hh" -#include "derived-path.hh" +#include "nix/file-descriptor.hh" +#include "nix/processes.hh" +#include "nix/args.hh" +#include "nix/args/root.hh" +#include "nix/common-args.hh" +#include "nix/path.hh" +#include "nix/derived-path.hh" #include diff --git a/src/libmain/loggers.cc b/src/libmain/loggers.cc index 07d83a9603a..1cf7c6dcf27 100644 --- a/src/libmain/loggers.cc +++ b/src/libmain/loggers.cc @@ -1,6 +1,6 @@ -#include "loggers.hh" -#include "environment-variables.hh" -#include "progress-bar.hh" +#include "nix/loggers.hh" +#include "nix/environment-variables.hh" +#include "nix/progress-bar.hh" namespace nix { diff --git a/src/libmain/meson.build b/src/libmain/meson.build index 7c24abb294a..08b0bdb4fdf 100644 --- a/src/libmain/meson.build +++ b/src/libmain/meson.build @@ -42,17 +42,12 @@ configdata.set( description: 'Optionally used for buffering on standard error' ) -config_h = configure_file( - configuration : configdata, - output : 'config-main.hh', -) - add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-main.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-main.hh', language : 'cpp', ) @@ -72,15 +67,7 @@ if host_machine.system() != 'windows' ) endif -include_dirs = [include_directories('.')] - -headers = files( - 'common-args.hh', - 'loggers.hh', - 'plugin.hh', - 'progress-bar.hh', - 'shared.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libmain/package.nix b/src/libmain/package.nix index c03697c48da..31b36dbcf90 100644 --- a/src/libmain/package.nix +++ b/src/libmain/package.nix @@ -27,6 +27,7 @@ mkMesonLibrary (finalAttrs: { ../../.version ./.version ./meson.build + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libmain/plugin.cc b/src/libmain/plugin.cc index ccfd7f9003a..db1067c1a10 100644 --- a/src/libmain/plugin.cc +++ b/src/libmain/plugin.cc @@ -4,8 +4,8 @@ #include -#include "config-global.hh" -#include "signals.hh" +#include "nix/config-global.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index 2d4d901db51..eb4db83e636 100644 --- a/src/libmain/progress-bar.cc +++ b/src/libmain/progress-bar.cc @@ -1,8 +1,8 @@ -#include "progress-bar.hh" -#include "terminal.hh" -#include "sync.hh" -#include "store-api.hh" -#include "names.hh" +#include "nix/progress-bar.hh" +#include "nix/terminal.hh" +#include "nix/sync.hh" +#include "nix/store-api.hh" +#include "nix/names.hh" #include #include diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index bc2ffc9baca..639977efc28 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -1,11 +1,11 @@ -#include "globals.hh" -#include "current-process.hh" -#include "shared.hh" -#include "store-api.hh" -#include "gc-store.hh" -#include "loggers.hh" -#include "progress-bar.hh" -#include "signals.hh" +#include "nix/globals.hh" +#include "nix/current-process.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/gc-store.hh" +#include "nix/loggers.hh" +#include "nix/progress-bar.hh" +#include "nix/signals.hh" #include #include @@ -22,8 +22,8 @@ #include -#include "exit.hh" -#include "strings.hh" +#include "nix/exit.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libmain/unix/stack.cc b/src/libmain/unix/stack.cc index 10f71c1dcad..b4ec5967e15 100644 --- a/src/libmain/unix/stack.cc +++ b/src/libmain/unix/stack.cc @@ -1,5 +1,5 @@ -#include "error.hh" -#include "shared.hh" +#include "nix/error.hh" +#include "nix/shared.hh" #include #include diff --git a/src/libstore-c/meson.build b/src/libstore-c/meson.build index 2e2275feeaf..f7e192f3a48 100644 --- a/src/libstore-c/meson.build +++ b/src/libstore-c/meson.build @@ -28,8 +28,8 @@ add_project_arguments( # It would be nice for our headers to be idempotent instead. # From C++ libraries, only for internals - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', language : 'cpp', ) @@ -62,7 +62,7 @@ this_library = library( install : true, ) -install_headers(headers, subdir : 'nix', preserve_path : true) +install_headers(headers, preserve_path : true) libraries_private = [] diff --git a/src/libstore-c/nix_api_store.cc b/src/libstore-c/nix_api_store.cc index bc306e0d0ad..ab0af1f5219 100644 --- a/src/libstore-c/nix_api_store.cc +++ b/src/libstore-c/nix_api_store.cc @@ -3,11 +3,11 @@ #include "nix_api_util.h" #include "nix_api_util_internal.h" -#include "path.hh" -#include "store-api.hh" -#include "build-result.hh" +#include "nix/path.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" -#include "globals.hh" +#include "nix/globals.hh" nix_err nix_libstore_init(nix_c_context * context) { diff --git a/src/libstore-c/nix_api_store_internal.h b/src/libstore-c/nix_api_store_internal.h index 13db0c07cf8..e32cdfcca96 100644 --- a/src/libstore-c/nix_api_store_internal.h +++ b/src/libstore-c/nix_api_store_internal.h @@ -1,6 +1,6 @@ #ifndef NIX_API_STORE_INTERNAL_H #define NIX_API_STORE_INTERNAL_H -#include "store-api.hh" +#include "nix/store-api.hh" struct Store { diff --git a/src/libstore-test-support/tests/derived-path.cc b/src/libstore-test-support/derived-path.cc similarity index 98% rename from src/libstore-test-support/tests/derived-path.cc rename to src/libstore-test-support/derived-path.cc index b9f6a3171cf..4c04facce8a 100644 --- a/src/libstore-test-support/tests/derived-path.cc +++ b/src/libstore-test-support/derived-path.cc @@ -2,7 +2,7 @@ #include -#include "tests/derived-path.hh" +#include "nix/tests/derived-path.hh" namespace rc { using namespace nix; diff --git a/src/libstore-test-support/include/nix/meson.build b/src/libstore-test-support/include/nix/meson.build new file mode 100644 index 00000000000..ed3e4f2ff90 --- /dev/null +++ b/src/libstore-test-support/include/nix/meson.build @@ -0,0 +1,12 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +headers = files( + 'tests/derived-path.hh', + 'tests/libstore.hh', + 'tests/nix_api_store.hh', + 'tests/outputs-spec.hh', + 'tests/path.hh', + 'tests/protocol.hh', +) diff --git a/src/libstore-test-support/tests/derived-path.hh b/src/libstore-test-support/include/nix/tests/derived-path.hh similarity index 86% rename from src/libstore-test-support/tests/derived-path.hh rename to src/libstore-test-support/include/nix/tests/derived-path.hh index 98d61f2283d..57cad487c3a 100644 --- a/src/libstore-test-support/tests/derived-path.hh +++ b/src/libstore-test-support/include/nix/tests/derived-path.hh @@ -3,10 +3,10 @@ #include -#include +#include "nix/derived-path.hh" -#include "tests/path.hh" -#include "tests/outputs-spec.hh" +#include "nix/tests/path.hh" +#include "nix/tests/outputs-spec.hh" namespace rc { using namespace nix; diff --git a/src/libstore-test-support/tests/libstore.hh b/src/libstore-test-support/include/nix/tests/libstore.hh similarity index 94% rename from src/libstore-test-support/tests/libstore.hh rename to src/libstore-test-support/include/nix/tests/libstore.hh index 699ba957ec8..02e818f9768 100644 --- a/src/libstore-test-support/tests/libstore.hh +++ b/src/libstore-test-support/include/nix/tests/libstore.hh @@ -4,7 +4,7 @@ #include #include -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore-test-support/tests/nix_api_store.hh b/src/libstore-test-support/include/nix/tests/nix_api_store.hh similarity index 96% rename from src/libstore-test-support/tests/nix_api_store.hh rename to src/libstore-test-support/include/nix/tests/nix_api_store.hh index b7d5c2c33f7..f418b563d76 100644 --- a/src/libstore-test-support/tests/nix_api_store.hh +++ b/src/libstore-test-support/include/nix/tests/nix_api_store.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "tests/nix_api_util.hh" +#include "nix/tests/nix_api_util.hh" -#include "file-system.hh" +#include "nix/file-system.hh" #include #include "nix_api_store.h" diff --git a/src/libstore-test-support/tests/outputs-spec.hh b/src/libstore-test-support/include/nix/tests/outputs-spec.hh similarity index 76% rename from src/libstore-test-support/tests/outputs-spec.hh rename to src/libstore-test-support/include/nix/tests/outputs-spec.hh index f5bf9042d20..14a74d2e4ad 100644 --- a/src/libstore-test-support/tests/outputs-spec.hh +++ b/src/libstore-test-support/include/nix/tests/outputs-spec.hh @@ -3,9 +3,9 @@ #include -#include +#include "nix/outputs-spec.hh" -#include "tests/path.hh" +#include "nix/tests/path.hh" namespace rc { using namespace nix; diff --git a/src/libstore-test-support/tests/path.hh b/src/libstore-test-support/include/nix/tests/path.hh similarity index 94% rename from src/libstore-test-support/tests/path.hh rename to src/libstore-test-support/include/nix/tests/path.hh index 4751b3373a3..eebcda28e9a 100644 --- a/src/libstore-test-support/tests/path.hh +++ b/src/libstore-test-support/include/nix/tests/path.hh @@ -3,7 +3,7 @@ #include -#include +#include "nix/path.hh" namespace nix { diff --git a/src/libstore-test-support/tests/protocol.hh b/src/libstore-test-support/include/nix/tests/protocol.hh similarity index 96% rename from src/libstore-test-support/tests/protocol.hh rename to src/libstore-test-support/include/nix/tests/protocol.hh index 3f6799d1ccb..6c7d69adb9e 100644 --- a/src/libstore-test-support/tests/protocol.hh +++ b/src/libstore-test-support/include/nix/tests/protocol.hh @@ -4,8 +4,8 @@ #include #include -#include "tests/libstore.hh" -#include "tests/characterization.hh" +#include "nix/tests/libstore.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-test-support/meson.build b/src/libstore-test-support/meson.build index 59d649889e2..c7d9689bf84 100644 --- a/src/libstore-test-support/meson.build +++ b/src/libstore-test-support/meson.build @@ -30,29 +30,20 @@ deps_public += rapidcheck add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', language : 'cpp', ) subdir('nix-meson-build-support/common') sources = files( - 'tests/derived-path.cc', - 'tests/outputs-spec.cc', - 'tests/path.cc', + 'derived-path.cc', + 'outputs-spec.cc', + 'path.cc', ) -include_dirs = [include_directories('.')] - -headers = files( - 'tests/derived-path.hh', - 'tests/libstore.hh', - 'tests/nix_api_store.hh', - 'tests/outputs-spec.hh', - 'tests/path.hh', - 'tests/protocol.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libstore-test-support/tests/outputs-spec.cc b/src/libstore-test-support/outputs-spec.cc similarity index 95% rename from src/libstore-test-support/tests/outputs-spec.cc rename to src/libstore-test-support/outputs-spec.cc index 1a3020f1724..e1b98772043 100644 --- a/src/libstore-test-support/tests/outputs-spec.cc +++ b/src/libstore-test-support/outputs-spec.cc @@ -1,4 +1,4 @@ -#include "tests/outputs-spec.hh" +#include "nix/tests/outputs-spec.hh" #include diff --git a/src/libstore-test-support/package.nix b/src/libstore-test-support/package.nix index ccac25ee16a..c223ad1166b 100644 --- a/src/libstore-test-support/package.nix +++ b/src/libstore-test-support/package.nix @@ -29,6 +29,7 @@ mkMesonLibrary (finalAttrs: { ./.version ./meson.build # ./meson.options + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libstore-test-support/tests/path.cc b/src/libstore-test-support/path.cc similarity index 93% rename from src/libstore-test-support/tests/path.cc rename to src/libstore-test-support/path.cc index 8ddda80277c..945230187c2 100644 --- a/src/libstore-test-support/tests/path.cc +++ b/src/libstore-test-support/path.cc @@ -3,11 +3,11 @@ #include -#include "path-regex.hh" -#include "store-api.hh" +#include "nix/path-regex.hh" +#include "nix/store-api.hh" -#include "tests/hash.hh" -#include "tests/path.hh" +#include "nix/tests/hash.hh" +#include "nix/tests/path.hh" namespace nix { diff --git a/src/libstore-tests/common-protocol.cc b/src/libstore-tests/common-protocol.cc index c8f6dd002d5..39293b0c0c6 100644 --- a/src/libstore-tests/common-protocol.cc +++ b/src/libstore-tests/common-protocol.cc @@ -3,11 +3,11 @@ #include #include -#include "common-protocol.hh" -#include "common-protocol-impl.hh" -#include "build-result.hh" -#include "tests/protocol.hh" -#include "tests/characterization.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/tests/protocol.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/content-address.cc b/src/libstore-tests/content-address.cc index 72eb84fec11..428ebcd7679 100644 --- a/src/libstore-tests/content-address.cc +++ b/src/libstore-tests/content-address.cc @@ -1,6 +1,6 @@ #include -#include "content-address.hh" +#include "nix/content-address.hh" namespace nix { diff --git a/src/libstore-tests/derivation-advanced-attrs.cc b/src/libstore-tests/derivation-advanced-attrs.cc index 107cf13e38d..d8f9642ab16 100644 --- a/src/libstore-tests/derivation-advanced-attrs.cc +++ b/src/libstore-tests/derivation-advanced-attrs.cc @@ -1,16 +1,16 @@ #include #include -#include "experimental-features.hh" -#include "derivations.hh" -#include "derivations.hh" -#include "derivation-options.hh" -#include "parsed-derivations.hh" -#include "types.hh" -#include "json-utils.hh" - -#include "tests/libstore.hh" -#include "tests/characterization.hh" +#include "nix/experimental-features.hh" +#include "nix/derivations.hh" +#include "nix/derivations.hh" +#include "nix/derivation-options.hh" +#include "nix/parsed-derivations.hh" +#include "nix/types.hh" +#include "nix/json-utils.hh" + +#include "nix/tests/libstore.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/derivation.cc b/src/libstore-tests/derivation.cc index 14652921abc..5ef1c0094d3 100644 --- a/src/libstore-tests/derivation.cc +++ b/src/libstore-tests/derivation.cc @@ -1,11 +1,11 @@ #include #include -#include "experimental-features.hh" -#include "derivations.hh" +#include "nix/experimental-features.hh" +#include "nix/derivations.hh" -#include "tests/libstore.hh" -#include "tests/characterization.hh" +#include "nix/tests/libstore.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/derived-path.cc b/src/libstore-tests/derived-path.cc index 97ded518385..e6a2fcacee9 100644 --- a/src/libstore-tests/derived-path.cc +++ b/src/libstore-tests/derived-path.cc @@ -3,8 +3,8 @@ #include #include -#include "tests/derived-path.hh" -#include "tests/libstore.hh" +#include "nix/tests/derived-path.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/downstream-placeholder.cc b/src/libstore-tests/downstream-placeholder.cc index fd29530acfc..76c6410ad60 100644 --- a/src/libstore-tests/downstream-placeholder.cc +++ b/src/libstore-tests/downstream-placeholder.cc @@ -1,6 +1,6 @@ #include -#include "downstream-placeholder.hh" +#include "nix/downstream-placeholder.hh" namespace nix { diff --git a/src/libstore-tests/http-binary-cache-store.cc b/src/libstore-tests/http-binary-cache-store.cc index 1e415f6251a..bc4e5293662 100644 --- a/src/libstore-tests/http-binary-cache-store.cc +++ b/src/libstore-tests/http-binary-cache-store.cc @@ -1,6 +1,6 @@ #include -#include "http-binary-cache-store.hh" +#include "nix/http-binary-cache-store.hh" namespace nix { diff --git a/src/libstore-tests/legacy-ssh-store.cc b/src/libstore-tests/legacy-ssh-store.cc index eb31a240804..5a23cf5b28a 100644 --- a/src/libstore-tests/legacy-ssh-store.cc +++ b/src/libstore-tests/legacy-ssh-store.cc @@ -1,6 +1,6 @@ #include -#include "legacy-ssh-store.hh" +#include "nix/legacy-ssh-store.hh" namespace nix { diff --git a/src/libstore-tests/local-binary-cache-store.cc b/src/libstore-tests/local-binary-cache-store.cc index 2e840228dad..8adc22202ae 100644 --- a/src/libstore-tests/local-binary-cache-store.cc +++ b/src/libstore-tests/local-binary-cache-store.cc @@ -1,6 +1,6 @@ #include -#include "local-binary-cache-store.hh" +#include "nix/local-binary-cache-store.hh" namespace nix { diff --git a/src/libstore-tests/local-overlay-store.cc b/src/libstore-tests/local-overlay-store.cc index b34ca92375e..8e9d25bc320 100644 --- a/src/libstore-tests/local-overlay-store.cc +++ b/src/libstore-tests/local-overlay-store.cc @@ -3,7 +3,7 @@ #if 0 # include -# include "local-overlay-store.hh" +# include "nix/local-overlay-store.hh" namespace nix { diff --git a/src/libstore-tests/local-store.cc b/src/libstore-tests/local-store.cc index abc3ea7963f..8977234a398 100644 --- a/src/libstore-tests/local-store.cc +++ b/src/libstore-tests/local-store.cc @@ -3,13 +3,13 @@ #if 0 # include -# include "local-store.hh" +# include "nix/local-store.hh" // Needed for template specialisations. This is not good! When we // overhaul how store configs work, this should be fixed. -# include "args.hh" -# include "config-impl.hh" -# include "abstract-setting-to-json.hh" +# include "nix/args.hh" +# include "nix/config-impl.hh" +# include "nix/abstract-setting-to-json.hh" namespace nix { diff --git a/src/libstore-tests/machines.cc b/src/libstore-tests/machines.cc index 2d66e953408..219494f16a8 100644 --- a/src/libstore-tests/machines.cc +++ b/src/libstore-tests/machines.cc @@ -1,8 +1,8 @@ -#include "machines.hh" -#include "file-system.hh" -#include "util.hh" +#include "nix/machines.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" -#include "tests/characterization.hh" +#include "nix/tests/characterization.hh" #include #include diff --git a/src/libstore-tests/meson.build b/src/libstore-tests/meson.build index 9f3d8e1d497..0dcfeaacda9 100644 --- a/src/libstore-tests/meson.build +++ b/src/libstore-tests/meson.build @@ -43,8 +43,8 @@ deps_private += gtest add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', language : 'cpp', ) diff --git a/src/libstore-tests/nar-info-disk-cache.cc b/src/libstore-tests/nar-info-disk-cache.cc index b4bdb832957..b15ee351a54 100644 --- a/src/libstore-tests/nar-info-disk-cache.cc +++ b/src/libstore-tests/nar-info-disk-cache.cc @@ -1,8 +1,8 @@ -#include "nar-info-disk-cache.hh" +#include "nix/nar-info-disk-cache.hh" #include #include -#include "sqlite.hh" +#include "nix/sqlite.hh" #include diff --git a/src/libstore-tests/nar-info.cc b/src/libstore-tests/nar-info.cc index 0d155743d91..54468091422 100644 --- a/src/libstore-tests/nar-info.cc +++ b/src/libstore-tests/nar-info.cc @@ -1,11 +1,11 @@ #include #include -#include "path-info.hh" -#include "nar-info.hh" +#include "nix/path-info.hh" +#include "nix/nar-info.hh" -#include "tests/characterization.hh" -#include "tests/libstore.hh" +#include "nix/tests/characterization.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/nix_api_store.cc b/src/libstore-tests/nix_api_store.cc index a8b7b8e5fc8..b7d9860fb44 100644 --- a/src/libstore-tests/nix_api_store.cc +++ b/src/libstore-tests/nix_api_store.cc @@ -3,8 +3,8 @@ #include "nix_api_store.h" #include "nix_api_store_internal.h" -#include "tests/nix_api_store.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_store.hh" +#include "nix/tests/string_callback.hh" namespace nixC { diff --git a/src/libstore-tests/outputs-spec.cc b/src/libstore-tests/outputs-spec.cc index 63cde681bbf..007e5a9353b 100644 --- a/src/libstore-tests/outputs-spec.cc +++ b/src/libstore-tests/outputs-spec.cc @@ -1,4 +1,4 @@ -#include "tests/outputs-spec.hh" +#include "nix/tests/outputs-spec.hh" #include #include diff --git a/src/libstore-tests/path-info.cc b/src/libstore-tests/path-info.cc index d6c4c2a7f7e..df3b60f1309 100644 --- a/src/libstore-tests/path-info.cc +++ b/src/libstore-tests/path-info.cc @@ -1,10 +1,10 @@ #include #include -#include "path-info.hh" +#include "nix/path-info.hh" -#include "tests/characterization.hh" -#include "tests/libstore.hh" +#include "nix/tests/characterization.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/path.cc b/src/libstore-tests/path.cc index c4c055abf0c..bcfce2c9f47 100644 --- a/src/libstore-tests/path.cc +++ b/src/libstore-tests/path.cc @@ -4,12 +4,12 @@ #include #include -#include "path-regex.hh" -#include "store-api.hh" +#include "nix/path-regex.hh" +#include "nix/store-api.hh" -#include "tests/hash.hh" -#include "tests/libstore.hh" -#include "tests/path.hh" +#include "nix/tests/hash.hh" +#include "nix/tests/libstore.hh" +#include "nix/tests/path.hh" namespace nix { diff --git a/src/libstore-tests/references.cc b/src/libstore-tests/references.cc index d91d1cedd65..da4b7af3943 100644 --- a/src/libstore-tests/references.cc +++ b/src/libstore-tests/references.cc @@ -1,4 +1,4 @@ -#include "references.hh" +#include "nix/references.hh" #include diff --git a/src/libstore-tests/s3-binary-cache-store.cc b/src/libstore-tests/s3-binary-cache-store.cc index 7aa5f2f2c06..99db360ce6a 100644 --- a/src/libstore-tests/s3-binary-cache-store.cc +++ b/src/libstore-tests/s3-binary-cache-store.cc @@ -2,7 +2,7 @@ # include -# include "s3-binary-cache-store.hh" +# include "nix/s3-binary-cache-store.hh" namespace nix { diff --git a/src/libstore-tests/serve-protocol.cc b/src/libstore-tests/serve-protocol.cc index 3dbbf38799a..dd53b80d6ca 100644 --- a/src/libstore-tests/serve-protocol.cc +++ b/src/libstore-tests/serve-protocol.cc @@ -4,13 +4,13 @@ #include #include -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" -#include "serve-protocol-connection.hh" -#include "build-result.hh" -#include "file-descriptor.hh" -#include "tests/protocol.hh" -#include "tests/characterization.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/build-result.hh" +#include "nix/file-descriptor.hh" +#include "nix/tests/protocol.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/ssh-store.cc b/src/libstore-tests/ssh-store.cc index b853a5f1fb9..1c54a229eeb 100644 --- a/src/libstore-tests/ssh-store.cc +++ b/src/libstore-tests/ssh-store.cc @@ -3,7 +3,7 @@ #if 0 # include -# include "ssh-store.hh" +# include "nix/ssh-store.hh" namespace nix { diff --git a/src/libstore-tests/store-reference.cc b/src/libstore-tests/store-reference.cc index d4c42f0fda1..f8e533fa088 100644 --- a/src/libstore-tests/store-reference.cc +++ b/src/libstore-tests/store-reference.cc @@ -1,11 +1,11 @@ #include #include -#include "file-system.hh" -#include "store-reference.hh" +#include "nix/file-system.hh" +#include "nix/store-reference.hh" -#include "tests/characterization.hh" -#include "tests/libstore.hh" +#include "nix/tests/characterization.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/uds-remote-store.cc b/src/libstore-tests/uds-remote-store.cc index 5ccb208714f..7157bfbfdbe 100644 --- a/src/libstore-tests/uds-remote-store.cc +++ b/src/libstore-tests/uds-remote-store.cc @@ -3,7 +3,7 @@ #if 0 # include -# include "uds-remote-store.hh" +# include "nix/uds-remote-store.hh" namespace nix { diff --git a/src/libstore-tests/worker-protocol.cc b/src/libstore-tests/worker-protocol.cc index 99b042d5ba4..0a417ed3e54 100644 --- a/src/libstore-tests/worker-protocol.cc +++ b/src/libstore-tests/worker-protocol.cc @@ -4,13 +4,13 @@ #include #include -#include "worker-protocol.hh" -#include "worker-protocol-connection.hh" -#include "worker-protocol-impl.hh" -#include "derived-path.hh" -#include "build-result.hh" -#include "tests/protocol.hh" -#include "tests/characterization.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/derived-path.hh" +#include "nix/build-result.hh" +#include "nix/tests/protocol.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 896779f85fc..48c449e797f 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -1,18 +1,18 @@ -#include "archive.hh" -#include "binary-cache-store.hh" -#include "compression.hh" -#include "derivations.hh" -#include "source-accessor.hh" -#include "globals.hh" -#include "nar-info.hh" -#include "sync.hh" -#include "remote-fs-accessor.hh" -#include "nar-info-disk-cache.hh" -#include "nar-accessor.hh" -#include "thread-pool.hh" -#include "callback.hh" -#include "signals.hh" -#include "archive.hh" +#include "nix/archive.hh" +#include "nix/binary-cache-store.hh" +#include "nix/compression.hh" +#include "nix/derivations.hh" +#include "nix/source-accessor.hh" +#include "nix/globals.hh" +#include "nix/nar-info.hh" +#include "nix/sync.hh" +#include "nix/remote-fs-accessor.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/nar-accessor.hh" +#include "nix/thread-pool.hh" +#include "nix/callback.hh" +#include "nix/signals.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libstore/build-result.cc b/src/libstore/build-result.cc index 96cbfd62fff..72ad11faea5 100644 --- a/src/libstore/build-result.cc +++ b/src/libstore/build-result.cc @@ -1,4 +1,4 @@ -#include "build-result.hh" +#include "nix/build-result.hh" namespace nix { diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 1309c313c2d..b99d2770d91 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -1,22 +1,22 @@ -#include "derivation-goal.hh" +#include "nix/build/derivation-goal.hh" #ifndef _WIN32 // TODO enable build hook on Windows -# include "hook-instance.hh" +# include "nix/build/hook-instance.hh" #endif -#include "processes.hh" -#include "config-global.hh" -#include "worker.hh" -#include "builtins.hh" -#include "builtins/buildenv.hh" -#include "references.hh" -#include "finally.hh" -#include "util.hh" -#include "archive.hh" -#include "compression.hh" -#include "common-protocol.hh" -#include "common-protocol-impl.hh" -#include "topo-sort.hh" -#include "callback.hh" -#include "local-store.hh" // TODO remove, along with remaining downcasts +#include "nix/processes.hh" +#include "nix/config-global.hh" +#include "nix/build/worker.hh" +#include "nix/builtins.hh" +#include "nix/builtins/buildenv.hh" +#include "nix/references.hh" +#include "nix/finally.hh" +#include "nix/util.hh" +#include "nix/archive.hh" +#include "nix/compression.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" +#include "nix/topo-sort.hh" +#include "nix/callback.hh" +#include "nix/local-store.hh" // TODO remove, along with remaining downcasts #include #include @@ -32,7 +32,7 @@ #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc index a5926be87ab..bc410be922a 100644 --- a/src/libstore/build/drv-output-substitution-goal.cc +++ b/src/libstore/build/drv-output-substitution-goal.cc @@ -1,8 +1,8 @@ -#include "drv-output-substitution-goal.hh" -#include "finally.hh" -#include "worker.hh" -#include "substitution-goal.hh" -#include "callback.hh" +#include "nix/build/drv-output-substitution-goal.hh" +#include "nix/finally.hh" +#include "nix/build/worker.hh" +#include "nix/build/substitution-goal.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc index 3bf22320e3a..70b32d3ad49 100644 --- a/src/libstore/build/entry-points.cc +++ b/src/libstore/build/entry-points.cc @@ -1,10 +1,10 @@ -#include "worker.hh" -#include "substitution-goal.hh" +#include "nix/build/worker.hh" +#include "nix/build/substitution-goal.hh" #ifndef _WIN32 // TODO Enable building on Windows -# include "derivation-goal.hh" +# include "nix/build/derivation-goal.hh" #endif -#include "local-store.hh" -#include "strings.hh" +#include "nix/local-store.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/build/goal.cc b/src/libstore/build/goal.cc index 6628d7d8ee7..04eea96c9e7 100644 --- a/src/libstore/build/goal.cc +++ b/src/libstore/build/goal.cc @@ -1,5 +1,5 @@ -#include "goal.hh" -#include "worker.hh" +#include "nix/build/goal.hh" +#include "nix/build/worker.hh" namespace nix { diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index c36b772937c..7f5790e5ac0 100644 --- a/src/libstore/build/substitution-goal.cc +++ b/src/libstore/build/substitution-goal.cc @@ -1,8 +1,8 @@ -#include "worker.hh" -#include "substitution-goal.hh" -#include "nar-info.hh" -#include "finally.hh" -#include "signals.hh" +#include "nix/build/worker.hh" +#include "nix/build/substitution-goal.hh" +#include "nix/nar-info.hh" +#include "nix/finally.hh" +#include "nix/signals.hh" #include namespace nix { diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index bab3bd47051..96429146440 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -1,14 +1,14 @@ -#include "local-store.hh" -#include "machines.hh" -#include "worker.hh" -#include "substitution-goal.hh" -#include "drv-output-substitution-goal.hh" -#include "derivation-goal.hh" +#include "nix/local-store.hh" +#include "nix/machines.hh" +#include "nix/build/worker.hh" +#include "nix/build/substitution-goal.hh" +#include "nix/build/drv-output-substitution-goal.hh" +#include "nix/build/derivation-goal.hh" #ifndef _WIN32 // TODO Enable building on Windows -# include "local-derivation-goal.hh" -# include "hook-instance.hh" +# include "nix/build/local-derivation-goal.hh" +# include "nix/build/hook-instance.hh" #endif -#include "signals.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libstore/builtins/buildenv.cc b/src/libstore/builtins/buildenv.cc index 0f7bcd99b1c..4145593cf3a 100644 --- a/src/libstore/builtins/buildenv.cc +++ b/src/libstore/builtins/buildenv.cc @@ -1,6 +1,6 @@ -#include "buildenv.hh" -#include "derivations.hh" -#include "signals.hh" +#include "nix/builtins/buildenv.hh" +#include "nix/derivations.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/builtins/fetchurl.cc b/src/libstore/builtins/fetchurl.cc index 90e58dfdb3d..28af8427c65 100644 --- a/src/libstore/builtins/fetchurl.cc +++ b/src/libstore/builtins/fetchurl.cc @@ -1,8 +1,8 @@ -#include "builtins.hh" -#include "filetransfer.hh" -#include "store-api.hh" -#include "archive.hh" -#include "compression.hh" +#include "nix/builtins.hh" +#include "nix/filetransfer.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/compression.hh" namespace nix { diff --git a/src/libstore/builtins/unpack-channel.cc b/src/libstore/builtins/unpack-channel.cc index 43fbb62cd73..9e76ee7d382 100644 --- a/src/libstore/builtins/unpack-channel.cc +++ b/src/libstore/builtins/unpack-channel.cc @@ -1,5 +1,5 @@ -#include "builtins.hh" -#include "tarfile.hh" +#include "nix/builtins.hh" +#include "nix/tarfile.hh" namespace nix { diff --git a/src/libstore/common-protocol.cc b/src/libstore/common-protocol.cc index fc2b5ac6f3f..4845d587351 100644 --- a/src/libstore/common-protocol.cc +++ b/src/libstore/common-protocol.cc @@ -1,11 +1,11 @@ -#include "serialise.hh" -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "build-result.hh" -#include "common-protocol.hh" -#include "common-protocol-impl.hh" -#include "archive.hh" -#include "derivations.hh" +#include "nix/serialise.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include diff --git a/src/libstore/common-ssh-store-config.cc b/src/libstore/common-ssh-store-config.cc index 05332b9bb5c..d4123e326be 100644 --- a/src/libstore/common-ssh-store-config.cc +++ b/src/libstore/common-ssh-store-config.cc @@ -1,7 +1,7 @@ #include -#include "common-ssh-store-config.hh" -#include "ssh.hh" +#include "nix/common-ssh-store-config.hh" +#include "nix/ssh.hh" namespace nix { diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc index e1cdfece6e9..a3745b4ef31 100644 --- a/src/libstore/content-address.cc +++ b/src/libstore/content-address.cc @@ -1,6 +1,6 @@ -#include "args.hh" -#include "content-address.hh" -#include "split.hh" +#include "nix/args.hh" +#include "nix/content-address.hh" +#include "nix/split.hh" namespace nix { diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 60cb64b7b7c..bce285141e0 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -1,23 +1,23 @@ -#include "daemon.hh" -#include "signals.hh" -#include "worker-protocol.hh" -#include "worker-protocol-connection.hh" -#include "worker-protocol-impl.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" -#include "log-store.hh" -#include "indirect-root-store.hh" -#include "path-with-outputs.hh" -#include "finally.hh" -#include "archive.hh" -#include "derivations.hh" -#include "args.hh" -#include "git.hh" +#include "nix/daemon.hh" +#include "nix/signals.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" +#include "nix/log-store.hh" +#include "nix/indirect-root-store.hh" +#include "nix/path-with-outputs.hh" +#include "nix/finally.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" +#include "nix/args.hh" +#include "nix/git.hh" #ifndef _WIN32 // TODO need graceful async exit support on Windows? -# include "monitor-fd.hh" +# include "nix/monitor-fd.hh" #endif #include diff --git a/src/libstore/derivation-options.cc b/src/libstore/derivation-options.cc index 1fc1718f7eb..8683fd8ada3 100644 --- a/src/libstore/derivation-options.cc +++ b/src/libstore/derivation-options.cc @@ -1,8 +1,8 @@ -#include "derivation-options.hh" -#include "json-utils.hh" -#include "parsed-derivations.hh" -#include "types.hh" -#include "util.hh" +#include "nix/derivation-options.hh" +#include "nix/json-utils.hh" +#include "nix/parsed-derivations.hh" +#include "nix/types.hh" +#include "nix/util.hh" #include #include #include diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index c31c801c2c9..794ce6b6e81 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -1,14 +1,14 @@ -#include "derivations.hh" -#include "downstream-placeholder.hh" -#include "store-api.hh" -#include "globals.hh" -#include "types.hh" -#include "util.hh" -#include "split.hh" -#include "common-protocol.hh" -#include "common-protocol-impl.hh" -#include "strings-inline.hh" -#include "json-utils.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/store-api.hh" +#include "nix/globals.hh" +#include "nix/types.hh" +#include "nix/util.hh" +#include "nix/split.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" +#include "nix/strings-inline.hh" +#include "nix/json-utils.hh" #include #include diff --git a/src/libstore/derived-path-map.cc b/src/libstore/derived-path-map.cc index c97d52773eb..cb6d98d5a66 100644 --- a/src/libstore/derived-path-map.cc +++ b/src/libstore/derived-path-map.cc @@ -1,5 +1,5 @@ -#include "derived-path-map.hh" -#include "util.hh" +#include "nix/derived-path-map.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libstore/derived-path.cc b/src/libstore/derived-path.cc index 3e331896511..c02d78115d6 100644 --- a/src/libstore/derived-path.cc +++ b/src/libstore/derived-path.cc @@ -1,7 +1,7 @@ -#include "derived-path.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "comparator.hh" +#include "nix/derived-path.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/comparator.hh" #include diff --git a/src/libstore/downstream-placeholder.cc b/src/libstore/downstream-placeholder.cc index 91d47f946c1..52c46ddee60 100644 --- a/src/libstore/downstream-placeholder.cc +++ b/src/libstore/downstream-placeholder.cc @@ -1,5 +1,5 @@ -#include "downstream-placeholder.hh" -#include "derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/dummy-store.cc b/src/libstore/dummy-store.cc index c1e871e9384..b922b30a641 100644 --- a/src/libstore/dummy-store.cc +++ b/src/libstore/dummy-store.cc @@ -1,5 +1,5 @@ -#include "store-api.hh" -#include "callback.hh" +#include "nix/store-api.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/export-import.cc b/src/libstore/export-import.cc index 1c62cdfad64..efec2a40996 100644 --- a/src/libstore/export-import.cc +++ b/src/libstore/export-import.cc @@ -1,8 +1,8 @@ -#include "serialise.hh" -#include "store-api.hh" -#include "archive.hh" -#include "common-protocol.hh" -#include "common-protocol-impl.hh" +#include "nix/serialise.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" #include diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index 7d55cc43b3a..42c781ca202 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -1,19 +1,19 @@ -#include "filetransfer.hh" -#include "globals.hh" -#include "config-global.hh" -#include "store-api.hh" -#include "s3.hh" -#include "compression.hh" -#include "finally.hh" -#include "callback.hh" -#include "signals.hh" +#include "nix/filetransfer.hh" +#include "nix/globals.hh" +#include "nix/config-global.hh" +#include "nix/store-api.hh" +#include "nix/s3.hh" +#include "nix/compression.hh" +#include "nix/finally.hh" +#include "nix/callback.hh" +#include "nix/signals.hh" #if ENABLE_S3 #include #endif #if __linux__ -# include "namespaces.hh" +# include "nix/namespaces.hh" #endif #include diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 0a86a9d0ddf..dc71d17e853 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -1,14 +1,14 @@ -#include "derivations.hh" -#include "globals.hh" -#include "local-store.hh" -#include "finally.hh" -#include "unix-domain-socket.hh" -#include "signals.hh" -#include "posix-fs-canonicalise.hh" +#include "nix/derivations.hh" +#include "nix/globals.hh" +#include "nix/local-store.hh" +#include "nix/finally.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/signals.hh" +#include "nix/posix-fs-canonicalise.hh" #if !defined(__linux__) // For shelling out to lsof -# include "processes.hh" +# include "nix/processes.hh" #endif #include diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index d7c000dfab7..4f8c53ca848 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -1,11 +1,11 @@ -#include "globals.hh" -#include "config-global.hh" -#include "current-process.hh" -#include "archive.hh" -#include "args.hh" -#include "abstract-setting-to-json.hh" -#include "compute-levels.hh" -#include "signals.hh" +#include "nix/globals.hh" +#include "nix/config-global.hh" +#include "nix/current-process.hh" +#include "nix/archive.hh" +#include "nix/args.hh" +#include "nix/abstract-setting-to-json.hh" +#include "nix/compute-levels.hh" +#include "nix/signals.hh" #include #include @@ -26,16 +26,16 @@ #endif #if __APPLE__ -# include "processes.hh" +# include "nix/processes.hh" #endif -#include "config-impl.hh" +#include "nix/config-impl.hh" #ifdef __APPLE__ #include #endif -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index f32616f94a6..a8d77f753ea 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -1,8 +1,8 @@ -#include "http-binary-cache-store.hh" -#include "filetransfer.hh" -#include "globals.hh" -#include "nar-info-disk-cache.hh" -#include "callback.hh" +#include "nix/http-binary-cache-store.hh" +#include "nix/filetransfer.hh" +#include "nix/globals.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/include/nix/binary-cache-store.hh similarity index 97% rename from src/libstore/binary-cache-store.hh rename to src/libstore/include/nix/binary-cache-store.hh index 6bd7fd14ac9..ec012cda8d7 100644 --- a/src/libstore/binary-cache-store.hh +++ b/src/libstore/include/nix/binary-cache-store.hh @@ -1,11 +1,11 @@ #pragma once ///@file -#include "signature/local-keys.hh" -#include "store-api.hh" -#include "log-store.hh" +#include "nix/signature/local-keys.hh" +#include "nix/store-api.hh" +#include "nix/log-store.hh" -#include "pool.hh" +#include "nix/pool.hh" #include diff --git a/src/libstore/build-result.hh b/src/libstore/include/nix/build-result.hh similarity index 98% rename from src/libstore/build-result.hh rename to src/libstore/include/nix/build-result.hh index 8c66cfeb353..20d72634660 100644 --- a/src/libstore/build-result.hh +++ b/src/libstore/include/nix/build-result.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "realisation.hh" -#include "derived-path.hh" +#include "nix/realisation.hh" +#include "nix/derived-path.hh" #include #include diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/include/nix/build/derivation-goal.hh similarity index 97% rename from src/libstore/build/derivation-goal.hh rename to src/libstore/include/nix/build/derivation-goal.hh index 26391b74447..ec34fd3cfa7 100644 --- a/src/libstore/build/derivation-goal.hh +++ b/src/libstore/include/nix/build/derivation-goal.hh @@ -1,15 +1,15 @@ #pragma once ///@file -#include "parsed-derivations.hh" -#include "derivation-options.hh" +#include "nix/parsed-derivations.hh" +#include "nix/derivation-options.hh" #ifndef _WIN32 -# include "user-lock.hh" +# include "nix/user-lock.hh" #endif -#include "outputs-spec.hh" -#include "store-api.hh" -#include "pathlocks.hh" -#include "goal.hh" +#include "nix/outputs-spec.hh" +#include "nix/store-api.hh" +#include "nix/pathlocks.hh" +#include "nix/build/goal.hh" namespace nix { diff --git a/src/libstore/build/drv-output-substitution-goal.hh b/src/libstore/include/nix/build/drv-output-substitution-goal.hh similarity index 89% rename from src/libstore/build/drv-output-substitution-goal.hh rename to src/libstore/include/nix/build/drv-output-substitution-goal.hh index 63d1cd2f8f8..37c860d5f7d 100644 --- a/src/libstore/build/drv-output-substitution-goal.hh +++ b/src/libstore/include/nix/build/drv-output-substitution-goal.hh @@ -4,10 +4,10 @@ #include #include -#include "store-api.hh" -#include "goal.hh" -#include "realisation.hh" -#include "muxable-pipe.hh" +#include "nix/store-api.hh" +#include "nix/build/goal.hh" +#include "nix/realisation.hh" +#include "nix/muxable-pipe.hh" namespace nix { diff --git a/src/libstore/build/goal.hh b/src/libstore/include/nix/build/goal.hh similarity index 99% rename from src/libstore/build/goal.hh rename to src/libstore/include/nix/build/goal.hh index 6054975d77a..61cba972ff6 100644 --- a/src/libstore/build/goal.hh +++ b/src/libstore/include/nix/build/goal.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "store-api.hh" -#include "build-result.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" #include diff --git a/src/libstore/build/substitution-goal.hh b/src/libstore/include/nix/build/substitution-goal.hh similarity index 94% rename from src/libstore/build/substitution-goal.hh rename to src/libstore/include/nix/build/substitution-goal.hh index f2cf797e5d2..c8139025c8d 100644 --- a/src/libstore/build/substitution-goal.hh +++ b/src/libstore/include/nix/build/substitution-goal.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "worker.hh" -#include "store-api.hh" -#include "goal.hh" -#include "muxable-pipe.hh" +#include "nix/build/worker.hh" +#include "nix/store-api.hh" +#include "nix/build/goal.hh" +#include "nix/muxable-pipe.hh" #include #include #include diff --git a/src/libstore/build/worker.hh b/src/libstore/include/nix/build/worker.hh similarity index 98% rename from src/libstore/build/worker.hh rename to src/libstore/include/nix/build/worker.hh index f5e61720807..467e258dfab 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/include/nix/build/worker.hh @@ -1,11 +1,11 @@ #pragma once ///@file -#include "types.hh" -#include "store-api.hh" -#include "goal.hh" -#include "realisation.hh" -#include "muxable-pipe.hh" +#include "nix/types.hh" +#include "nix/store-api.hh" +#include "nix/build/goal.hh" +#include "nix/realisation.hh" +#include "nix/muxable-pipe.hh" #include #include diff --git a/src/libstore/builtins.hh b/src/libstore/include/nix/builtins.hh similarity index 92% rename from src/libstore/builtins.hh rename to src/libstore/include/nix/builtins.hh index 091946e013a..5943ae5073b 100644 --- a/src/libstore/builtins.hh +++ b/src/libstore/include/nix/builtins.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "derivations.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/builtins/buildenv.hh b/src/libstore/include/nix/builtins/buildenv.hh similarity index 97% rename from src/libstore/builtins/buildenv.hh rename to src/libstore/include/nix/builtins/buildenv.hh index 8e112e176e2..00fc3bf902a 100644 --- a/src/libstore/builtins/buildenv.hh +++ b/src/libstore/include/nix/builtins/buildenv.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/common-protocol-impl.hh b/src/libstore/include/nix/common-protocol-impl.hh similarity index 93% rename from src/libstore/common-protocol-impl.hh rename to src/libstore/include/nix/common-protocol-impl.hh index 360882c0289..71d5fc015c0 100644 --- a/src/libstore/common-protocol-impl.hh +++ b/src/libstore/include/nix/common-protocol-impl.hh @@ -8,8 +8,8 @@ * contributing guide. */ -#include "common-protocol.hh" -#include "length-prefixed-protocol-helper.hh" +#include "nix/common-protocol.hh" +#include "nix/length-prefixed-protocol-helper.hh" namespace nix { diff --git a/src/libstore/common-protocol.hh b/src/libstore/include/nix/common-protocol.hh similarity index 99% rename from src/libstore/common-protocol.hh rename to src/libstore/include/nix/common-protocol.hh index a878e84c9d8..260f192568a 100644 --- a/src/libstore/common-protocol.hh +++ b/src/libstore/include/nix/common-protocol.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "serialise.hh" +#include "nix/serialise.hh" namespace nix { diff --git a/src/libstore/common-ssh-store-config.hh b/src/libstore/include/nix/common-ssh-store-config.hh similarity index 98% rename from src/libstore/common-ssh-store-config.hh rename to src/libstore/include/nix/common-ssh-store-config.hh index 5deb6f4c9e9..54aa8cb5e39 100644 --- a/src/libstore/common-ssh-store-config.hh +++ b/src/libstore/include/nix/common-ssh-store-config.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/content-address.hh b/src/libstore/include/nix/content-address.hh similarity index 98% rename from src/libstore/content-address.hh rename to src/libstore/include/nix/content-address.hh index 2b5d1296a27..6a2cbb1efe5 100644 --- a/src/libstore/content-address.hh +++ b/src/libstore/include/nix/content-address.hh @@ -2,10 +2,10 @@ ///@file #include -#include "hash.hh" -#include "path.hh" -#include "file-content-address.hh" -#include "variant-wrapper.hh" +#include "nix/hash.hh" +#include "nix/path.hh" +#include "nix/file-content-address.hh" +#include "nix/variant-wrapper.hh" namespace nix { diff --git a/src/libstore/daemon.hh b/src/libstore/include/nix/daemon.hh similarity index 82% rename from src/libstore/daemon.hh rename to src/libstore/include/nix/daemon.hh index a8ce32d8deb..38df5796733 100644 --- a/src/libstore/daemon.hh +++ b/src/libstore/include/nix/daemon.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "serialise.hh" -#include "store-api.hh" +#include "nix/serialise.hh" +#include "nix/store-api.hh" namespace nix::daemon { diff --git a/src/libstore/derivation-options.hh b/src/libstore/include/nix/derivation-options.hh similarity index 98% rename from src/libstore/derivation-options.hh rename to src/libstore/include/nix/derivation-options.hh index 6e4ea5cd9fd..459b7de78cc 100644 --- a/src/libstore/derivation-options.hh +++ b/src/libstore/include/nix/derivation-options.hh @@ -6,8 +6,8 @@ #include #include -#include "types.hh" -#include "json-impls.hh" +#include "nix/types.hh" +#include "nix/json-impls.hh" namespace nix { diff --git a/src/libstore/derivations.hh b/src/libstore/include/nix/derivations.hh similarity index 98% rename from src/libstore/derivations.hh rename to src/libstore/include/nix/derivations.hh index 7b62b81ba2b..a0108333231 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/include/nix/derivations.hh @@ -1,14 +1,14 @@ #pragma once ///@file -#include "path.hh" -#include "types.hh" -#include "hash.hh" -#include "content-address.hh" -#include "repair-flag.hh" -#include "derived-path-map.hh" -#include "sync.hh" -#include "variant-wrapper.hh" +#include "nix/path.hh" +#include "nix/types.hh" +#include "nix/hash.hh" +#include "nix/content-address.hh" +#include "nix/repair-flag.hh" +#include "nix/derived-path-map.hh" +#include "nix/sync.hh" +#include "nix/variant-wrapper.hh" #include #include diff --git a/src/libstore/derived-path-map.hh b/src/libstore/include/nix/derived-path-map.hh similarity index 98% rename from src/libstore/derived-path-map.hh rename to src/libstore/include/nix/derived-path-map.hh index bd60fe88710..24c5ca3d7cb 100644 --- a/src/libstore/derived-path-map.hh +++ b/src/libstore/include/nix/derived-path-map.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "derived-path.hh" +#include "nix/types.hh" +#include "nix/derived-path.hh" namespace nix { diff --git a/src/libstore/derived-path.hh b/src/libstore/include/nix/derived-path.hh similarity index 98% rename from src/libstore/derived-path.hh rename to src/libstore/include/nix/derived-path.hh index 23f9c2b3092..f50ca6e94b8 100644 --- a/src/libstore/derived-path.hh +++ b/src/libstore/include/nix/derived-path.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "path.hh" -#include "outputs-spec.hh" -#include "config.hh" -#include "ref.hh" +#include "nix/path.hh" +#include "nix/outputs-spec.hh" +#include "nix/config.hh" +#include "nix/ref.hh" #include diff --git a/src/libstore/downstream-placeholder.hh b/src/libstore/include/nix/downstream-placeholder.hh similarity index 97% rename from src/libstore/downstream-placeholder.hh rename to src/libstore/include/nix/downstream-placeholder.hh index c911ecea2ed..eb6662d3b09 100644 --- a/src/libstore/downstream-placeholder.hh +++ b/src/libstore/include/nix/downstream-placeholder.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "hash.hh" -#include "path.hh" -#include "derived-path.hh" +#include "nix/hash.hh" +#include "nix/path.hh" +#include "nix/derived-path.hh" namespace nix { diff --git a/src/libstore/filetransfer.hh b/src/libstore/include/nix/filetransfer.hh similarity index 97% rename from src/libstore/filetransfer.hh rename to src/libstore/include/nix/filetransfer.hh index 0ecc7f37663..31ad1aabdb6 100644 --- a/src/libstore/filetransfer.hh +++ b/src/libstore/include/nix/filetransfer.hh @@ -4,11 +4,11 @@ #include #include -#include "logging.hh" -#include "types.hh" -#include "ref.hh" -#include "config.hh" -#include "serialise.hh" +#include "nix/logging.hh" +#include "nix/types.hh" +#include "nix/ref.hh" +#include "nix/config.hh" +#include "nix/serialise.hh" namespace nix { diff --git a/src/libstore/gc-store.hh b/src/libstore/include/nix/gc-store.hh similarity index 99% rename from src/libstore/gc-store.hh rename to src/libstore/include/nix/gc-store.hh index 020f770b07a..f5f6855409a 100644 --- a/src/libstore/gc-store.hh +++ b/src/libstore/include/nix/gc-store.hh @@ -3,7 +3,7 @@ #include -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/globals.hh b/src/libstore/include/nix/globals.hh similarity index 99% rename from src/libstore/globals.hh rename to src/libstore/include/nix/globals.hh index c539ff836e0..bda883890c8 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/include/nix/globals.hh @@ -1,11 +1,11 @@ #pragma once ///@file -#include "types.hh" -#include "config.hh" -#include "environment-variables.hh" -#include "experimental-features.hh" -#include "users.hh" +#include "nix/types.hh" +#include "nix/config.hh" +#include "nix/environment-variables.hh" +#include "nix/experimental-features.hh" +#include "nix/users.hh" #include #include diff --git a/src/libstore/http-binary-cache-store.hh b/src/libstore/include/nix/http-binary-cache-store.hh similarity index 94% rename from src/libstore/http-binary-cache-store.hh rename to src/libstore/include/nix/http-binary-cache-store.hh index d2fc43210a2..9dadda4d3d8 100644 --- a/src/libstore/http-binary-cache-store.hh +++ b/src/libstore/include/nix/http-binary-cache-store.hh @@ -1,4 +1,4 @@ -#include "binary-cache-store.hh" +#include "nix/binary-cache-store.hh" namespace nix { diff --git a/src/libstore/indirect-root-store.hh b/src/libstore/include/nix/indirect-root-store.hh similarity index 98% rename from src/libstore/indirect-root-store.hh rename to src/libstore/include/nix/indirect-root-store.hh index b74ebc1eed4..de4de138b95 100644 --- a/src/libstore/indirect-root-store.hh +++ b/src/libstore/include/nix/indirect-root-store.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "local-fs-store.hh" +#include "nix/local-fs-store.hh" namespace nix { diff --git a/src/libstore/keys.hh b/src/libstore/include/nix/keys.hh similarity index 66% rename from src/libstore/keys.hh rename to src/libstore/include/nix/keys.hh index 3da19493fbb..ae0fa8d0217 100644 --- a/src/libstore/keys.hh +++ b/src/libstore/include/nix/keys.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "signature/local-keys.hh" +#include "nix/signature/local-keys.hh" namespace nix { diff --git a/src/libstore/legacy-ssh-store.hh b/src/libstore/include/nix/legacy-ssh-store.hh similarity index 97% rename from src/libstore/legacy-ssh-store.hh rename to src/libstore/include/nix/legacy-ssh-store.hh index 92aa4ae56d1..9c4a9230da1 100644 --- a/src/libstore/legacy-ssh-store.hh +++ b/src/libstore/include/nix/legacy-ssh-store.hh @@ -1,12 +1,12 @@ #pragma once ///@file -#include "common-ssh-store-config.hh" -#include "store-api.hh" -#include "ssh.hh" -#include "callback.hh" -#include "pool.hh" -#include "serve-protocol.hh" +#include "nix/common-ssh-store-config.hh" +#include "nix/store-api.hh" +#include "nix/ssh.hh" +#include "nix/callback.hh" +#include "nix/pool.hh" +#include "nix/serve-protocol.hh" namespace nix { diff --git a/src/libstore/length-prefixed-protocol-helper.hh b/src/libstore/include/nix/length-prefixed-protocol-helper.hh similarity index 99% rename from src/libstore/length-prefixed-protocol-helper.hh rename to src/libstore/include/nix/length-prefixed-protocol-helper.hh index 7e977bbf1a2..ad7b32793e4 100644 --- a/src/libstore/length-prefixed-protocol-helper.hh +++ b/src/libstore/include/nix/length-prefixed-protocol-helper.hh @@ -8,7 +8,7 @@ * Used by both the Worker and Serve protocols. */ -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libstore/local-binary-cache-store.hh b/src/libstore/include/nix/local-binary-cache-store.hh similarity index 92% rename from src/libstore/local-binary-cache-store.hh rename to src/libstore/include/nix/local-binary-cache-store.hh index 997e8ecbb51..acff6621d6d 100644 --- a/src/libstore/local-binary-cache-store.hh +++ b/src/libstore/include/nix/local-binary-cache-store.hh @@ -1,4 +1,4 @@ -#include "binary-cache-store.hh" +#include "nix/binary-cache-store.hh" namespace nix { diff --git a/src/libstore/local-fs-store.hh b/src/libstore/include/nix/local-fs-store.hh similarity index 96% rename from src/libstore/local-fs-store.hh rename to src/libstore/include/nix/local-fs-store.hh index 9bb569f0b25..2a5f6e3e7cd 100644 --- a/src/libstore/local-fs-store.hh +++ b/src/libstore/include/nix/local-fs-store.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "store-api.hh" -#include "gc-store.hh" -#include "log-store.hh" +#include "nix/store-api.hh" +#include "nix/gc-store.hh" +#include "nix/log-store.hh" namespace nix { diff --git a/src/libstore/local-overlay-store.hh b/src/libstore/include/nix/local-overlay-store.hh similarity index 99% rename from src/libstore/local-overlay-store.hh rename to src/libstore/include/nix/local-overlay-store.hh index 63628abed50..1cee3cc9f9f 100644 --- a/src/libstore/local-overlay-store.hh +++ b/src/libstore/include/nix/local-overlay-store.hh @@ -1,4 +1,4 @@ -#include "local-store.hh" +#include "nix/local-store.hh" namespace nix { diff --git a/src/libstore/local-store.hh b/src/libstore/include/nix/local-store.hh similarity index 98% rename from src/libstore/local-store.hh rename to src/libstore/include/nix/local-store.hh index 680318d43b6..917c7ad2155 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/include/nix/local-store.hh @@ -1,12 +1,12 @@ #pragma once ///@file -#include "sqlite.hh" +#include "nix/sqlite.hh" -#include "pathlocks.hh" -#include "store-api.hh" -#include "indirect-root-store.hh" -#include "sync.hh" +#include "nix/pathlocks.hh" +#include "nix/store-api.hh" +#include "nix/indirect-root-store.hh" +#include "nix/sync.hh" #include #include diff --git a/src/libstore/log-store.hh b/src/libstore/include/nix/log-store.hh similarity index 95% rename from src/libstore/log-store.hh rename to src/libstore/include/nix/log-store.hh index a84f7dbeb25..5cd8a9f885c 100644 --- a/src/libstore/log-store.hh +++ b/src/libstore/include/nix/log-store.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/machines.hh b/src/libstore/include/nix/machines.hh similarity index 97% rename from src/libstore/machines.hh rename to src/libstore/include/nix/machines.hh index b70ab907806..6cd1853a5d5 100644 --- a/src/libstore/machines.hh +++ b/src/libstore/include/nix/machines.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "ref.hh" -#include "store-reference.hh" +#include "nix/ref.hh" +#include "nix/store-reference.hh" namespace nix { diff --git a/src/libstore/make-content-addressed.hh b/src/libstore/include/nix/make-content-addressed.hh similarity index 94% rename from src/libstore/make-content-addressed.hh rename to src/libstore/include/nix/make-content-addressed.hh index 60bb2b477db..75fe4462f4f 100644 --- a/src/libstore/make-content-addressed.hh +++ b/src/libstore/include/nix/make-content-addressed.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/include/nix/meson.build b/src/libstore/include/nix/meson.build new file mode 100644 index 00000000000..b8f14567918 --- /dev/null +++ b/src/libstore/include/nix/meson.build @@ -0,0 +1,82 @@ +# Public headers directory + +include_dirs = [ + include_directories('..'), +] + +config_h = configure_file( + configuration : configdata, + output : 'config-store.hh', +) + +headers = [config_h] + files( + 'binary-cache-store.hh', + 'build-result.hh', + 'build/derivation-goal.hh', + 'build/drv-output-substitution-goal.hh', + 'build/goal.hh', + 'build/substitution-goal.hh', + 'build/worker.hh', + 'builtins.hh', + 'builtins/buildenv.hh', + 'common-protocol-impl.hh', + 'common-protocol.hh', + 'common-ssh-store-config.hh', + 'content-address.hh', + 'daemon.hh', + 'derivations.hh', + 'derivation-options.hh', + 'derived-path-map.hh', + 'derived-path.hh', + 'downstream-placeholder.hh', + 'filetransfer.hh', + 'gc-store.hh', + 'globals.hh', + 'http-binary-cache-store.hh', + 'indirect-root-store.hh', + 'keys.hh', + 'legacy-ssh-store.hh', + 'length-prefixed-protocol-helper.hh', + 'local-binary-cache-store.hh', + 'local-fs-store.hh', + 'local-overlay-store.hh', + 'local-store.hh', + 'log-store.hh', + 'machines.hh', + 'make-content-addressed.hh', + 'names.hh', + 'nar-accessor.hh', + 'nar-info-disk-cache.hh', + 'nar-info.hh', + 'outputs-spec.hh', + 'parsed-derivations.hh', + 'path-info.hh', + 'path-references.hh', + 'path-regex.hh', + 'path-with-outputs.hh', + 'path.hh', + 'pathlocks.hh', + 'posix-fs-canonicalise.hh', + 'profiles.hh', + 'realisation.hh', + 'remote-fs-accessor.hh', + 'remote-store-connection.hh', + 'remote-store.hh', + 'restricted-store.hh', + 's3-binary-cache-store.hh', + 's3.hh', + 'ssh-store.hh', + 'serve-protocol-connection.hh', + 'serve-protocol-impl.hh', + 'serve-protocol.hh', + 'sqlite.hh', + 'ssh.hh', + 'store-api.hh', + 'store-cast.hh', + 'store-dir-config.hh', + 'store-reference.hh', + 'uds-remote-store.hh', + 'worker-protocol-connection.hh', + 'worker-protocol-impl.hh', + 'worker-protocol.hh', +) diff --git a/src/libstore/names.hh b/src/libstore/include/nix/names.hh similarity index 96% rename from src/libstore/names.hh rename to src/libstore/include/nix/names.hh index a6909d54593..f11c22b1c9b 100644 --- a/src/libstore/names.hh +++ b/src/libstore/include/nix/names.hh @@ -3,7 +3,7 @@ #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libstore/nar-accessor.hh b/src/libstore/include/nix/nar-accessor.hh similarity index 96% rename from src/libstore/nar-accessor.hh rename to src/libstore/include/nix/nar-accessor.hh index 0043897c658..b64330547be 100644 --- a/src/libstore/nar-accessor.hh +++ b/src/libstore/include/nix/nar-accessor.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "source-accessor.hh" +#include "nix/source-accessor.hh" #include diff --git a/src/libstore/nar-info-disk-cache.hh b/src/libstore/include/nix/nar-info-disk-cache.hh similarity index 94% rename from src/libstore/nar-info-disk-cache.hh rename to src/libstore/include/nix/nar-info-disk-cache.hh index bbd1d05d5c5..3a301f7e858 100644 --- a/src/libstore/nar-info-disk-cache.hh +++ b/src/libstore/include/nix/nar-info-disk-cache.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "ref.hh" -#include "nar-info.hh" -#include "realisation.hh" +#include "nix/ref.hh" +#include "nix/nar-info.hh" +#include "nix/realisation.hh" namespace nix { diff --git a/src/libstore/nar-info.hh b/src/libstore/include/nix/nar-info.hh similarity index 93% rename from src/libstore/nar-info.hh rename to src/libstore/include/nix/nar-info.hh index 561c9a86364..117be878f29 100644 --- a/src/libstore/nar-info.hh +++ b/src/libstore/include/nix/nar-info.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "types.hh" -#include "hash.hh" -#include "path-info.hh" +#include "nix/types.hh" +#include "nix/hash.hh" +#include "nix/path-info.hh" namespace nix { diff --git a/src/libstore/outputs-spec.hh b/src/libstore/include/nix/outputs-spec.hh similarity index 98% rename from src/libstore/outputs-spec.hh rename to src/libstore/include/nix/outputs-spec.hh index 30d15311d0a..324d3a33461 100644 --- a/src/libstore/outputs-spec.hh +++ b/src/libstore/include/nix/outputs-spec.hh @@ -6,8 +6,8 @@ #include #include -#include "json-impls.hh" -#include "variant-wrapper.hh" +#include "nix/json-impls.hh" +#include "nix/variant-wrapper.hh" namespace nix { diff --git a/src/libstore/parsed-derivations.hh b/src/libstore/include/nix/parsed-derivations.hh similarity index 95% rename from src/libstore/parsed-derivations.hh rename to src/libstore/include/nix/parsed-derivations.hh index 51992fa84cd..34e254e0d05 100644 --- a/src/libstore/parsed-derivations.hh +++ b/src/libstore/include/nix/parsed-derivations.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "derivations.hh" -#include "store-api.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" #include diff --git a/src/libstore/path-info.hh b/src/libstore/include/nix/path-info.hh similarity index 98% rename from src/libstore/path-info.hh rename to src/libstore/include/nix/path-info.hh index 9a4c466a898..45c411ddd81 100644 --- a/src/libstore/path-info.hh +++ b/src/libstore/include/nix/path-info.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "signature/signer.hh" -#include "path.hh" -#include "hash.hh" -#include "content-address.hh" +#include "nix/signature/signer.hh" +#include "nix/path.hh" +#include "nix/hash.hh" +#include "nix/content-address.hh" #include #include diff --git a/src/libstore/path-references.hh b/src/libstore/include/nix/path-references.hh similarity index 91% rename from src/libstore/path-references.hh rename to src/libstore/include/nix/path-references.hh index 0553003f83a..0b5e427646b 100644 --- a/src/libstore/path-references.hh +++ b/src/libstore/include/nix/path-references.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "references.hh" -#include "path.hh" +#include "nix/references.hh" +#include "nix/path.hh" namespace nix { diff --git a/src/libstore/path-regex.hh b/src/libstore/include/nix/path-regex.hh similarity index 100% rename from src/libstore/path-regex.hh rename to src/libstore/include/nix/path-regex.hh diff --git a/src/libstore/path-with-outputs.hh b/src/libstore/include/nix/path-with-outputs.hh similarity index 95% rename from src/libstore/path-with-outputs.hh rename to src/libstore/include/nix/path-with-outputs.hh index 5f76a583a9a..e2ff303f274 100644 --- a/src/libstore/path-with-outputs.hh +++ b/src/libstore/include/nix/path-with-outputs.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "path.hh" -#include "derived-path.hh" +#include "nix/path.hh" +#include "nix/derived-path.hh" namespace nix { diff --git a/src/libstore/path.hh b/src/libstore/include/nix/path.hh similarity index 98% rename from src/libstore/path.hh rename to src/libstore/include/nix/path.hh index 90226236258..56cd5aeb724 100644 --- a/src/libstore/path.hh +++ b/src/libstore/include/nix/path.hh @@ -3,7 +3,7 @@ #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libstore/pathlocks.hh b/src/libstore/include/nix/pathlocks.hh similarity index 97% rename from src/libstore/pathlocks.hh rename to src/libstore/include/nix/pathlocks.hh index 42a84a1a37b..68f5a026238 100644 --- a/src/libstore/pathlocks.hh +++ b/src/libstore/include/nix/pathlocks.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "file-descriptor.hh" +#include "nix/file-descriptor.hh" namespace nix { diff --git a/src/libstore/posix-fs-canonicalise.hh b/src/libstore/include/nix/posix-fs-canonicalise.hh similarity index 96% rename from src/libstore/posix-fs-canonicalise.hh rename to src/libstore/include/nix/posix-fs-canonicalise.hh index 45a4f3f2069..1309db098e9 100644 --- a/src/libstore/posix-fs-canonicalise.hh +++ b/src/libstore/include/nix/posix-fs-canonicalise.hh @@ -4,8 +4,8 @@ #include #include -#include "types.hh" -#include "error.hh" +#include "nix/types.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libstore/profiles.hh b/src/libstore/include/nix/profiles.hh similarity index 99% rename from src/libstore/profiles.hh rename to src/libstore/include/nix/profiles.hh index 33fcf04b3a8..85f45cb73d4 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/include/nix/profiles.hh @@ -7,8 +7,8 @@ * See the manual for additional information. */ -#include "types.hh" -#include "pathlocks.hh" +#include "nix/types.hh" +#include "nix/pathlocks.hh" #include #include diff --git a/src/libstore/realisation.hh b/src/libstore/include/nix/realisation.hh similarity index 96% rename from src/libstore/realisation.hh rename to src/libstore/include/nix/realisation.hh index ddb4af770a2..2d868980c63 100644 --- a/src/libstore/realisation.hh +++ b/src/libstore/include/nix/realisation.hh @@ -3,12 +3,12 @@ #include -#include "hash.hh" -#include "path.hh" -#include "derived-path.hh" +#include "nix/hash.hh" +#include "nix/path.hh" +#include "nix/derived-path.hh" #include -#include "comparator.hh" -#include "signature/signer.hh" +#include "nix/comparator.hh" +#include "nix/signature/signer.hh" namespace nix { diff --git a/src/libstore/remote-fs-accessor.hh b/src/libstore/include/nix/remote-fs-accessor.hh similarity index 91% rename from src/libstore/remote-fs-accessor.hh rename to src/libstore/include/nix/remote-fs-accessor.hh index d09762a53c4..5abb195ee00 100644 --- a/src/libstore/remote-fs-accessor.hh +++ b/src/libstore/include/nix/remote-fs-accessor.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "source-accessor.hh" -#include "ref.hh" -#include "store-api.hh" +#include "nix/source-accessor.hh" +#include "nix/ref.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/remote-store-connection.hh b/src/libstore/include/nix/remote-store-connection.hh similarity index 91% rename from src/libstore/remote-store-connection.hh rename to src/libstore/include/nix/remote-store-connection.hh index f8549d0b245..5b11a04f770 100644 --- a/src/libstore/remote-store-connection.hh +++ b/src/libstore/include/nix/remote-store-connection.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "remote-store.hh" -#include "worker-protocol.hh" -#include "worker-protocol-connection.hh" -#include "pool.hh" +#include "nix/remote-store.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/pool.hh" namespace nix { diff --git a/src/libstore/remote-store.hh b/src/libstore/include/nix/remote-store.hh similarity index 98% rename from src/libstore/remote-store.hh rename to src/libstore/include/nix/remote-store.hh index ea6cd471eb5..ebc9b2a814e 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/include/nix/remote-store.hh @@ -4,9 +4,9 @@ #include #include -#include "store-api.hh" -#include "gc-store.hh" -#include "log-store.hh" +#include "nix/store-api.hh" +#include "nix/gc-store.hh" +#include "nix/log-store.hh" namespace nix { diff --git a/src/libstore/restricted-store.hh b/src/libstore/include/nix/restricted-store.hh similarity index 100% rename from src/libstore/restricted-store.hh rename to src/libstore/include/nix/restricted-store.hh diff --git a/src/libstore/s3-binary-cache-store.hh b/src/libstore/include/nix/s3-binary-cache-store.hh similarity index 98% rename from src/libstore/s3-binary-cache-store.hh rename to src/libstore/include/nix/s3-binary-cache-store.hh index 7d303a115f4..a0ca22bbbe5 100644 --- a/src/libstore/s3-binary-cache-store.hh +++ b/src/libstore/include/nix/s3-binary-cache-store.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "binary-cache-store.hh" +#include "nix/binary-cache-store.hh" #include diff --git a/src/libstore/s3.hh b/src/libstore/include/nix/s3.hh similarity index 97% rename from src/libstore/s3.hh rename to src/libstore/include/nix/s3.hh index 18de115aeb1..367c41d3682 100644 --- a/src/libstore/s3.hh +++ b/src/libstore/include/nix/s3.hh @@ -3,7 +3,7 @@ #if ENABLE_S3 -#include "ref.hh" +#include "nix/ref.hh" #include #include diff --git a/src/libstore/serve-protocol-connection.hh b/src/libstore/include/nix/serve-protocol-connection.hh similarity index 98% rename from src/libstore/serve-protocol-connection.hh rename to src/libstore/include/nix/serve-protocol-connection.hh index 73bf714439e..f1a9e1edee4 100644 --- a/src/libstore/serve-protocol-connection.hh +++ b/src/libstore/include/nix/serve-protocol-connection.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "serve-protocol.hh" -#include "store-api.hh" +#include "nix/serve-protocol.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/serve-protocol-impl.hh b/src/libstore/include/nix/serve-protocol-impl.hh similarity index 95% rename from src/libstore/serve-protocol-impl.hh rename to src/libstore/include/nix/serve-protocol-impl.hh index 099eade648e..2621d3b428e 100644 --- a/src/libstore/serve-protocol-impl.hh +++ b/src/libstore/include/nix/serve-protocol-impl.hh @@ -8,8 +8,8 @@ * contributing guide. */ -#include "serve-protocol.hh" -#include "length-prefixed-protocol-helper.hh" +#include "nix/serve-protocol.hh" +#include "nix/length-prefixed-protocol-helper.hh" namespace nix { diff --git a/src/libstore/serve-protocol.hh b/src/libstore/include/nix/serve-protocol.hh similarity index 99% rename from src/libstore/serve-protocol.hh rename to src/libstore/include/nix/serve-protocol.hh index 8c112bb74c7..a8587f6183a 100644 --- a/src/libstore/serve-protocol.hh +++ b/src/libstore/include/nix/serve-protocol.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "common-protocol.hh" +#include "nix/common-protocol.hh" namespace nix { diff --git a/src/libstore/sqlite.hh b/src/libstore/include/nix/sqlite.hh similarity index 99% rename from src/libstore/sqlite.hh rename to src/libstore/include/nix/sqlite.hh index 037380b7109..4143fa8a4e4 100644 --- a/src/libstore/sqlite.hh +++ b/src/libstore/include/nix/sqlite.hh @@ -4,7 +4,7 @@ #include #include -#include "error.hh" +#include "nix/error.hh" struct sqlite3; struct sqlite3_stmt; diff --git a/src/libstore/ssh-store.hh b/src/libstore/include/nix/ssh-store.hh similarity index 91% rename from src/libstore/ssh-store.hh rename to src/libstore/include/nix/ssh-store.hh index 29a2a8b2c2d..34ec4f79eca 100644 --- a/src/libstore/ssh-store.hh +++ b/src/libstore/include/nix/ssh-store.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "common-ssh-store-config.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "remote-store.hh" +#include "nix/common-ssh-store-config.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/remote-store.hh" namespace nix { diff --git a/src/libstore/ssh.hh b/src/libstore/include/nix/ssh.hh similarity index 95% rename from src/libstore/ssh.hh rename to src/libstore/include/nix/ssh.hh index eb05df01174..fa046d6de19 100644 --- a/src/libstore/ssh.hh +++ b/src/libstore/include/nix/ssh.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "sync.hh" -#include "processes.hh" -#include "file-system.hh" +#include "nix/sync.hh" +#include "nix/processes.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libstore/store-api.hh b/src/libstore/include/nix/store-api.hh similarity index 98% rename from src/libstore/store-api.hh rename to src/libstore/include/nix/store-api.hh index 1ae4ac064a6..c25329fd620 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/include/nix/store-api.hh @@ -1,20 +1,20 @@ #pragma once ///@file -#include "path.hh" -#include "derived-path.hh" -#include "hash.hh" -#include "content-address.hh" -#include "serialise.hh" -#include "lru-cache.hh" -#include "sync.hh" -#include "globals.hh" -#include "config.hh" -#include "path-info.hh" -#include "repair-flag.hh" -#include "store-dir-config.hh" -#include "store-reference.hh" -#include "source-path.hh" +#include "nix/path.hh" +#include "nix/derived-path.hh" +#include "nix/hash.hh" +#include "nix/content-address.hh" +#include "nix/serialise.hh" +#include "nix/lru-cache.hh" +#include "nix/sync.hh" +#include "nix/globals.hh" +#include "nix/config.hh" +#include "nix/path-info.hh" +#include "nix/repair-flag.hh" +#include "nix/store-dir-config.hh" +#include "nix/store-reference.hh" +#include "nix/source-path.hh" #include #include diff --git a/src/libstore/store-cast.hh b/src/libstore/include/nix/store-cast.hh similarity index 94% rename from src/libstore/store-cast.hh rename to src/libstore/include/nix/store-cast.hh index 2473e72c5c4..4e6691016fb 100644 --- a/src/libstore/store-cast.hh +++ b/src/libstore/include/nix/store-cast.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/store-dir-config.hh b/src/libstore/include/nix/store-dir-config.hh similarity index 95% rename from src/libstore/store-dir-config.hh rename to src/libstore/include/nix/store-dir-config.hh index fd4332b918f..66e084a2494 100644 --- a/src/libstore/store-dir-config.hh +++ b/src/libstore/include/nix/store-dir-config.hh @@ -1,10 +1,10 @@ #pragma once -#include "path.hh" -#include "hash.hh" -#include "content-address.hh" -#include "globals.hh" -#include "config.hh" +#include "nix/path.hh" +#include "nix/hash.hh" +#include "nix/content-address.hh" +#include "nix/globals.hh" +#include "nix/config.hh" #include #include diff --git a/src/libstore/store-reference.hh b/src/libstore/include/nix/store-reference.hh similarity index 98% rename from src/libstore/store-reference.hh rename to src/libstore/include/nix/store-reference.hh index 7100a1db095..922640fe002 100644 --- a/src/libstore/store-reference.hh +++ b/src/libstore/include/nix/store-reference.hh @@ -3,7 +3,7 @@ #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libstore/uds-remote-store.hh b/src/libstore/include/nix/uds-remote-store.hh similarity index 95% rename from src/libstore/uds-remote-store.hh rename to src/libstore/include/nix/uds-remote-store.hh index a8e57166416..0a2e3fe9f57 100644 --- a/src/libstore/uds-remote-store.hh +++ b/src/libstore/include/nix/uds-remote-store.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "remote-store.hh" -#include "remote-store-connection.hh" -#include "indirect-root-store.hh" +#include "nix/remote-store.hh" +#include "nix/remote-store-connection.hh" +#include "nix/indirect-root-store.hh" namespace nix { diff --git a/src/libstore/worker-protocol-connection.hh b/src/libstore/include/nix/worker-protocol-connection.hh similarity index 98% rename from src/libstore/worker-protocol-connection.hh rename to src/libstore/include/nix/worker-protocol-connection.hh index c2f446db1d9..a1a4668f254 100644 --- a/src/libstore/worker-protocol-connection.hh +++ b/src/libstore/include/nix/worker-protocol-connection.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "worker-protocol.hh" -#include "store-api.hh" +#include "nix/worker-protocol.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/worker-protocol-impl.hh b/src/libstore/include/nix/worker-protocol-impl.hh similarity index 95% rename from src/libstore/worker-protocol-impl.hh rename to src/libstore/include/nix/worker-protocol-impl.hh index 87398df90c9..902d21542b6 100644 --- a/src/libstore/worker-protocol-impl.hh +++ b/src/libstore/include/nix/worker-protocol-impl.hh @@ -8,8 +8,8 @@ * contributing guide. */ -#include "worker-protocol.hh" -#include "length-prefixed-protocol-helper.hh" +#include "nix/worker-protocol.hh" +#include "nix/length-prefixed-protocol-helper.hh" namespace nix { diff --git a/src/libstore/worker-protocol.hh b/src/libstore/include/nix/worker-protocol.hh similarity index 99% rename from src/libstore/worker-protocol.hh rename to src/libstore/include/nix/worker-protocol.hh index c356fa1bf37..175ddf01f68 100644 --- a/src/libstore/worker-protocol.hh +++ b/src/libstore/include/nix/worker-protocol.hh @@ -3,7 +3,7 @@ #include -#include "common-protocol.hh" +#include "nix/common-protocol.hh" namespace nix { diff --git a/src/libstore/indirect-root-store.cc b/src/libstore/indirect-root-store.cc index 844d0d6edad..1b51cbe153a 100644 --- a/src/libstore/indirect-root-store.cc +++ b/src/libstore/indirect-root-store.cc @@ -1,4 +1,4 @@ -#include "indirect-root-store.hh" +#include "nix/indirect-root-store.hh" namespace nix { diff --git a/src/libstore/keys.cc b/src/libstore/keys.cc index 668725fc7e8..1b2a612a2be 100644 --- a/src/libstore/keys.cc +++ b/src/libstore/keys.cc @@ -1,6 +1,6 @@ -#include "file-system.hh" -#include "globals.hh" -#include "keys.hh" +#include "nix/file-system.hh" +#include "nix/globals.hh" +#include "nix/keys.hh" namespace nix { diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index 480f4105939..bc2794499de 100644 --- a/src/libstore/legacy-ssh-store.cc +++ b/src/libstore/legacy-ssh-store.cc @@ -1,17 +1,17 @@ -#include "legacy-ssh-store.hh" -#include "common-ssh-store-config.hh" -#include "archive.hh" -#include "pool.hh" -#include "remote-store.hh" -#include "serve-protocol.hh" -#include "serve-protocol-connection.hh" -#include "serve-protocol-impl.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "path-with-outputs.hh" -#include "ssh.hh" -#include "derivations.hh" -#include "callback.hh" +#include "nix/legacy-ssh-store.hh" +#include "nix/common-ssh-store-config.hh" +#include "nix/archive.hh" +#include "nix/pool.hh" +#include "nix/remote-store.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/store-api.hh" +#include "nix/path-with-outputs.hh" +#include "nix/ssh.hh" +#include "nix/derivations.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/linux/fchmodat2-compat.hh b/src/libstore/linux/include/nix/fchmodat2-compat.hh similarity index 100% rename from src/libstore/linux/fchmodat2-compat.hh rename to src/libstore/linux/include/nix/fchmodat2-compat.hh diff --git a/src/libstore/linux/include/nix/meson.build b/src/libstore/linux/include/nix/meson.build new file mode 100644 index 00000000000..f37370c6fb7 --- /dev/null +++ b/src/libstore/linux/include/nix/meson.build @@ -0,0 +1,6 @@ +include_dirs += include_directories('..') + +headers += files( + 'fchmodat2-compat.hh', + 'personality.hh', +) diff --git a/src/libstore/linux/personality.hh b/src/libstore/linux/include/nix/personality.hh similarity index 100% rename from src/libstore/linux/personality.hh rename to src/libstore/linux/include/nix/personality.hh diff --git a/src/libstore/linux/meson.build b/src/libstore/linux/meson.build index 0c494b5d62e..b9a2aed2168 100644 --- a/src/libstore/linux/meson.build +++ b/src/libstore/linux/meson.build @@ -2,9 +2,4 @@ sources += files( 'personality.cc', ) -include_dirs += include_directories('.') - -headers += files( - 'fchmodat2-compat.hh', - 'personality.hh', -) +subdir('include/nix') diff --git a/src/libstore/linux/personality.cc b/src/libstore/linux/personality.cc index 255d174a6cc..bbff765ded7 100644 --- a/src/libstore/linux/personality.cc +++ b/src/libstore/linux/personality.cc @@ -1,5 +1,5 @@ -#include "personality.hh" -#include "globals.hh" +#include "nix/personality.hh" +#include "nix/globals.hh" #include #include diff --git a/src/libstore/local-binary-cache-store.cc b/src/libstore/local-binary-cache-store.cc index dcc6affe4a1..90a770ab0c1 100644 --- a/src/libstore/local-binary-cache-store.cc +++ b/src/libstore/local-binary-cache-store.cc @@ -1,7 +1,7 @@ -#include "local-binary-cache-store.hh" -#include "globals.hh" -#include "nar-info-disk-cache.hh" -#include "signals.hh" +#include "nix/local-binary-cache-store.hh" +#include "nix/globals.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/signals.hh" #include diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index 5449b20eb3b..2798899faaa 100644 --- a/src/libstore/local-fs-store.cc +++ b/src/libstore/local-fs-store.cc @@ -1,10 +1,10 @@ -#include "archive.hh" -#include "posix-source-accessor.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "globals.hh" -#include "compression.hh" -#include "derivations.hh" +#include "nix/archive.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/globals.hh" +#include "nix/compression.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/local-overlay-store.cc b/src/libstore/local-overlay-store.cc index 56ff6bef3e5..c2cc329b4d2 100644 --- a/src/libstore/local-overlay-store.cc +++ b/src/libstore/local-overlay-store.cc @@ -1,8 +1,8 @@ -#include "local-overlay-store.hh" -#include "callback.hh" -#include "realisation.hh" -#include "processes.hh" -#include "url.hh" +#include "nix/local-overlay-store.hh" +#include "nix/callback.hh" +#include "nix/realisation.hh" +#include "nix/processes.hh" +#include "nix/url.hh" #include namespace nix { diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index a9459d0986c..45e0d1b622a 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1,22 +1,22 @@ -#include "local-store.hh" -#include "globals.hh" -#include "git.hh" -#include "archive.hh" -#include "pathlocks.hh" -#include "worker-protocol.hh" -#include "derivations.hh" -#include "realisation.hh" -#include "nar-info.hh" -#include "references.hh" -#include "callback.hh" -#include "topo-sort.hh" -#include "finally.hh" -#include "compression.hh" -#include "signals.hh" -#include "posix-fs-canonicalise.hh" -#include "posix-source-accessor.hh" -#include "keys.hh" -#include "users.hh" +#include "nix/local-store.hh" +#include "nix/globals.hh" +#include "nix/git.hh" +#include "nix/archive.hh" +#include "nix/pathlocks.hh" +#include "nix/worker-protocol.hh" +#include "nix/derivations.hh" +#include "nix/realisation.hh" +#include "nix/nar-info.hh" +#include "nix/references.hh" +#include "nix/callback.hh" +#include "nix/topo-sort.hh" +#include "nix/finally.hh" +#include "nix/compression.hh" +#include "nix/signals.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/keys.hh" +#include "nix/users.hh" #include #include @@ -52,7 +52,7 @@ #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/log-store.cc b/src/libstore/log-store.cc index 8a26832ab28..b2c2ff16a9d 100644 --- a/src/libstore/log-store.cc +++ b/src/libstore/log-store.cc @@ -1,4 +1,4 @@ -#include "log-store.hh" +#include "nix/log-store.hh" namespace nix { diff --git a/src/libstore/machines.cc b/src/libstore/machines.cc index eb729b697f1..7710ae99b75 100644 --- a/src/libstore/machines.cc +++ b/src/libstore/machines.cc @@ -1,6 +1,6 @@ -#include "machines.hh" -#include "globals.hh" -#include "store-api.hh" +#include "nix/machines.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" #include diff --git a/src/libstore/make-content-addressed.cc b/src/libstore/make-content-addressed.cc index a3130d7cc02..c7d44b1a935 100644 --- a/src/libstore/make-content-addressed.cc +++ b/src/libstore/make-content-addressed.cc @@ -1,5 +1,5 @@ -#include "make-content-addressed.hh" -#include "references.hh" +#include "nix/make-content-addressed.hh" +#include "nix/references.hh" namespace nix { diff --git a/src/libstore/meson.build b/src/libstore/meson.build index b32a15037c5..7dfbe19df13 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -166,16 +166,11 @@ if get_option('embedded-sandbox-shell') generated_headers += embedded_sandbox_shell_gen endif -config_h = configure_file( - configuration : configdata, - output : 'config-store.hh', -) - add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', language : 'cpp', ) @@ -250,82 +245,7 @@ sources = files( 'worker-protocol.cc', ) -include_dirs = [ - include_directories('.'), - include_directories('build'), -] - -headers = [config_h] + files( - 'binary-cache-store.hh', - 'build-result.hh', - 'build/derivation-goal.hh', - 'build/drv-output-substitution-goal.hh', - 'build/goal.hh', - 'build/substitution-goal.hh', - 'build/worker.hh', - 'builtins.hh', - 'builtins/buildenv.hh', - 'common-protocol-impl.hh', - 'common-protocol.hh', - 'common-ssh-store-config.hh', - 'content-address.hh', - 'daemon.hh', - 'derivations.hh', - 'derivation-options.hh', - 'derived-path-map.hh', - 'derived-path.hh', - 'downstream-placeholder.hh', - 'filetransfer.hh', - 'gc-store.hh', - 'globals.hh', - 'http-binary-cache-store.hh', - 'indirect-root-store.hh', - 'keys.hh', - 'legacy-ssh-store.hh', - 'length-prefixed-protocol-helper.hh', - 'local-binary-cache-store.hh', - 'local-fs-store.hh', - 'local-overlay-store.hh', - 'local-store.hh', - 'log-store.hh', - 'machines.hh', - 'make-content-addressed.hh', - 'names.hh', - 'nar-accessor.hh', - 'nar-info-disk-cache.hh', - 'nar-info.hh', - 'outputs-spec.hh', - 'parsed-derivations.hh', - 'path-info.hh', - 'path-references.hh', - 'path-regex.hh', - 'path-with-outputs.hh', - 'path.hh', - 'pathlocks.hh', - 'posix-fs-canonicalise.hh', - 'profiles.hh', - 'realisation.hh', - 'remote-fs-accessor.hh', - 'remote-store-connection.hh', - 'remote-store.hh', - 'restricted-store.hh', - 's3-binary-cache-store.hh', - 's3.hh', - 'ssh-store.hh', - 'serve-protocol-connection.hh', - 'serve-protocol-impl.hh', - 'serve-protocol.hh', - 'sqlite.hh', - 'ssh.hh', - 'store-api.hh', - 'store-cast.hh', - 'store-dir-config.hh', - 'store-reference.hh', - 'uds-remote-store.hh', - 'worker-protocol-connection.hh', - 'worker-protocol-impl.hh', - 'worker-protocol.hh', -) +subdir('include/nix') if host_machine.system() == 'linux' subdir('linux') diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 9d3b243266e..ef08f4af7b4 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -1,17 +1,17 @@ #include -#include "derivations.hh" -#include "parsed-derivations.hh" -#include "derivation-options.hh" -#include "globals.hh" -#include "store-api.hh" -#include "thread-pool.hh" -#include "realisation.hh" -#include "topo-sort.hh" -#include "callback.hh" -#include "closure.hh" -#include "filetransfer.hh" -#include "strings.hh" +#include "nix/derivations.hh" +#include "nix/parsed-derivations.hh" +#include "nix/derivation-options.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/thread-pool.hh" +#include "nix/realisation.hh" +#include "nix/topo-sort.hh" +#include "nix/callback.hh" +#include "nix/closure.hh" +#include "nix/filetransfer.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/names.cc b/src/libstore/names.cc index c0e1b1022ac..2842bf3fb83 100644 --- a/src/libstore/names.cc +++ b/src/libstore/names.cc @@ -1,5 +1,5 @@ -#include "names.hh" -#include "util.hh" +#include "nix/names.hh" +#include "nix/util.hh" #include diff --git a/src/libstore/nar-accessor.cc b/src/libstore/nar-accessor.cc index c4e0b137b13..7fe2e7ecbff 100644 --- a/src/libstore/nar-accessor.cc +++ b/src/libstore/nar-accessor.cc @@ -1,5 +1,5 @@ -#include "nar-accessor.hh" -#include "archive.hh" +#include "nix/nar-accessor.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libstore/nar-info-disk-cache.cc b/src/libstore/nar-info-disk-cache.cc index 80e8d34149d..acb7bd3bfbc 100644 --- a/src/libstore/nar-info-disk-cache.cc +++ b/src/libstore/nar-info-disk-cache.cc @@ -1,13 +1,13 @@ -#include "nar-info-disk-cache.hh" -#include "users.hh" -#include "sync.hh" -#include "sqlite.hh" -#include "globals.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/users.hh" +#include "nix/sync.hh" +#include "nix/sqlite.hh" +#include "nix/globals.hh" #include #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc index 27fcc286411..176332a4ada 100644 --- a/src/libstore/nar-info.cc +++ b/src/libstore/nar-info.cc @@ -1,8 +1,8 @@ -#include "globals.hh" -#include "nar-info.hh" -#include "store-api.hh" -#include "strings.hh" -#include "json-utils.hh" +#include "nix/globals.hh" +#include "nix/nar-info.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" +#include "nix/json-utils.hh" namespace nix { diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index aeff24c642a..c2cda58e7cc 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -1,8 +1,8 @@ -#include "local-store.hh" -#include "globals.hh" -#include "signals.hh" -#include "posix-fs-canonicalise.hh" -#include "posix-source-accessor.hh" +#include "nix/local-store.hh" +#include "nix/globals.hh" +#include "nix/signals.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/posix-source-accessor.hh" #include #include diff --git a/src/libstore/outputs-spec.cc b/src/libstore/outputs-spec.cc index b623a975cc4..7d56a7afdbe 100644 --- a/src/libstore/outputs-spec.cc +++ b/src/libstore/outputs-spec.cc @@ -1,11 +1,11 @@ #include #include -#include "util.hh" -#include "regex-combinators.hh" -#include "outputs-spec.hh" -#include "path-regex.hh" -#include "strings-inline.hh" +#include "nix/util.hh" +#include "nix/regex-combinators.hh" +#include "nix/outputs-spec.hh" +#include "nix/path-regex.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libstore/package.nix b/src/libstore/package.nix index f992684dfbe..553bc043e53 100644 --- a/src/libstore/package.nix +++ b/src/libstore/package.nix @@ -43,8 +43,11 @@ mkMesonLibrary (finalAttrs: { ./.version ./meson.build ./meson.options + ./include/nix/meson.build ./linux/meson.build + ./linux/include/nix/meson.build ./unix/meson.build + ./unix/include/nix/meson.build ./windows/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) diff --git a/src/libstore/parsed-derivations.cc b/src/libstore/parsed-derivations.cc index b26c36efe6f..0e8f9ba9518 100644 --- a/src/libstore/parsed-derivations.cc +++ b/src/libstore/parsed-derivations.cc @@ -1,4 +1,4 @@ -#include "parsed-derivations.hh" +#include "nix/parsed-derivations.hh" #include #include diff --git a/src/libstore/path-info.cc b/src/libstore/path-info.cc index 6e87e60f446..574ada7ac28 100644 --- a/src/libstore/path-info.cc +++ b/src/libstore/path-info.cc @@ -1,10 +1,10 @@ #include -#include "path-info.hh" -#include "store-api.hh" -#include "json-utils.hh" -#include "comparator.hh" -#include "strings.hh" +#include "nix/path-info.hh" +#include "nix/store-api.hh" +#include "nix/json-utils.hh" +#include "nix/comparator.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/path-references.cc b/src/libstore/path-references.cc index 15f52ec9dea..a5aa8f48f59 100644 --- a/src/libstore/path-references.cc +++ b/src/libstore/path-references.cc @@ -1,6 +1,6 @@ -#include "path-references.hh" -#include "hash.hh" -#include "archive.hh" +#include "nix/path-references.hh" +#include "nix/hash.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libstore/path-with-outputs.cc b/src/libstore/path-with-outputs.cc index e526b1ff6c7..87f7c6a726c 100644 --- a/src/libstore/path-with-outputs.cc +++ b/src/libstore/path-with-outputs.cc @@ -1,8 +1,8 @@ #include -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "strings.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/path.cc b/src/libstore/path.cc index 3e9d054778c..d1eb02e709a 100644 --- a/src/libstore/path.cc +++ b/src/libstore/path.cc @@ -1,4 +1,4 @@ -#include "store-dir-config.hh" +#include "nix/store-dir-config.hh" namespace nix { diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc index c855e797fdc..36bee67416e 100644 --- a/src/libstore/pathlocks.cc +++ b/src/libstore/pathlocks.cc @@ -1,7 +1,7 @@ -#include "pathlocks.hh" -#include "util.hh" -#include "sync.hh" -#include "signals.hh" +#include "nix/pathlocks.hh" +#include "nix/util.hh" +#include "nix/sync.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/posix-fs-canonicalise.cc b/src/libstore/posix-fs-canonicalise.cc index 46a78cc86aa..5fddae42fcf 100644 --- a/src/libstore/posix-fs-canonicalise.cc +++ b/src/libstore/posix-fs-canonicalise.cc @@ -2,12 +2,12 @@ # include #endif -#include "posix-fs-canonicalise.hh" -#include "file-system.hh" -#include "signals.hh" -#include "util.hh" -#include "globals.hh" -#include "store-api.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/util.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index 46efedfe327..19358f1360e 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -1,8 +1,8 @@ -#include "profiles.hh" -#include "signals.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "users.hh" +#include "nix/profiles.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/users.hh" #include #include diff --git a/src/libstore/realisation.cc b/src/libstore/realisation.cc index 86bfdd1a8bf..63b156b30a2 100644 --- a/src/libstore/realisation.cc +++ b/src/libstore/realisation.cc @@ -1,7 +1,7 @@ -#include "realisation.hh" -#include "store-api.hh" -#include "closure.hh" -#include "signature/local-keys.hh" +#include "nix/realisation.hh" +#include "nix/store-api.hh" +#include "nix/closure.hh" +#include "nix/signature/local-keys.hh" #include namespace nix { diff --git a/src/libstore/remote-fs-accessor.cc b/src/libstore/remote-fs-accessor.cc index 7e360b5fef1..2b3f0675d04 100644 --- a/src/libstore/remote-fs-accessor.cc +++ b/src/libstore/remote-fs-accessor.cc @@ -1,6 +1,6 @@ #include -#include "remote-fs-accessor.hh" -#include "nar-accessor.hh" +#include "nix/remote-fs-accessor.hh" +#include "nix/nar-accessor.hh" #include #include diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index cd807991ba4..b71d179b701 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -1,23 +1,23 @@ -#include "serialise.hh" -#include "util.hh" -#include "path-with-outputs.hh" -#include "gc-store.hh" -#include "remote-fs-accessor.hh" -#include "build-result.hh" -#include "remote-store.hh" -#include "remote-store-connection.hh" -#include "worker-protocol.hh" -#include "worker-protocol-impl.hh" -#include "archive.hh" -#include "globals.hh" -#include "derivations.hh" -#include "pool.hh" -#include "finally.hh" -#include "git.hh" -#include "logging.hh" -#include "callback.hh" -#include "filetransfer.hh" -#include "signals.hh" +#include "nix/serialise.hh" +#include "nix/util.hh" +#include "nix/path-with-outputs.hh" +#include "nix/gc-store.hh" +#include "nix/remote-fs-accessor.hh" +#include "nix/build-result.hh" +#include "nix/remote-store.hh" +#include "nix/remote-store-connection.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/globals.hh" +#include "nix/derivations.hh" +#include "nix/pool.hh" +#include "nix/finally.hh" +#include "nix/git.hh" +#include "nix/logging.hh" +#include "nix/callback.hh" +#include "nix/filetransfer.hh" +#include "nix/signals.hh" #include diff --git a/src/libstore/restricted-store.cc b/src/libstore/restricted-store.cc index 42e81765d5f..cb45838a5be 100644 --- a/src/libstore/restricted-store.cc +++ b/src/libstore/restricted-store.cc @@ -1,7 +1,7 @@ -#include "restricted-store.hh" -#include "build-result.hh" -#include "callback.hh" -#include "realisation.hh" +#include "nix/restricted-store.hh" +#include "nix/build-result.hh" +#include "nix/callback.hh" +#include "nix/realisation.hh" namespace nix { diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index cfa713b00c2..69ebad75b63 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -2,14 +2,14 @@ #include -#include "s3.hh" -#include "s3-binary-cache-store.hh" -#include "nar-info.hh" -#include "nar-info-disk-cache.hh" -#include "globals.hh" -#include "compression.hh" -#include "filetransfer.hh" -#include "signals.hh" +#include "nix/s3.hh" +#include "nix/s3-binary-cache-store.hh" +#include "nix/nar-info.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/globals.hh" +#include "nix/compression.hh" +#include "nix/filetransfer.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/serve-protocol-connection.cc b/src/libstore/serve-protocol-connection.cc index 07379999b4b..577297af820 100644 --- a/src/libstore/serve-protocol-connection.cc +++ b/src/libstore/serve-protocol-connection.cc @@ -1,7 +1,7 @@ -#include "serve-protocol-connection.hh" -#include "serve-protocol-impl.hh" -#include "build-result.hh" -#include "derivations.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/serve-protocol.cc b/src/libstore/serve-protocol.cc index 08bfad9e405..0e2a3bc9d13 100644 --- a/src/libstore/serve-protocol.cc +++ b/src/libstore/serve-protocol.cc @@ -1,11 +1,11 @@ -#include "serialise.hh" -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "build-result.hh" -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" -#include "archive.hh" -#include "path-info.hh" +#include "nix/serialise.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/path-info.hh" #include diff --git a/src/libstore/sqlite.cc b/src/libstore/sqlite.cc index f02e472fd5f..1f9622255d5 100644 --- a/src/libstore/sqlite.cc +++ b/src/libstore/sqlite.cc @@ -1,8 +1,8 @@ -#include "sqlite.hh" -#include "globals.hh" -#include "util.hh" -#include "url.hh" -#include "signals.hh" +#include "nix/sqlite.hh" +#include "nix/globals.hh" +#include "nix/util.hh" +#include "nix/url.hh" +#include "nix/signals.hh" #include diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc index 954a9746774..dc889cb3901 100644 --- a/src/libstore/ssh-store.cc +++ b/src/libstore/ssh-store.cc @@ -1,12 +1,12 @@ -#include "ssh-store.hh" -#include "local-fs-store.hh" -#include "remote-store-connection.hh" -#include "source-accessor.hh" -#include "archive.hh" -#include "worker-protocol.hh" -#include "worker-protocol-impl.hh" -#include "pool.hh" -#include "ssh.hh" +#include "nix/ssh-store.hh" +#include "nix/local-fs-store.hh" +#include "nix/remote-store-connection.hh" +#include "nix/source-accessor.hh" +#include "nix/archive.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/pool.hh" +#include "nix/ssh.hh" namespace nix { diff --git a/src/libstore/ssh.cc b/src/libstore/ssh.cc index 70e6d5dfe5d..86b6eda7c4b 100644 --- a/src/libstore/ssh.cc +++ b/src/libstore/ssh.cc @@ -1,9 +1,9 @@ -#include "ssh.hh" -#include "finally.hh" -#include "current-process.hh" -#include "environment-variables.hh" -#include "util.hh" -#include "exec.hh" +#include "nix/ssh.hh" +#include "nix/finally.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" +#include "nix/util.hh" +#include "nix/exec.hh" namespace nix { diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 172c82324c0..29ac59168ae 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -1,28 +1,28 @@ -#include "signature/local-keys.hh" -#include "source-accessor.hh" -#include "globals.hh" -#include "derived-path.hh" -#include "realisation.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "util.hh" -#include "nar-info-disk-cache.hh" -#include "thread-pool.hh" -#include "references.hh" -#include "archive.hh" -#include "callback.hh" -#include "git.hh" -#include "posix-source-accessor.hh" +#include "nix/signature/local-keys.hh" +#include "nix/source-accessor.hh" +#include "nix/globals.hh" +#include "nix/derived-path.hh" +#include "nix/realisation.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/util.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/thread-pool.hh" +#include "nix/references.hh" +#include "nix/archive.hh" +#include "nix/callback.hh" +#include "nix/git.hh" +#include "nix/posix-source-accessor.hh" // FIXME this should not be here, see TODO below on // `addMultipleToStore`. -#include "worker-protocol.hh" -#include "signals.hh" -#include "users.hh" +#include "nix/worker-protocol.hh" +#include "nix/signals.hh" +#include "nix/users.hh" #include #include -#include "strings.hh" +#include "nix/strings.hh" using json = nlohmann::json; @@ -1305,8 +1305,8 @@ void Store::signRealisation(Realisation & realisation) } -#include "local-store.hh" -#include "uds-remote-store.hh" +#include "nix/local-store.hh" +#include "nix/uds-remote-store.hh" namespace nix { diff --git a/src/libstore/store-reference.cc b/src/libstore/store-reference.cc index b4968dfadbd..610e70f9902 100644 --- a/src/libstore/store-reference.cc +++ b/src/libstore/store-reference.cc @@ -1,10 +1,10 @@ #include -#include "error.hh" -#include "url.hh" -#include "store-reference.hh" -#include "file-system.hh" -#include "util.hh" +#include "nix/error.hh" +#include "nix/url.hh" +#include "nix/store-reference.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libstore/uds-remote-store.cc b/src/libstore/uds-remote-store.cc index 3c445eb1318..b41eae39c8e 100644 --- a/src/libstore/uds-remote-store.cc +++ b/src/libstore/uds-remote-store.cc @@ -1,6 +1,6 @@ -#include "uds-remote-store.hh" -#include "unix-domain-socket.hh" -#include "worker-protocol.hh" +#include "nix/uds-remote-store.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/worker-protocol.hh" #include #include diff --git a/src/libstore/unix/build/child.cc b/src/libstore/unix/build/child.cc index aa31c3caf24..c19d1e64618 100644 --- a/src/libstore/unix/build/child.cc +++ b/src/libstore/unix/build/child.cc @@ -1,6 +1,6 @@ -#include "child.hh" -#include "current-process.hh" -#include "logging.hh" +#include "nix/build/child.hh" +#include "nix/current-process.hh" +#include "nix/logging.hh" #include #include diff --git a/src/libstore/unix/build/hook-instance.cc b/src/libstore/unix/build/hook-instance.cc index 79eb25a91be..5407bef14c3 100644 --- a/src/libstore/unix/build/hook-instance.cc +++ b/src/libstore/unix/build/hook-instance.cc @@ -1,10 +1,10 @@ -#include "globals.hh" -#include "config-global.hh" -#include "hook-instance.hh" -#include "file-system.hh" -#include "child.hh" -#include "strings.hh" -#include "executable-path.hh" +#include "nix/globals.hh" +#include "nix/config-global.hh" +#include "nix/build/hook-instance.hh" +#include "nix/file-system.hh" +#include "nix/build/child.hh" +#include "nix/strings.hh" +#include "nix/executable-path.hh" namespace nix { diff --git a/src/libstore/unix/build/local-derivation-goal.cc b/src/libstore/unix/build/local-derivation-goal.cc index 859663b682b..0643d7ff839 100644 --- a/src/libstore/unix/build/local-derivation-goal.cc +++ b/src/libstore/unix/build/local-derivation-goal.cc @@ -1,27 +1,27 @@ -#include "local-derivation-goal.hh" -#include "local-store.hh" -#include "processes.hh" -#include "indirect-root-store.hh" -#include "hook-instance.hh" -#include "worker.hh" -#include "builtins.hh" -#include "builtins/buildenv.hh" -#include "path-references.hh" -#include "finally.hh" -#include "util.hh" -#include "archive.hh" -#include "git.hh" -#include "compression.hh" -#include "daemon.hh" -#include "topo-sort.hh" -#include "callback.hh" -#include "json-utils.hh" -#include "current-process.hh" -#include "child.hh" -#include "unix-domain-socket.hh" -#include "posix-fs-canonicalise.hh" -#include "posix-source-accessor.hh" -#include "restricted-store.hh" +#include "nix/build/local-derivation-goal.hh" +#include "nix/local-store.hh" +#include "nix/processes.hh" +#include "nix/indirect-root-store.hh" +#include "nix/build/hook-instance.hh" +#include "nix/build/worker.hh" +#include "nix/builtins.hh" +#include "nix/builtins/buildenv.hh" +#include "nix/path-references.hh" +#include "nix/finally.hh" +#include "nix/util.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/compression.hh" +#include "nix/daemon.hh" +#include "nix/topo-sort.hh" +#include "nix/callback.hh" +#include "nix/json-utils.hh" +#include "nix/current-process.hh" +#include "nix/build/child.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/restricted-store.hh" #include #include @@ -40,7 +40,7 @@ /* Includes required for chroot support. */ #if __linux__ -# include "fchmodat2-compat.hh" +# include "nix/fchmodat2-compat.hh" # include # include # include @@ -49,13 +49,13 @@ # include # include # include -# include "namespaces.hh" +# include "nix/namespaces.hh" # if HAVE_SECCOMP # include # endif # define pivot_root(new_root, put_old) (syscall(SYS_pivot_root, new_root, put_old)) -# include "cgroup.hh" -# include "personality.hh" +# include "nix/cgroup.hh" +# include "nix/personality.hh" #endif #if __APPLE__ @@ -71,8 +71,8 @@ extern "C" int sandbox_init_with_parameters(const char *profile, uint64_t flags, #include #include -#include "strings.hh" -#include "signals.hh" +#include "nix/strings.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libstore/unix/build/child.hh b/src/libstore/unix/include/nix/build/child.hh similarity index 100% rename from src/libstore/unix/build/child.hh rename to src/libstore/unix/include/nix/build/child.hh diff --git a/src/libstore/unix/build/hook-instance.hh b/src/libstore/unix/include/nix/build/hook-instance.hh similarity index 85% rename from src/libstore/unix/build/hook-instance.hh rename to src/libstore/unix/include/nix/build/hook-instance.hh index 61cf534f4e9..b82a5118370 100644 --- a/src/libstore/unix/build/hook-instance.hh +++ b/src/libstore/unix/include/nix/build/hook-instance.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "logging.hh" -#include "serialise.hh" -#include "processes.hh" +#include "nix/logging.hh" +#include "nix/serialise.hh" +#include "nix/processes.hh" namespace nix { diff --git a/src/libstore/unix/build/local-derivation-goal.hh b/src/libstore/unix/include/nix/build/local-derivation-goal.hh similarity index 94% rename from src/libstore/unix/build/local-derivation-goal.hh rename to src/libstore/unix/include/nix/build/local-derivation-goal.hh index 7659e8f993c..a5c8d36c577 100644 --- a/src/libstore/unix/build/local-derivation-goal.hh +++ b/src/libstore/unix/include/nix/build/local-derivation-goal.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "derivation-goal.hh" +#include "nix/build/derivation-goal.hh" namespace nix { diff --git a/src/libstore/unix/include/nix/meson.build b/src/libstore/unix/include/nix/meson.build new file mode 100644 index 00000000000..b07787c0aac --- /dev/null +++ b/src/libstore/unix/include/nix/meson.build @@ -0,0 +1,8 @@ +include_dirs += include_directories('..') + +headers += files( + 'build/child.hh', + 'build/hook-instance.hh', + 'build/local-derivation-goal.hh', + 'user-lock.hh', +) diff --git a/src/libstore/unix/user-lock.hh b/src/libstore/unix/include/nix/user-lock.hh similarity index 100% rename from src/libstore/unix/user-lock.hh rename to src/libstore/unix/include/nix/user-lock.hh diff --git a/src/libstore/unix/meson.build b/src/libstore/unix/meson.build index d9d19013107..7c80aa1a1f7 100644 --- a/src/libstore/unix/meson.build +++ b/src/libstore/unix/meson.build @@ -6,14 +6,4 @@ sources += files( 'user-lock.cc', ) -include_dirs += include_directories( - '.', - 'build', -) - -headers += files( - 'build/child.hh', - 'build/hook-instance.hh', - 'build/local-derivation-goal.hh', - 'user-lock.hh', -) +subdir('include/nix') diff --git a/src/libstore/unix/pathlocks.cc b/src/libstore/unix/pathlocks.cc index 1ec4579ec96..3cc24c85973 100644 --- a/src/libstore/unix/pathlocks.cc +++ b/src/libstore/unix/pathlocks.cc @@ -1,7 +1,7 @@ -#include "pathlocks.hh" -#include "util.hh" -#include "sync.hh" -#include "signals.hh" +#include "nix/pathlocks.hh" +#include "nix/util.hh" +#include "nix/sync.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/unix/user-lock.cc b/src/libstore/unix/user-lock.cc index 29f4b2cb31c..4426f07689e 100644 --- a/src/libstore/unix/user-lock.cc +++ b/src/libstore/unix/user-lock.cc @@ -2,11 +2,11 @@ #include #include -#include "user-lock.hh" -#include "file-system.hh" -#include "globals.hh" -#include "pathlocks.hh" -#include "users.hh" +#include "nix/user-lock.hh" +#include "nix/file-system.hh" +#include "nix/globals.hh" +#include "nix/pathlocks.hh" +#include "nix/users.hh" namespace nix { diff --git a/src/libstore/windows/pathlocks.cc b/src/libstore/windows/pathlocks.cc index 29a98d8e231..0161a8c322e 100644 --- a/src/libstore/windows/pathlocks.cc +++ b/src/libstore/windows/pathlocks.cc @@ -1,13 +1,13 @@ -#include "logging.hh" -#include "pathlocks.hh" -#include "signals.hh" -#include "util.hh" +#include "nix/logging.hh" +#include "nix/pathlocks.hh" +#include "nix/signals.hh" +#include "nix/util.hh" #ifdef _WIN32 # include # include # include -# include "windows-error.hh" +# include "nix/windows-error.hh" namespace nix { diff --git a/src/libstore/worker-protocol-connection.cc b/src/libstore/worker-protocol-connection.cc index 6585df4be62..a30e808a7cd 100644 --- a/src/libstore/worker-protocol-connection.cc +++ b/src/libstore/worker-protocol-connection.cc @@ -1,7 +1,7 @@ -#include "worker-protocol-connection.hh" -#include "worker-protocol-impl.hh" -#include "build-result.hh" -#include "derivations.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/worker-protocol.cc b/src/libstore/worker-protocol.cc index f06fb2893c7..e9972365205 100644 --- a/src/libstore/worker-protocol.cc +++ b/src/libstore/worker-protocol.cc @@ -1,11 +1,11 @@ -#include "serialise.hh" -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "build-result.hh" -#include "worker-protocol.hh" -#include "worker-protocol-impl.hh" -#include "archive.hh" -#include "path-info.hh" +#include "nix/serialise.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/path-info.hh" #include #include diff --git a/src/libutil-c/meson.build b/src/libutil-c/meson.build index 2733a33ba4d..cd53bc5854c 100644 --- a/src/libutil-c/meson.build +++ b/src/libutil-c/meson.build @@ -27,7 +27,7 @@ configdata.set_quoted('PACKAGE_VERSION', meson.project_version()) config_h = configure_file( configuration : configdata, - output : 'config-util.h', + output : 'nix_api_util_config.h', ) add_project_arguments( @@ -35,7 +35,7 @@ add_project_arguments( # It would be nice for our headers to be idempotent instead. # From C++ libraries, only for internals - '-include', 'config-util.hh', + '-include', 'nix/config-util.hh', language : 'cpp', ) @@ -69,7 +69,7 @@ this_library = library( install : true, ) -install_headers(headers, subdir : 'nix', preserve_path : true) +install_headers(headers, preserve_path : true) libraries_private = [] diff --git a/src/libutil-c/nix_api_util.cc b/src/libutil-c/nix_api_util.cc index 3e061d53e56..483c5484a33 100644 --- a/src/libutil-c/nix_api_util.cc +++ b/src/libutil-c/nix_api_util.cc @@ -1,13 +1,13 @@ #include "nix_api_util.h" -#include "config-global.hh" -#include "error.hh" +#include "nix/config-global.hh" +#include "nix/error.hh" #include "nix_api_util_internal.h" -#include "util.hh" +#include "nix/util.hh" #include #include -#include "config-util.h" +#include "nix_api_util_config.h" nix_c_context * nix_c_context_create() { diff --git a/src/libutil-c/nix_api_util_internal.h b/src/libutil-c/nix_api_util_internal.h index 7fa4252acfd..362d8c59a02 100644 --- a/src/libutil-c/nix_api_util_internal.h +++ b/src/libutil-c/nix_api_util_internal.h @@ -4,7 +4,7 @@ #include #include -#include "error.hh" +#include "nix/error.hh" #include "nix_api_util.h" struct nix_c_context diff --git a/src/libutil-test-support/tests/hash.cc b/src/libutil-test-support/hash.cc similarity index 91% rename from src/libutil-test-support/tests/hash.cc rename to src/libutil-test-support/hash.cc index 51b9663b4c4..3614b42b3aa 100644 --- a/src/libutil-test-support/tests/hash.cc +++ b/src/libutil-test-support/hash.cc @@ -2,9 +2,9 @@ #include -#include "hash.hh" +#include "nix/hash.hh" -#include "tests/hash.hh" +#include "nix/tests/hash.hh" namespace rc { using namespace nix; diff --git a/src/libutil-test-support/include/nix/meson.build b/src/libutil-test-support/include/nix/meson.build new file mode 100644 index 00000000000..6490d19ace4 --- /dev/null +++ b/src/libutil-test-support/include/nix/meson.build @@ -0,0 +1,11 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +headers = files( + 'tests/characterization.hh', + 'tests/gtest-with-params.hh', + 'tests/hash.hh', + 'tests/nix_api_util.hh', + 'tests/string_callback.hh', +) diff --git a/src/libutil-test-support/tests/characterization.hh b/src/libutil-test-support/include/nix/tests/characterization.hh similarity index 96% rename from src/libutil-test-support/tests/characterization.hh rename to src/libutil-test-support/include/nix/tests/characterization.hh index 5e790e75ba6..f9079363323 100644 --- a/src/libutil-test-support/tests/characterization.hh +++ b/src/libutil-test-support/include/nix/tests/characterization.hh @@ -3,9 +3,9 @@ #include -#include "types.hh" -#include "environment-variables.hh" -#include "file-system.hh" +#include "nix/types.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil-test-support/tests/gtest-with-params.hh b/src/libutil-test-support/include/nix/tests/gtest-with-params.hh similarity index 100% rename from src/libutil-test-support/tests/gtest-with-params.hh rename to src/libutil-test-support/include/nix/tests/gtest-with-params.hh diff --git a/src/libutil-test-support/tests/hash.hh b/src/libutil-test-support/include/nix/tests/hash.hh similarity index 88% rename from src/libutil-test-support/tests/hash.hh rename to src/libutil-test-support/include/nix/tests/hash.hh index 1f9fa59ae9b..b965ac1a24e 100644 --- a/src/libutil-test-support/tests/hash.hh +++ b/src/libutil-test-support/include/nix/tests/hash.hh @@ -3,7 +3,7 @@ #include -#include +#include "nix/hash.hh" namespace rc { using namespace nix; diff --git a/src/libutil-test-support/tests/nix_api_util.hh b/src/libutil-test-support/include/nix/tests/nix_api_util.hh similarity index 100% rename from src/libutil-test-support/tests/nix_api_util.hh rename to src/libutil-test-support/include/nix/tests/nix_api_util.hh diff --git a/src/libutil-test-support/tests/string_callback.hh b/src/libutil-test-support/include/nix/tests/string_callback.hh similarity index 100% rename from src/libutil-test-support/tests/string_callback.hh rename to src/libutil-test-support/include/nix/tests/string_callback.hh diff --git a/src/libutil-test-support/tests/tracing-file-system-object-sink.hh b/src/libutil-test-support/include/nix/tests/tracing-file-system-object-sink.hh similarity index 97% rename from src/libutil-test-support/tests/tracing-file-system-object-sink.hh rename to src/libutil-test-support/include/nix/tests/tracing-file-system-object-sink.hh index 895ac366405..f5d38d0f811 100644 --- a/src/libutil-test-support/tests/tracing-file-system-object-sink.hh +++ b/src/libutil-test-support/include/nix/tests/tracing-file-system-object-sink.hh @@ -1,5 +1,5 @@ #pragma once -#include "fs-sink.hh" +#include "nix/fs-sink.hh" namespace nix::test { diff --git a/src/libutil-test-support/meson.build b/src/libutil-test-support/meson.build index db944cf0619..f235af9eb3c 100644 --- a/src/libutil-test-support/meson.build +++ b/src/libutil-test-support/meson.build @@ -28,26 +28,18 @@ deps_public += rapidcheck add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', + '-include', 'nix/config-util.hh', language : 'cpp', ) subdir('nix-meson-build-support/common') sources = files( - 'tests/hash.cc', - 'tests/string_callback.cc', + 'hash.cc', + 'string_callback.cc', ) -include_dirs = [include_directories('.')] - -headers = files( - 'tests/characterization.hh', - 'tests/gtest-with-params.hh', - 'tests/hash.hh', - 'tests/nix_api_util.hh', - 'tests/string_callback.hh', -) +subdir('include/nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libutil-test-support/package.nix b/src/libutil-test-support/package.nix index fafd47c86c5..033758d7b5a 100644 --- a/src/libutil-test-support/package.nix +++ b/src/libutil-test-support/package.nix @@ -28,6 +28,7 @@ mkMesonLibrary (finalAttrs: { ./.version ./meson.build # ./meson.options + ./include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libutil-test-support/tests/string_callback.cc b/src/libutil-test-support/string_callback.cc similarity index 85% rename from src/libutil-test-support/tests/string_callback.cc rename to src/libutil-test-support/string_callback.cc index 7a13bd4ff9c..25781dc60ce 100644 --- a/src/libutil-test-support/tests/string_callback.cc +++ b/src/libutil-test-support/string_callback.cc @@ -1,4 +1,4 @@ -#include "string_callback.hh" +#include "nix/tests/string_callback.hh" namespace nix::testing { diff --git a/src/libutil-test-support/tests/tracing-file-system-object-sink.cc b/src/libutil-test-support/tracing-file-system-object-sink.cc similarity index 95% rename from src/libutil-test-support/tests/tracing-file-system-object-sink.cc rename to src/libutil-test-support/tracing-file-system-object-sink.cc index 122a09dcb32..52b081fb8fa 100644 --- a/src/libutil-test-support/tests/tracing-file-system-object-sink.cc +++ b/src/libutil-test-support/tracing-file-system-object-sink.cc @@ -1,5 +1,5 @@ #include -#include "tracing-file-system-object-sink.hh" +#include "nix/tracing-file-system-object-sink.hh" namespace nix::test { diff --git a/src/libutil-tests/args.cc b/src/libutil-tests/args.cc index 95022443006..abcc8564175 100644 --- a/src/libutil-tests/args.cc +++ b/src/libutil-tests/args.cc @@ -1,5 +1,5 @@ -#include "args.hh" -#include "fs-sink.hh" +#include "nix/args.hh" +#include "nix/fs-sink.hh" #include #include diff --git a/src/libutil-tests/canon-path.cc b/src/libutil-tests/canon-path.cc index 7f91308afe1..6ef6d3c994b 100644 --- a/src/libutil-tests/canon-path.cc +++ b/src/libutil-tests/canon-path.cc @@ -1,4 +1,4 @@ -#include "canon-path.hh" +#include "nix/canon-path.hh" #include diff --git a/src/libutil-tests/checked-arithmetic.cc b/src/libutil-tests/checked-arithmetic.cc index 75018660dc8..4d98344fb33 100644 --- a/src/libutil-tests/checked-arithmetic.cc +++ b/src/libutil-tests/checked-arithmetic.cc @@ -5,9 +5,9 @@ #include #include -#include +#include "nix/checked-arithmetic.hh" -#include "tests/gtest-with-params.hh" +#include "nix/tests/gtest-with-params.hh" namespace rc { using namespace nix; diff --git a/src/libutil-tests/chunked-vector.cc b/src/libutil-tests/chunked-vector.cc index 868d11f6f37..16dedc63f53 100644 --- a/src/libutil-tests/chunked-vector.cc +++ b/src/libutil-tests/chunked-vector.cc @@ -1,4 +1,4 @@ -#include "chunked-vector.hh" +#include "nix/chunked-vector.hh" #include diff --git a/src/libutil-tests/closure.cc b/src/libutil-tests/closure.cc index 7597e78073b..b6b777bcc43 100644 --- a/src/libutil-tests/closure.cc +++ b/src/libutil-tests/closure.cc @@ -1,4 +1,4 @@ -#include "closure.hh" +#include "nix/closure.hh" #include namespace nix { diff --git a/src/libutil-tests/compression.cc b/src/libutil-tests/compression.cc index bbbf3500fbf..7c7dfbd7bb4 100644 --- a/src/libutil-tests/compression.cc +++ b/src/libutil-tests/compression.cc @@ -1,4 +1,4 @@ -#include "compression.hh" +#include "nix/compression.hh" #include namespace nix { diff --git a/src/libutil-tests/config.cc b/src/libutil-tests/config.cc index 886e70da50d..aae410d2b5a 100644 --- a/src/libutil-tests/config.cc +++ b/src/libutil-tests/config.cc @@ -1,5 +1,5 @@ -#include "config.hh" -#include "args.hh" +#include "nix/config.hh" +#include "nix/args.hh" #include #include diff --git a/src/libutil-tests/executable-path.cc b/src/libutil-tests/executable-path.cc index 8d182357dab..041209882cc 100644 --- a/src/libutil-tests/executable-path.cc +++ b/src/libutil-tests/executable-path.cc @@ -1,6 +1,6 @@ #include -#include "executable-path.hh" +#include "nix/executable-path.hh" namespace nix { diff --git a/src/libutil-tests/file-content-address.cc b/src/libutil-tests/file-content-address.cc index 27d926a8736..686114a9fc1 100644 --- a/src/libutil-tests/file-content-address.cc +++ b/src/libutil-tests/file-content-address.cc @@ -1,6 +1,6 @@ #include -#include "file-content-address.hh" +#include "nix/file-content-address.hh" namespace nix { diff --git a/src/libutil-tests/file-system.cc b/src/libutil-tests/file-system.cc index a8c31a00eda..363f71b7a08 100644 --- a/src/libutil-tests/file-system.cc +++ b/src/libutil-tests/file-system.cc @@ -1,9 +1,9 @@ -#include "util.hh" -#include "types.hh" -#include "file-system.hh" -#include "processes.hh" -#include "terminal.hh" -#include "strings.hh" +#include "nix/util.hh" +#include "nix/types.hh" +#include "nix/file-system.hh" +#include "nix/processes.hh" +#include "nix/terminal.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libutil-tests/git.cc b/src/libutil-tests/git.cc index 048956a580a..b91d5019b53 100644 --- a/src/libutil-tests/git.cc +++ b/src/libutil-tests/git.cc @@ -1,9 +1,9 @@ #include -#include "git.hh" -#include "memory-source-accessor.hh" +#include "nix/git.hh" +#include "nix/memory-source-accessor.hh" -#include "tests/characterization.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libutil-tests/hash.cc b/src/libutil-tests/hash.cc index 3a639aef92f..1ba69a57337 100644 --- a/src/libutil-tests/hash.cc +++ b/src/libutil-tests/hash.cc @@ -2,7 +2,7 @@ #include -#include "hash.hh" +#include "nix/hash.hh" namespace nix { diff --git a/src/libutil-tests/hilite.cc b/src/libutil-tests/hilite.cc index 5ef58188884..e571a9bf65f 100644 --- a/src/libutil-tests/hilite.cc +++ b/src/libutil-tests/hilite.cc @@ -1,4 +1,4 @@ -#include "hilite.hh" +#include "nix/hilite.hh" #include diff --git a/src/libutil-tests/json-utils.cc b/src/libutil-tests/json-utils.cc index 704a4acb05d..b8722bd304d 100644 --- a/src/libutil-tests/json-utils.cc +++ b/src/libutil-tests/json-utils.cc @@ -3,8 +3,8 @@ #include -#include "error.hh" -#include "json-utils.hh" +#include "nix/error.hh" +#include "nix/json-utils.hh" namespace nix { diff --git a/src/libutil-tests/logging.cc b/src/libutil-tests/logging.cc index 1d7304f0591..ca89ee02ff8 100644 --- a/src/libutil-tests/logging.cc +++ b/src/libutil-tests/logging.cc @@ -1,7 +1,7 @@ #if 0 -#include "logging.hh" -#include "nixexpr.hh" +#include "nix/logging.hh" +#include "nix/nixexpr.hh" #include #include diff --git a/src/libutil-tests/lru-cache.cc b/src/libutil-tests/lru-cache.cc index 091d3d5ede1..98763588af3 100644 --- a/src/libutil-tests/lru-cache.cc +++ b/src/libutil-tests/lru-cache.cc @@ -1,4 +1,4 @@ -#include "lru-cache.hh" +#include "nix/lru-cache.hh" #include namespace nix { diff --git a/src/libutil-tests/nix_api_util.cc b/src/libutil-tests/nix_api_util.cc index 7b77bd87fac..f768de01120 100644 --- a/src/libutil-tests/nix_api_util.cc +++ b/src/libutil-tests/nix_api_util.cc @@ -1,9 +1,9 @@ -#include "config-global.hh" -#include "args.hh" +#include "nix/config-global.hh" +#include "nix/args.hh" #include "nix_api_util.h" #include "nix_api_util_internal.h" -#include "tests/nix_api_util.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_util.hh" +#include "nix/tests/string_callback.hh" #include diff --git a/src/libutil-tests/pool.cc b/src/libutil-tests/pool.cc index 127e42dda2b..8402768d345 100644 --- a/src/libutil-tests/pool.cc +++ b/src/libutil-tests/pool.cc @@ -1,4 +1,4 @@ -#include "pool.hh" +#include "nix/pool.hh" #include namespace nix { diff --git a/src/libutil-tests/position.cc b/src/libutil-tests/position.cc index 484ecc2479b..0726b89c08d 100644 --- a/src/libutil-tests/position.cc +++ b/src/libutil-tests/position.cc @@ -1,6 +1,6 @@ #include -#include "position.hh" +#include "nix/position.hh" namespace nix { diff --git a/src/libutil-tests/processes.cc b/src/libutil-tests/processes.cc index 9033595e85c..5d1435e3a4a 100644 --- a/src/libutil-tests/processes.cc +++ b/src/libutil-tests/processes.cc @@ -1,4 +1,4 @@ -#include "processes.hh" +#include "nix/processes.hh" #include diff --git a/src/libutil-tests/references.cc b/src/libutil-tests/references.cc index c3efa6d5101..362629b553e 100644 --- a/src/libutil-tests/references.cc +++ b/src/libutil-tests/references.cc @@ -1,4 +1,4 @@ -#include "references.hh" +#include "nix/references.hh" #include namespace nix { diff --git a/src/libutil-tests/spawn.cc b/src/libutil-tests/spawn.cc index c617acae08e..502d4e90b32 100644 --- a/src/libutil-tests/spawn.cc +++ b/src/libutil-tests/spawn.cc @@ -1,6 +1,6 @@ #include -#include "processes.hh" +#include "nix/processes.hh" namespace nix { diff --git a/src/libutil-tests/strings.cc b/src/libutil-tests/strings.cc index 33a1fae9b23..26b99263b7f 100644 --- a/src/libutil-tests/strings.cc +++ b/src/libutil-tests/strings.cc @@ -1,8 +1,8 @@ #include #include -#include "strings.hh" -#include "error.hh" +#include "nix/strings.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil-tests/suggestions.cc b/src/libutil-tests/suggestions.cc index 279994abc67..36d0b7169b8 100644 --- a/src/libutil-tests/suggestions.cc +++ b/src/libutil-tests/suggestions.cc @@ -1,4 +1,4 @@ -#include "suggestions.hh" +#include "nix/suggestions.hh" #include namespace nix { diff --git a/src/libutil-tests/terminal.cc b/src/libutil-tests/terminal.cc index f4fc6e770d2..3d3296cc3b9 100644 --- a/src/libutil-tests/terminal.cc +++ b/src/libutil-tests/terminal.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "types.hh" -#include "terminal.hh" -#include "strings.hh" +#include "nix/util.hh" +#include "nix/types.hh" +#include "nix/terminal.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libutil-tests/url.cc b/src/libutil-tests/url.cc index 7e1d2aa15ee..89a461c2cba 100644 --- a/src/libutil-tests/url.cc +++ b/src/libutil-tests/url.cc @@ -1,4 +1,4 @@ -#include "url.hh" +#include "nix/url.hh" #include namespace nix { diff --git a/src/libutil-tests/util.cc b/src/libutil-tests/util.cc index a3f7c720a5c..53b7cd208f4 100644 --- a/src/libutil-tests/util.cc +++ b/src/libutil-tests/util.cc @@ -1,8 +1,8 @@ -#include "util.hh" -#include "types.hh" -#include "file-system.hh" -#include "terminal.hh" -#include "strings.hh" +#include "nix/util.hh" +#include "nix/types.hh" +#include "nix/file-system.hh" +#include "nix/terminal.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libutil-tests/xml-writer.cc b/src/libutil-tests/xml-writer.cc index adcde25c9f1..7fc1f3154a3 100644 --- a/src/libutil-tests/xml-writer.cc +++ b/src/libutil-tests/xml-writer.cc @@ -1,4 +1,4 @@ -#include "xml-writer.hh" +#include "nix/xml-writer.hh" #include #include diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index 20d8a1e09be..2c7c91dd05d 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -5,12 +5,12 @@ #include // for strcasecmp -#include "archive.hh" -#include "config-global.hh" -#include "posix-source-accessor.hh" -#include "source-path.hh" -#include "file-system.hh" -#include "signals.hh" +#include "nix/archive.hh" +#include "nix/config-global.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/source-path.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libutil/args.cc b/src/libutil/args.cc index 05ecf724ef6..184318cc49f 100644 --- a/src/libutil/args.cc +++ b/src/libutil/args.cc @@ -1,10 +1,10 @@ -#include "args.hh" -#include "args/root.hh" -#include "hash.hh" -#include "environment-variables.hh" -#include "signals.hh" -#include "users.hh" -#include "json-utils.hh" +#include "nix/args.hh" +#include "nix/args/root.hh" +#include "nix/hash.hh" +#include "nix/environment-variables.hh" +#include "nix/signals.hh" +#include "nix/users.hh" +#include "nix/json-utils.hh" #include #include diff --git a/src/libutil/canon-path.cc b/src/libutil/canon-path.cc index 03db6378a82..c6f48ac32ee 100644 --- a/src/libutil/canon-path.cc +++ b/src/libutil/canon-path.cc @@ -1,7 +1,7 @@ -#include "canon-path.hh" -#include "util.hh" -#include "file-path-impl.hh" -#include "strings-inline.hh" +#include "nix/canon-path.hh" +#include "nix/util.hh" +#include "nix/file-path-impl.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc index d2702856591..788ad7109b2 100644 --- a/src/libutil/compression.cc +++ b/src/libutil/compression.cc @@ -1,8 +1,8 @@ -#include "compression.hh" -#include "signals.hh" -#include "tarfile.hh" -#include "finally.hh" -#include "logging.hh" +#include "nix/compression.hh" +#include "nix/signals.hh" +#include "nix/tarfile.hh" +#include "nix/finally.hh" +#include "nix/logging.hh" #include #include diff --git a/src/libutil/compute-levels.cc b/src/libutil/compute-levels.cc index f06025253ab..9c19faec2f8 100644 --- a/src/libutil/compute-levels.cc +++ b/src/libutil/compute-levels.cc @@ -1,4 +1,4 @@ -#include "types.hh" +#include "nix/types.hh" #if HAVE_LIBCPUID #include diff --git a/src/libutil/config-global.cc b/src/libutil/config-global.cc index 3ed1dd1d31c..b325d09e7ba 100644 --- a/src/libutil/config-global.cc +++ b/src/libutil/config-global.cc @@ -1,4 +1,4 @@ -#include "config-global.hh" +#include "nix/config-global.hh" #include diff --git a/src/libutil/config.cc b/src/libutil/config.cc index ca8480304d2..b108dd58a44 100644 --- a/src/libutil/config.cc +++ b/src/libutil/config.cc @@ -1,16 +1,16 @@ -#include "config.hh" -#include "args.hh" -#include "abstract-setting-to-json.hh" -#include "environment-variables.hh" -#include "experimental-features.hh" -#include "util.hh" -#include "file-system.hh" +#include "nix/config.hh" +#include "nix/args.hh" +#include "nix/abstract-setting-to-json.hh" +#include "nix/environment-variables.hh" +#include "nix/experimental-features.hh" +#include "nix/util.hh" +#include "nix/file-system.hh" -#include "config-impl.hh" +#include "nix/config-impl.hh" #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libutil/current-process.cc b/src/libutil/current-process.cc index 255ae2cf561..11655c55cd0 100644 --- a/src/libutil/current-process.cc +++ b/src/libutil/current-process.cc @@ -1,12 +1,12 @@ #include #include -#include "current-process.hh" -#include "util.hh" -#include "finally.hh" -#include "file-system.hh" -#include "processes.hh" -#include "signals.hh" +#include "nix/current-process.hh" +#include "nix/util.hh" +#include "nix/finally.hh" +#include "nix/file-system.hh" +#include "nix/processes.hh" +#include "nix/signals.hh" #include #ifdef __APPLE__ @@ -15,8 +15,8 @@ #if __linux__ # include -# include "cgroup.hh" -# include "namespaces.hh" +# include "nix/cgroup.hh" +# include "nix/namespaces.hh" #endif namespace nix { diff --git a/src/libutil/english.cc b/src/libutil/english.cc index 8c93c915662..9ccc7ed3b58 100644 --- a/src/libutil/english.cc +++ b/src/libutil/english.cc @@ -1,4 +1,4 @@ -#include "english.hh" +#include "nix/english.hh" namespace nix { diff --git a/src/libutil/environment-variables.cc b/src/libutil/environment-variables.cc index 5947cf742ac..f2948807a69 100644 --- a/src/libutil/environment-variables.cc +++ b/src/libutil/environment-variables.cc @@ -1,5 +1,5 @@ -#include "util.hh" -#include "environment-variables.hh" +#include "nix/util.hh" +#include "nix/environment-variables.hh" extern char ** environ __attribute__((weak)); diff --git a/src/libutil/error.cc b/src/libutil/error.cc index ccd008c7c33..bd0baaeff21 100644 --- a/src/libutil/error.cc +++ b/src/libutil/error.cc @@ -1,14 +1,14 @@ #include -#include "error.hh" -#include "environment-variables.hh" -#include "signals.hh" -#include "terminal.hh" -#include "position.hh" +#include "nix/error.hh" +#include "nix/environment-variables.hh" +#include "nix/signals.hh" +#include "nix/terminal.hh" +#include "nix/position.hh" #include #include -#include "serialise.hh" +#include "nix/serialise.hh" #include namespace nix { diff --git a/src/libutil/executable-path.cc b/src/libutil/executable-path.cc index 8d665c7df95..24e3484f2fd 100644 --- a/src/libutil/executable-path.cc +++ b/src/libutil/executable-path.cc @@ -1,8 +1,8 @@ -#include "environment-variables.hh" -#include "executable-path.hh" -#include "strings-inline.hh" -#include "util.hh" -#include "file-path-impl.hh" +#include "nix/environment-variables.hh" +#include "nix/executable-path.hh" +#include "nix/strings-inline.hh" +#include "nix/util.hh" +#include "nix/file-path-impl.hh" namespace nix { diff --git a/src/libutil/exit.cc b/src/libutil/exit.cc index 73cd8b04ee8..e177cfa31a7 100644 --- a/src/libutil/exit.cc +++ b/src/libutil/exit.cc @@ -1,4 +1,4 @@ -#include "exit.hh" +#include "nix/exit.hh" namespace nix { diff --git a/src/libutil/experimental-features.cc b/src/libutil/experimental-features.cc index 158e202d15c..c05c3e9ec35 100644 --- a/src/libutil/experimental-features.cc +++ b/src/libutil/experimental-features.cc @@ -1,8 +1,8 @@ -#include "experimental-features.hh" -#include "fmt.hh" -#include "util.hh" +#include "nix/experimental-features.hh" +#include "nix/fmt.hh" +#include "nix/util.hh" -#include "nlohmann/json.hpp" +#include namespace nix { diff --git a/src/libutil/file-content-address.cc b/src/libutil/file-content-address.cc index 69301d9c8f4..71eb34611ab 100644 --- a/src/libutil/file-content-address.cc +++ b/src/libutil/file-content-address.cc @@ -1,7 +1,7 @@ -#include "file-content-address.hh" -#include "archive.hh" -#include "git.hh" -#include "source-path.hh" +#include "nix/file-content-address.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libutil/file-descriptor.cc b/src/libutil/file-descriptor.cc index 707c0f8823b..2af1364b165 100644 --- a/src/libutil/file-descriptor.cc +++ b/src/libutil/file-descriptor.cc @@ -1,12 +1,12 @@ -#include "serialise.hh" -#include "util.hh" +#include "nix/serialise.hh" +#include "nix/util.hh" #include #include #ifdef _WIN32 # include # include -# include "windows-error.hh" +# include "nix/windows-error.hh" #endif namespace nix { diff --git a/src/libutil/file-system.cc b/src/libutil/file-system.cc index b1a370d7a04..5ae326ec644 100644 --- a/src/libutil/file-system.cc +++ b/src/libutil/file-system.cc @@ -1,11 +1,11 @@ -#include "environment-variables.hh" -#include "file-system.hh" -#include "file-path.hh" -#include "file-path-impl.hh" -#include "signals.hh" -#include "finally.hh" -#include "serialise.hh" -#include "util.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" +#include "nix/file-path.hh" +#include "nix/file-path-impl.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/util.hh" #include #include @@ -25,7 +25,7 @@ # include #endif -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libutil/fs-sink.cc b/src/libutil/fs-sink.cc index fadba5972da..5e7c2e9fd73 100644 --- a/src/libutil/fs-sink.cc +++ b/src/libutil/fs-sink.cc @@ -1,13 +1,13 @@ #include -#include "error.hh" -#include "config-global.hh" -#include "fs-sink.hh" +#include "nix/error.hh" +#include "nix/config-global.hh" +#include "nix/fs-sink.hh" #if _WIN32 # include -# include "file-path.hh" -# include "windows-error.hh" +# include "nix/file-path.hh" +# include "nix/windows-error.hh" #endif namespace nix { diff --git a/src/libutil/git.cc b/src/libutil/git.cc index 3303dbc3241..696f86d0b68 100644 --- a/src/libutil/git.cc +++ b/src/libutil/git.cc @@ -5,12 +5,12 @@ #include #include // for strcasecmp -#include "signals.hh" -#include "config.hh" -#include "hash.hh" +#include "nix/signals.hh" +#include "nix/config.hh" +#include "nix/hash.hh" -#include "git.hh" -#include "serialise.hh" +#include "nix/git.hh" +#include "nix/serialise.hh" namespace nix::git { diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index 6a7a8b0920a..22eca6014e4 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -6,11 +6,11 @@ #include #include -#include "args.hh" -#include "hash.hh" -#include "archive.hh" -#include "config.hh" -#include "split.hh" +#include "nix/args.hh" +#include "nix/hash.hh" +#include "nix/archive.hh" +#include "nix/config.hh" +#include "nix/split.hh" #include #include diff --git a/src/libutil/hilite.cc b/src/libutil/hilite.cc index e5088230d7c..6d843e091bc 100644 --- a/src/libutil/hilite.cc +++ b/src/libutil/hilite.cc @@ -1,4 +1,4 @@ -#include "hilite.hh" +#include "nix/hilite.hh" namespace nix { diff --git a/src/libutil/abstract-setting-to-json.hh b/src/libutil/include/nix/abstract-setting-to-json.hh similarity index 87% rename from src/libutil/abstract-setting-to-json.hh rename to src/libutil/include/nix/abstract-setting-to-json.hh index eea687d8a4a..313b18fafb2 100644 --- a/src/libutil/abstract-setting-to-json.hh +++ b/src/libutil/include/nix/abstract-setting-to-json.hh @@ -2,8 +2,8 @@ ///@file #include -#include "config.hh" -#include "json-utils.hh" +#include "nix/config.hh" +#include "nix/json-utils.hh" namespace nix { template diff --git a/src/libutil/ansicolor.hh b/src/libutil/include/nix/ansicolor.hh similarity index 100% rename from src/libutil/ansicolor.hh rename to src/libutil/include/nix/ansicolor.hh diff --git a/src/libutil/archive.hh b/src/libutil/include/nix/archive.hh similarity index 96% rename from src/libutil/archive.hh rename to src/libutil/include/nix/archive.hh index c38fa8a46bd..9131f49fa2b 100644 --- a/src/libutil/archive.hh +++ b/src/libutil/include/nix/archive.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "types.hh" -#include "serialise.hh" -#include "fs-sink.hh" +#include "nix/types.hh" +#include "nix/serialise.hh" +#include "nix/fs-sink.hh" namespace nix { diff --git a/src/libutil/args.hh b/src/libutil/include/nix/args.hh similarity index 99% rename from src/libutil/args.hh rename to src/libutil/include/nix/args.hh index c30d6cef8d7..987d14f9e21 100644 --- a/src/libutil/args.hh +++ b/src/libutil/include/nix/args.hh @@ -9,9 +9,9 @@ #include -#include "types.hh" -#include "experimental-features.hh" -#include "ref.hh" +#include "nix/types.hh" +#include "nix/experimental-features.hh" +#include "nix/ref.hh" namespace nix { diff --git a/src/libutil/args/root.hh b/src/libutil/include/nix/args/root.hh similarity index 98% rename from src/libutil/args/root.hh rename to src/libutil/include/nix/args/root.hh index 34a43b53835..bb83b85a50c 100644 --- a/src/libutil/args/root.hh +++ b/src/libutil/include/nix/args/root.hh @@ -1,6 +1,6 @@ #pragma once -#include "args.hh" +#include "nix/args.hh" namespace nix { diff --git a/src/libutil/callback.hh b/src/libutil/include/nix/callback.hh similarity index 100% rename from src/libutil/callback.hh rename to src/libutil/include/nix/callback.hh diff --git a/src/libutil/canon-path.hh b/src/libutil/include/nix/canon-path.hh similarity index 100% rename from src/libutil/canon-path.hh rename to src/libutil/include/nix/canon-path.hh diff --git a/src/libutil/checked-arithmetic.hh b/src/libutil/include/nix/checked-arithmetic.hh similarity index 100% rename from src/libutil/checked-arithmetic.hh rename to src/libutil/include/nix/checked-arithmetic.hh diff --git a/src/libutil/chunked-vector.hh b/src/libutil/include/nix/chunked-vector.hh similarity index 98% rename from src/libutil/chunked-vector.hh rename to src/libutil/include/nix/chunked-vector.hh index 4709679a62a..34d5bbb1da5 100644 --- a/src/libutil/chunked-vector.hh +++ b/src/libutil/include/nix/chunked-vector.hh @@ -6,7 +6,7 @@ #include #include -#include "error.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil/closure.hh b/src/libutil/include/nix/closure.hh similarity index 98% rename from src/libutil/closure.hh rename to src/libutil/include/nix/closure.hh index 16e3b93e488..c8fc7c9a4d7 100644 --- a/src/libutil/closure.hh +++ b/src/libutil/include/nix/closure.hh @@ -3,7 +3,7 @@ #include #include -#include "sync.hh" +#include "nix/sync.hh" using std::set; diff --git a/src/libutil/comparator.hh b/src/libutil/include/nix/comparator.hh similarity index 100% rename from src/libutil/comparator.hh rename to src/libutil/include/nix/comparator.hh diff --git a/src/libutil/compression.hh b/src/libutil/include/nix/compression.hh similarity index 90% rename from src/libutil/compression.hh rename to src/libutil/include/nix/compression.hh index e0c531b1f38..25f479e48fb 100644 --- a/src/libutil/compression.hh +++ b/src/libutil/include/nix/compression.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "ref.hh" -#include "types.hh" -#include "serialise.hh" +#include "nix/ref.hh" +#include "nix/types.hh" +#include "nix/serialise.hh" #include diff --git a/src/libutil/compute-levels.hh b/src/libutil/include/nix/compute-levels.hh similarity index 74% rename from src/libutil/compute-levels.hh rename to src/libutil/include/nix/compute-levels.hh index 093e7a915a4..d77eece931f 100644 --- a/src/libutil/compute-levels.hh +++ b/src/libutil/include/nix/compute-levels.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/config-global.hh b/src/libutil/include/nix/config-global.hh similarity index 96% rename from src/libutil/config-global.hh rename to src/libutil/include/nix/config-global.hh index 2caf515240d..b0e8ad2ce6a 100644 --- a/src/libutil/config-global.hh +++ b/src/libutil/include/nix/config-global.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "config.hh" +#include "nix/config.hh" namespace nix { diff --git a/src/libutil/config-impl.hh b/src/libutil/include/nix/config-impl.hh similarity index 98% rename from src/libutil/config-impl.hh rename to src/libutil/include/nix/config-impl.hh index 94c2cb2e4b8..b02e27f50f9 100644 --- a/src/libutil/config-impl.hh +++ b/src/libutil/include/nix/config-impl.hh @@ -12,8 +12,8 @@ * instantiation. */ -#include "config.hh" -#include "args.hh" +#include "nix/config.hh" +#include "nix/args.hh" namespace nix { diff --git a/src/libutil/config.hh b/src/libutil/include/nix/config.hh similarity index 99% rename from src/libutil/config.hh rename to src/libutil/include/nix/config.hh index 502d2823e94..f4135af64cc 100644 --- a/src/libutil/config.hh +++ b/src/libutil/include/nix/config.hh @@ -7,8 +7,8 @@ #include -#include "types.hh" -#include "experimental-features.hh" +#include "nix/types.hh" +#include "nix/experimental-features.hh" namespace nix { diff --git a/src/libutil/current-process.hh b/src/libutil/include/nix/current-process.hh similarity index 97% rename from src/libutil/current-process.hh rename to src/libutil/include/nix/current-process.hh index 660dcfe0ba3..d98f4e75201 100644 --- a/src/libutil/current-process.hh +++ b/src/libutil/include/nix/current-process.hh @@ -7,7 +7,7 @@ # include #endif -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/english.hh b/src/libutil/include/nix/english.hh similarity index 100% rename from src/libutil/english.hh rename to src/libutil/include/nix/english.hh diff --git a/src/libutil/environment-variables.hh b/src/libutil/include/nix/environment-variables.hh similarity index 96% rename from src/libutil/environment-variables.hh rename to src/libutil/include/nix/environment-variables.hh index 1a95f5c97e7..9a5f364a3f0 100644 --- a/src/libutil/environment-variables.hh +++ b/src/libutil/include/nix/environment-variables.hh @@ -8,8 +8,8 @@ #include -#include "types.hh" -#include "file-path.hh" +#include "nix/types.hh" +#include "nix/file-path.hh" namespace nix { diff --git a/src/libutil/error.hh b/src/libutil/include/nix/error.hh similarity index 99% rename from src/libutil/error.hh rename to src/libutil/include/nix/error.hh index 04fa18e35dd..6ac4497cbd5 100644 --- a/src/libutil/error.hh +++ b/src/libutil/include/nix/error.hh @@ -15,8 +15,8 @@ * See libutil/tests/logging.cc for usage examples. */ -#include "suggestions.hh" -#include "fmt.hh" +#include "nix/suggestions.hh" +#include "nix/fmt.hh" #include #include diff --git a/src/libutil/exec.hh b/src/libutil/include/nix/exec.hh similarity index 91% rename from src/libutil/exec.hh rename to src/libutil/include/nix/exec.hh index cbbe80c4e9b..dc14691e27c 100644 --- a/src/libutil/exec.hh +++ b/src/libutil/include/nix/exec.hh @@ -1,6 +1,6 @@ #pragma once -#include "os-string.hh" +#include "nix/os-string.hh" namespace nix { diff --git a/src/libutil/executable-path.hh b/src/libutil/include/nix/executable-path.hh similarity index 98% rename from src/libutil/executable-path.hh rename to src/libutil/include/nix/executable-path.hh index c5cfa1c3918..3af4a24cf17 100644 --- a/src/libutil/executable-path.hh +++ b/src/libutil/include/nix/executable-path.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "file-system.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/exit.hh b/src/libutil/include/nix/exit.hh similarity index 100% rename from src/libutil/exit.hh rename to src/libutil/include/nix/exit.hh diff --git a/src/libutil/experimental-features.hh b/src/libutil/include/nix/experimental-features.hh similarity index 98% rename from src/libutil/experimental-features.hh rename to src/libutil/include/nix/experimental-features.hh index 1d02ba94d2c..946bb65b32f 100644 --- a/src/libutil/experimental-features.hh +++ b/src/libutil/include/nix/experimental-features.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "error.hh" -#include "types.hh" +#include "nix/error.hh" +#include "nix/types.hh" #include diff --git a/src/libutil/file-content-address.hh b/src/libutil/include/nix/file-content-address.hh similarity index 99% rename from src/libutil/file-content-address.hh rename to src/libutil/include/nix/file-content-address.hh index 226068387d6..c56debd2b10 100644 --- a/src/libutil/file-content-address.hh +++ b/src/libutil/include/nix/file-content-address.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "source-accessor.hh" +#include "nix/source-accessor.hh" namespace nix { diff --git a/src/libutil/file-descriptor.hh b/src/libutil/include/nix/file-descriptor.hh similarity index 98% rename from src/libutil/file-descriptor.hh rename to src/libutil/include/nix/file-descriptor.hh index fde36299975..785756a0f74 100644 --- a/src/libutil/file-descriptor.hh +++ b/src/libutil/include/nix/file-descriptor.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "error.hh" +#include "nix/types.hh" +#include "nix/error.hh" #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN diff --git a/src/libutil/file-path-impl.hh b/src/libutil/include/nix/file-path-impl.hh similarity index 100% rename from src/libutil/file-path-impl.hh rename to src/libutil/include/nix/file-path-impl.hh diff --git a/src/libutil/file-path.hh b/src/libutil/include/nix/file-path.hh similarity index 94% rename from src/libutil/file-path.hh rename to src/libutil/include/nix/file-path.hh index 8e4a88b9d56..15bceac1311 100644 --- a/src/libutil/file-path.hh +++ b/src/libutil/include/nix/file-path.hh @@ -3,8 +3,8 @@ #include -#include "types.hh" -#include "os-string.hh" +#include "nix/types.hh" +#include "nix/os-string.hh" namespace nix { diff --git a/src/libutil/file-system.hh b/src/libutil/include/nix/file-system.hh similarity index 98% rename from src/libutil/file-system.hh rename to src/libutil/include/nix/file-system.hh index 31dcc5e6bc8..b29ab17cb22 100644 --- a/src/libutil/file-system.hh +++ b/src/libutil/include/nix/file-system.hh @@ -5,11 +5,11 @@ * Utilities for working with the file system and file paths. */ -#include "types.hh" -#include "error.hh" -#include "logging.hh" -#include "file-descriptor.hh" -#include "file-path.hh" +#include "nix/types.hh" +#include "nix/error.hh" +#include "nix/logging.hh" +#include "nix/file-descriptor.hh" +#include "nix/file-path.hh" #include #include diff --git a/src/libutil/finally.hh b/src/libutil/include/nix/finally.hh similarity index 100% rename from src/libutil/finally.hh rename to src/libutil/include/nix/finally.hh diff --git a/src/libutil/fmt.hh b/src/libutil/include/nix/fmt.hh similarity index 99% rename from src/libutil/fmt.hh rename to src/libutil/include/nix/fmt.hh index 850b7162d87..45d9f43b7df 100644 --- a/src/libutil/fmt.hh +++ b/src/libutil/include/nix/fmt.hh @@ -3,7 +3,7 @@ #include #include -#include "ansicolor.hh" +#include "nix/ansicolor.hh" namespace nix { diff --git a/src/libutil/fs-sink.hh b/src/libutil/include/nix/fs-sink.hh similarity index 97% rename from src/libutil/fs-sink.hh rename to src/libutil/include/nix/fs-sink.hh index 5c5073731f6..30803e63ed2 100644 --- a/src/libutil/fs-sink.hh +++ b/src/libutil/include/nix/fs-sink.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "serialise.hh" -#include "source-accessor.hh" -#include "file-system.hh" +#include "nix/serialise.hh" +#include "nix/source-accessor.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/git.hh b/src/libutil/include/nix/git.hh similarity index 97% rename from src/libutil/git.hh rename to src/libutil/include/nix/git.hh index 1a6a7c3331b..2dc1bb79686 100644 --- a/src/libutil/git.hh +++ b/src/libutil/include/nix/git.hh @@ -5,11 +5,11 @@ #include #include -#include "types.hh" -#include "serialise.hh" -#include "hash.hh" -#include "source-path.hh" -#include "fs-sink.hh" +#include "nix/types.hh" +#include "nix/serialise.hh" +#include "nix/hash.hh" +#include "nix/source-path.hh" +#include "nix/fs-sink.hh" namespace nix::git { diff --git a/src/libutil/hash.hh b/src/libutil/include/nix/hash.hh similarity index 98% rename from src/libutil/hash.hh rename to src/libutil/include/nix/hash.hh index 13d526f42cf..3c9adebac1e 100644 --- a/src/libutil/hash.hh +++ b/src/libutil/include/nix/hash.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "config.hh" -#include "types.hh" -#include "serialise.hh" -#include "file-system.hh" +#include "nix/config.hh" +#include "nix/types.hh" +#include "nix/serialise.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/hilite.hh b/src/libutil/include/nix/hilite.hh similarity index 100% rename from src/libutil/hilite.hh rename to src/libutil/include/nix/hilite.hh diff --git a/src/libutil/json-impls.hh b/src/libutil/include/nix/json-impls.hh similarity index 95% rename from src/libutil/json-impls.hh rename to src/libutil/include/nix/json-impls.hh index b26163a04ae..9dd344c508d 100644 --- a/src/libutil/json-impls.hh +++ b/src/libutil/include/nix/json-impls.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "nlohmann/json_fwd.hpp" +#include // Following https://github.com/nlohmann/json#how-can-i-use-get-for-non-default-constructiblenon-copyable-types #define JSON_IMPL(TYPE) \ diff --git a/src/libutil/json-utils.hh b/src/libutil/include/nix/json-utils.hh similarity index 99% rename from src/libutil/json-utils.hh rename to src/libutil/include/nix/json-utils.hh index 1afc5d796f4..96ffcd3c018 100644 --- a/src/libutil/json-utils.hh +++ b/src/libutil/include/nix/json-utils.hh @@ -4,7 +4,7 @@ #include #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/logging.hh b/src/libutil/include/nix/logging.hh similarity index 98% rename from src/libutil/logging.hh rename to src/libutil/include/nix/logging.hh index e5a7a833f36..c83ad2316c7 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/include/nix/logging.hh @@ -1,10 +1,10 @@ #pragma once ///@file -#include "error.hh" -#include "config.hh" -#include "file-descriptor.hh" -#include "finally.hh" +#include "nix/error.hh" +#include "nix/config.hh" +#include "nix/file-descriptor.hh" +#include "nix/finally.hh" #include diff --git a/src/libutil/lru-cache.hh b/src/libutil/include/nix/lru-cache.hh similarity index 100% rename from src/libutil/lru-cache.hh rename to src/libutil/include/nix/lru-cache.hh diff --git a/src/libutil/memory-source-accessor.hh b/src/libutil/include/nix/memory-source-accessor.hh similarity index 97% rename from src/libutil/memory-source-accessor.hh rename to src/libutil/include/nix/memory-source-accessor.hh index 012a388c0e7..08ab3f2d496 100644 --- a/src/libutil/memory-source-accessor.hh +++ b/src/libutil/include/nix/memory-source-accessor.hh @@ -1,6 +1,6 @@ -#include "source-path.hh" -#include "fs-sink.hh" -#include "variant-wrapper.hh" +#include "nix/source-path.hh" +#include "nix/fs-sink.hh" +#include "nix/variant-wrapper.hh" namespace nix { diff --git a/src/libutil/include/nix/meson.build b/src/libutil/include/nix/meson.build new file mode 100644 index 00000000000..798d4982808 --- /dev/null +++ b/src/libutil/include/nix/meson.build @@ -0,0 +1,87 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +config_h = configure_file( + configuration : configdata, + output : 'config-util.hh', +) + +headers = [config_h] + files( + 'abstract-setting-to-json.hh', + 'ansicolor.hh', + 'archive.hh', + 'args.hh', + 'args/root.hh', + 'callback.hh', + 'canon-path.hh', + 'checked-arithmetic.hh', + 'chunked-vector.hh', + 'closure.hh', + 'comparator.hh', + 'compression.hh', + 'compute-levels.hh', + 'config-global.hh', + 'config-impl.hh', + 'config.hh', + 'current-process.hh', + 'english.hh', + 'environment-variables.hh', + 'error.hh', + 'exec.hh', + 'executable-path.hh', + 'exit.hh', + 'experimental-features.hh', + 'file-content-address.hh', + 'file-descriptor.hh', + 'file-path-impl.hh', + 'file-path.hh', + 'file-system.hh', + 'finally.hh', + 'fmt.hh', + 'fs-sink.hh', + 'git.hh', + 'hash.hh', + 'hilite.hh', + 'json-impls.hh', + 'json-utils.hh', + 'logging.hh', + 'lru-cache.hh', + 'memory-source-accessor.hh', + 'muxable-pipe.hh', + 'os-string.hh', + 'pool.hh', + 'pos-idx.hh', + 'pos-table.hh', + 'position.hh', + 'posix-source-accessor.hh', + 'processes.hh', + 'ref.hh', + 'references.hh', + 'regex-combinators.hh', + 'repair-flag.hh', + 'serialise.hh', + 'signals.hh', + 'signature/local-keys.hh', + 'signature/signer.hh', + 'source-accessor.hh', + 'source-path.hh', + 'split.hh', + 'std-hash.hh', + 'strings.hh', + 'strings-inline.hh', + 'suggestions.hh', + 'sync.hh', + 'tarfile.hh', + 'terminal.hh', + 'thread-pool.hh', + 'topo-sort.hh', + 'types.hh', + 'unix-domain-socket.hh', + 'url-parts.hh', + 'url.hh', + 'users.hh', + 'util.hh', + 'variant-wrapper.hh', + 'xml-writer.hh', +) diff --git a/src/libutil/muxable-pipe.hh b/src/libutil/include/nix/muxable-pipe.hh similarity index 94% rename from src/libutil/muxable-pipe.hh rename to src/libutil/include/nix/muxable-pipe.hh index 53ac39170f1..e4d6a74a370 100644 --- a/src/libutil/muxable-pipe.hh +++ b/src/libutil/include/nix/muxable-pipe.hh @@ -1,16 +1,16 @@ #pragma once ///@file -#include "file-descriptor.hh" +#include "nix/file-descriptor.hh" #ifdef _WIN32 -# include "windows-async-pipe.hh" +# include "nix/windows-async-pipe.hh" #endif #ifndef _WIN32 # include #else # include -# include "windows-error.hh" +# include "nix/windows-error.hh" #endif namespace nix { diff --git a/src/libutil/os-string.hh b/src/libutil/include/nix/os-string.hh similarity index 100% rename from src/libutil/os-string.hh rename to src/libutil/include/nix/os-string.hh diff --git a/src/libutil/pool.hh b/src/libutil/include/nix/pool.hh similarity index 99% rename from src/libutil/pool.hh rename to src/libutil/include/nix/pool.hh index b2ceb714342..65b789ba052 100644 --- a/src/libutil/pool.hh +++ b/src/libutil/include/nix/pool.hh @@ -7,8 +7,8 @@ #include #include -#include "sync.hh" -#include "ref.hh" +#include "nix/sync.hh" +#include "nix/ref.hh" namespace nix { diff --git a/src/libutil/pos-idx.hh b/src/libutil/include/nix/pos-idx.hh similarity index 100% rename from src/libutil/pos-idx.hh rename to src/libutil/include/nix/pos-idx.hh diff --git a/src/libutil/pos-table.hh b/src/libutil/include/nix/pos-table.hh similarity index 97% rename from src/libutil/pos-table.hh rename to src/libutil/include/nix/pos-table.hh index a6fe09d7932..9f4ff2e0b55 100644 --- a/src/libutil/pos-table.hh +++ b/src/libutil/include/nix/pos-table.hh @@ -4,9 +4,9 @@ #include #include -#include "pos-idx.hh" -#include "position.hh" -#include "sync.hh" +#include "nix/pos-idx.hh" +#include "nix/position.hh" +#include "nix/sync.hh" namespace nix { diff --git a/src/libutil/position.hh b/src/libutil/include/nix/position.hh similarity index 99% rename from src/libutil/position.hh rename to src/libutil/include/nix/position.hh index 07e261c4c54..34457a8241c 100644 --- a/src/libutil/position.hh +++ b/src/libutil/include/nix/position.hh @@ -9,7 +9,7 @@ #include #include -#include "source-path.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libutil/posix-source-accessor.hh b/src/libutil/include/nix/posix-source-accessor.hh similarity index 98% rename from src/libutil/posix-source-accessor.hh rename to src/libutil/include/nix/posix-source-accessor.hh index 5d491e633ce..d81e9246c4d 100644 --- a/src/libutil/posix-source-accessor.hh +++ b/src/libutil/include/nix/posix-source-accessor.hh @@ -1,6 +1,6 @@ #pragma once -#include "source-accessor.hh" +#include "nix/source-accessor.hh" namespace nix { diff --git a/src/libutil/processes.hh b/src/libutil/include/nix/processes.hh similarity index 95% rename from src/libutil/processes.hh rename to src/libutil/include/nix/processes.hh index bbbe7dcabd3..80ea14223a5 100644 --- a/src/libutil/processes.hh +++ b/src/libutil/include/nix/processes.hh @@ -1,11 +1,11 @@ #pragma once ///@file -#include "types.hh" -#include "error.hh" -#include "file-descriptor.hh" -#include "logging.hh" -#include "ansicolor.hh" +#include "nix/types.hh" +#include "nix/error.hh" +#include "nix/file-descriptor.hh" +#include "nix/logging.hh" +#include "nix/ansicolor.hh" #include #include diff --git a/src/libutil/ref.hh b/src/libutil/include/nix/ref.hh similarity index 100% rename from src/libutil/ref.hh rename to src/libutil/include/nix/ref.hh diff --git a/src/libutil/references.hh b/src/libutil/include/nix/references.hh similarity index 97% rename from src/libutil/references.hh rename to src/libutil/include/nix/references.hh index 8bc9f7ec9d6..b608f701574 100644 --- a/src/libutil/references.hh +++ b/src/libutil/include/nix/references.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "hash.hh" +#include "nix/hash.hh" namespace nix { diff --git a/src/libutil/regex-combinators.hh b/src/libutil/include/nix/regex-combinators.hh similarity index 100% rename from src/libutil/regex-combinators.hh rename to src/libutil/include/nix/regex-combinators.hh diff --git a/src/libutil/repair-flag.hh b/src/libutil/include/nix/repair-flag.hh similarity index 100% rename from src/libutil/repair-flag.hh rename to src/libutil/include/nix/repair-flag.hh diff --git a/src/libutil/serialise.hh b/src/libutil/include/nix/serialise.hh similarity index 99% rename from src/libutil/serialise.hh rename to src/libutil/include/nix/serialise.hh index 14721d0693e..ef49a43b65c 100644 --- a/src/libutil/serialise.hh +++ b/src/libutil/include/nix/serialise.hh @@ -4,9 +4,9 @@ #include #include -#include "types.hh" -#include "util.hh" -#include "file-descriptor.hh" +#include "nix/types.hh" +#include "nix/util.hh" +#include "nix/file-descriptor.hh" namespace boost::context { struct stack_context; } diff --git a/src/libutil/signals.hh b/src/libutil/include/nix/signals.hh similarity index 90% rename from src/libutil/signals.hh rename to src/libutil/include/nix/signals.hh index 8bff345c357..b4953525e8d 100644 --- a/src/libutil/signals.hh +++ b/src/libutil/include/nix/signals.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "types.hh" -#include "error.hh" -#include "logging.hh" +#include "nix/types.hh" +#include "nix/error.hh" +#include "nix/logging.hh" #include @@ -62,4 +62,4 @@ struct ReceiveInterrupts; } -#include "signals-impl.hh" +#include "nix/signals-impl.hh" diff --git a/src/libutil/signature/local-keys.hh b/src/libutil/include/nix/signature/local-keys.hh similarity index 99% rename from src/libutil/signature/local-keys.hh rename to src/libutil/include/nix/signature/local-keys.hh index 9977f0dac6e..368976b111e 100644 --- a/src/libutil/signature/local-keys.hh +++ b/src/libutil/include/nix/signature/local-keys.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" #include diff --git a/src/libutil/signature/signer.hh b/src/libutil/include/nix/signature/signer.hh similarity index 94% rename from src/libutil/signature/signer.hh rename to src/libutil/include/nix/signature/signer.hh index e50170fe29c..3eeb75608e1 100644 --- a/src/libutil/signature/signer.hh +++ b/src/libutil/include/nix/signature/signer.hh @@ -1,7 +1,7 @@ #pragma once -#include "types.hh" -#include "signature/local-keys.hh" +#include "nix/types.hh" +#include "nix/signature/local-keys.hh" #include #include diff --git a/src/libutil/source-accessor.hh b/src/libutil/include/nix/source-accessor.hh similarity index 98% rename from src/libutil/source-accessor.hh rename to src/libutil/include/nix/source-accessor.hh index 79ae092ac18..5efc177fca9 100644 --- a/src/libutil/source-accessor.hh +++ b/src/libutil/include/nix/source-accessor.hh @@ -2,9 +2,9 @@ #include -#include "canon-path.hh" -#include "hash.hh" -#include "ref.hh" +#include "nix/canon-path.hh" +#include "nix/hash.hh" +#include "nix/ref.hh" namespace nix { diff --git a/src/libutil/source-path.hh b/src/libutil/include/nix/source-path.hh similarity index 96% rename from src/libutil/source-path.hh rename to src/libutil/include/nix/source-path.hh index fc2288f747a..119a67016ee 100644 --- a/src/libutil/source-path.hh +++ b/src/libutil/include/nix/source-path.hh @@ -5,10 +5,10 @@ * @brief SourcePath */ -#include "ref.hh" -#include "canon-path.hh" -#include "source-accessor.hh" -#include "std-hash.hh" +#include "nix/ref.hh" +#include "nix/canon-path.hh" +#include "nix/source-accessor.hh" +#include "nix/std-hash.hh" namespace nix { diff --git a/src/libutil/split.hh b/src/libutil/include/nix/split.hh similarity index 97% rename from src/libutil/split.hh rename to src/libutil/include/nix/split.hh index 3b9b2b83b81..2d7c490b11a 100644 --- a/src/libutil/split.hh +++ b/src/libutil/include/nix/split.hh @@ -4,7 +4,7 @@ #include #include -#include "util.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/std-hash.hh b/src/libutil/include/nix/std-hash.hh similarity index 100% rename from src/libutil/std-hash.hh rename to src/libutil/include/nix/std-hash.hh diff --git a/src/libutil/strings-inline.hh b/src/libutil/include/nix/strings-inline.hh similarity index 99% rename from src/libutil/strings-inline.hh rename to src/libutil/include/nix/strings-inline.hh index 25b8e0ff67e..38cf285e08c 100644 --- a/src/libutil/strings-inline.hh +++ b/src/libutil/include/nix/strings-inline.hh @@ -1,6 +1,6 @@ #pragma once -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libutil/strings.hh b/src/libutil/include/nix/strings.hh similarity index 100% rename from src/libutil/strings.hh rename to src/libutil/include/nix/strings.hh diff --git a/src/libutil/suggestions.hh b/src/libutil/include/nix/suggestions.hh similarity index 98% rename from src/libutil/suggestions.hh rename to src/libutil/include/nix/suggestions.hh index e39ab400c0d..5517c20a610 100644 --- a/src/libutil/suggestions.hh +++ b/src/libutil/include/nix/suggestions.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" #include namespace nix { diff --git a/src/libutil/sync.hh b/src/libutil/include/nix/sync.hh similarity index 99% rename from src/libutil/sync.hh rename to src/libutil/include/nix/sync.hh index d340f3d9760..25c062ac848 100644 --- a/src/libutil/sync.hh +++ b/src/libutil/include/nix/sync.hh @@ -7,7 +7,7 @@ #include #include -#include "error.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil/tarfile.hh b/src/libutil/include/nix/tarfile.hh similarity index 96% rename from src/libutil/tarfile.hh rename to src/libutil/include/nix/tarfile.hh index 5e29c6bbac3..aea91f90eff 100644 --- a/src/libutil/tarfile.hh +++ b/src/libutil/include/nix/tarfile.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "serialise.hh" -#include "fs-sink.hh" +#include "nix/serialise.hh" +#include "nix/fs-sink.hh" #include namespace nix { diff --git a/src/libutil/terminal.hh b/src/libutil/include/nix/terminal.hh similarity index 100% rename from src/libutil/terminal.hh rename to src/libutil/include/nix/terminal.hh diff --git a/src/libutil/thread-pool.hh b/src/libutil/include/nix/thread-pool.hh similarity index 98% rename from src/libutil/thread-pool.hh rename to src/libutil/include/nix/thread-pool.hh index 4adc4865760..e3b2a29b96f 100644 --- a/src/libutil/thread-pool.hh +++ b/src/libutil/include/nix/thread-pool.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "error.hh" -#include "sync.hh" +#include "nix/error.hh" +#include "nix/sync.hh" #include #include diff --git a/src/libutil/topo-sort.hh b/src/libutil/include/nix/topo-sort.hh similarity index 97% rename from src/libutil/topo-sort.hh rename to src/libutil/include/nix/topo-sort.hh index a52811fbf41..ed37ca01e8b 100644 --- a/src/libutil/topo-sort.hh +++ b/src/libutil/include/nix/topo-sort.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "error.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil/types.hh b/src/libutil/include/nix/types.hh similarity index 100% rename from src/libutil/types.hh rename to src/libutil/include/nix/types.hh diff --git a/src/libutil/unix-domain-socket.hh b/src/libutil/include/nix/unix-domain-socket.hh similarity index 95% rename from src/libutil/unix-domain-socket.hh rename to src/libutil/include/nix/unix-domain-socket.hh index ba2baeb1334..87508f9e4a6 100644 --- a/src/libutil/unix-domain-socket.hh +++ b/src/libutil/include/nix/unix-domain-socket.hh @@ -1,8 +1,8 @@ #pragma once ///@file -#include "types.hh" -#include "file-descriptor.hh" +#include "nix/types.hh" +#include "nix/file-descriptor.hh" #ifdef _WIN32 # include diff --git a/src/libutil/url-parts.hh b/src/libutil/include/nix/url-parts.hh similarity index 100% rename from src/libutil/url-parts.hh rename to src/libutil/include/nix/url-parts.hh diff --git a/src/libutil/url.hh b/src/libutil/include/nix/url.hh similarity index 98% rename from src/libutil/url.hh rename to src/libutil/include/nix/url.hh index 2b12f5af2a0..071d5092fef 100644 --- a/src/libutil/url.hh +++ b/src/libutil/include/nix/url.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "error.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil/users.hh b/src/libutil/include/nix/users.hh similarity index 98% rename from src/libutil/users.hh rename to src/libutil/include/nix/users.hh index d22c3311d99..d48b8b9bf76 100644 --- a/src/libutil/users.hh +++ b/src/libutil/include/nix/users.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" #ifndef _WIN32 # include diff --git a/src/libutil/util.hh b/src/libutil/include/nix/util.hh similarity index 98% rename from src/libutil/util.hh rename to src/libutil/include/nix/util.hh index 0d55cf93bed..7ece2bd7b76 100644 --- a/src/libutil/util.hh +++ b/src/libutil/include/nix/util.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "types.hh" -#include "error.hh" -#include "logging.hh" +#include "nix/types.hh" +#include "nix/error.hh" +#include "nix/logging.hh" #include @@ -11,7 +11,7 @@ #include #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libutil/variant-wrapper.hh b/src/libutil/include/nix/variant-wrapper.hh similarity index 100% rename from src/libutil/variant-wrapper.hh rename to src/libutil/include/nix/variant-wrapper.hh diff --git a/src/libutil/xml-writer.hh b/src/libutil/include/nix/xml-writer.hh similarity index 100% rename from src/libutil/xml-writer.hh rename to src/libutil/include/nix/xml-writer.hh diff --git a/src/libutil/json-utils.cc b/src/libutil/json-utils.cc index f67811e2162..aff8abb9ac0 100644 --- a/src/libutil/json-utils.cc +++ b/src/libutil/json-utils.cc @@ -1,6 +1,6 @@ -#include "json-utils.hh" -#include "error.hh" -#include "types.hh" +#include "nix/json-utils.hh" +#include "nix/error.hh" +#include "nix/types.hh" #include #include #include diff --git a/src/libutil/linux/cgroup.cc b/src/libutil/linux/cgroup.cc index ad3e8a0172f..7b3c3fa3b3b 100644 --- a/src/libutil/linux/cgroup.cc +++ b/src/libutil/linux/cgroup.cc @@ -1,8 +1,8 @@ -#include "cgroup.hh" -#include "signals.hh" -#include "util.hh" -#include "file-system.hh" -#include "finally.hh" +#include "nix/cgroup.hh" +#include "nix/signals.hh" +#include "nix/util.hh" +#include "nix/file-system.hh" +#include "nix/finally.hh" #include #include diff --git a/src/libutil/linux/cgroup.hh b/src/libutil/linux/include/nix/cgroup.hh similarity index 97% rename from src/libutil/linux/cgroup.hh rename to src/libutil/linux/include/nix/cgroup.hh index 87d135ba629..91c7de9d173 100644 --- a/src/libutil/linux/cgroup.hh +++ b/src/libutil/linux/include/nix/cgroup.hh @@ -4,7 +4,7 @@ #include #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/linux/include/nix/meson.build b/src/libutil/linux/include/nix/meson.build new file mode 100644 index 00000000000..285c1489bd8 --- /dev/null +++ b/src/libutil/linux/include/nix/meson.build @@ -0,0 +1,8 @@ +# Public headers directory + +include_dirs += include_directories('..') + +headers += files( + 'cgroup.hh', + 'namespaces.hh', +) diff --git a/src/libutil/linux/namespaces.hh b/src/libutil/linux/include/nix/namespaces.hh similarity index 96% rename from src/libutil/linux/namespaces.hh rename to src/libutil/linux/include/nix/namespaces.hh index 208920b80b1..3eb5f6a14a8 100644 --- a/src/libutil/linux/namespaces.hh +++ b/src/libutil/linux/include/nix/namespaces.hh @@ -3,7 +3,7 @@ #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/linux/meson.build b/src/libutil/linux/meson.build index a1ded76ca16..40907ed0d6c 100644 --- a/src/libutil/linux/meson.build +++ b/src/libutil/linux/meson.build @@ -3,9 +3,4 @@ sources += files( 'namespaces.cc', ) -include_dirs += include_directories('.') - -headers += files( - 'cgroup.hh', - 'namespaces.hh', -) +subdir('include/nix') diff --git a/src/libutil/linux/namespaces.cc b/src/libutil/linux/namespaces.cc index c5e21dffcb3..a53734a2ff1 100644 --- a/src/libutil/linux/namespaces.cc +++ b/src/libutil/linux/namespaces.cc @@ -1,13 +1,13 @@ -#include "current-process.hh" -#include "util.hh" -#include "finally.hh" -#include "file-system.hh" -#include "processes.hh" -#include "signals.hh" +#include "nix/current-process.hh" +#include "nix/util.hh" +#include "nix/finally.hh" +#include "nix/file-system.hh" +#include "nix/processes.hh" +#include "nix/signals.hh" #include #include -#include "cgroup.hh" +#include "nix/cgroup.hh" #include diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index 1b0b2d0d92c..0411a039d71 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -1,12 +1,12 @@ -#include "logging.hh" -#include "file-descriptor.hh" -#include "environment-variables.hh" -#include "terminal.hh" -#include "util.hh" -#include "config-global.hh" -#include "source-path.hh" -#include "position.hh" -#include "sync.hh" +#include "nix/logging.hh" +#include "nix/file-descriptor.hh" +#include "nix/environment-variables.hh" +#include "nix/terminal.hh" +#include "nix/util.hh" +#include "nix/config-global.hh" +#include "nix/source-path.hh" +#include "nix/position.hh" +#include "nix/sync.hh" #include #include diff --git a/src/libutil/memory-source-accessor.cc b/src/libutil/memory-source-accessor.cc index c4eee1031cf..7c8414fb08c 100644 --- a/src/libutil/memory-source-accessor.cc +++ b/src/libutil/memory-source-accessor.cc @@ -1,4 +1,4 @@ -#include "memory-source-accessor.hh" +#include "nix/memory-source-accessor.hh" namespace nix { diff --git a/src/libutil/meson.build b/src/libutil/meson.build index 3c0cb0d6b4f..0bc147dcf30 100644 --- a/src/libutil/meson.build +++ b/src/libutil/meson.build @@ -116,15 +116,10 @@ deps_public += nlohmann_json cxx = meson.get_compiler('cpp') -config_h = configure_file( - configuration : configdata, - output : 'config-util.hh', -) - add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', + '-include', 'nix/config-util.hh', language : 'cpp', ) @@ -178,91 +173,13 @@ sources = files( 'xml-writer.cc', ) -include_dirs = [include_directories('.')] +subdir('include/nix') + if not cxx.has_header('widechar_width.h', required : false) # use vendored widechar_width.h include_dirs += include_directories('./widecharwidth') endif -headers = [config_h] + files( - 'abstract-setting-to-json.hh', - 'ansicolor.hh', - 'archive.hh', - 'args.hh', - 'args/root.hh', - 'callback.hh', - 'canon-path.hh', - 'checked-arithmetic.hh', - 'chunked-vector.hh', - 'closure.hh', - 'comparator.hh', - 'compression.hh', - 'compute-levels.hh', - 'config-global.hh', - 'config-impl.hh', - 'config.hh', - 'current-process.hh', - 'english.hh', - 'environment-variables.hh', - 'error.hh', - 'exec.hh', - 'executable-path.hh', - 'exit.hh', - 'experimental-features.hh', - 'file-content-address.hh', - 'file-descriptor.hh', - 'file-path-impl.hh', - 'file-path.hh', - 'file-system.hh', - 'finally.hh', - 'fmt.hh', - 'fs-sink.hh', - 'git.hh', - 'hash.hh', - 'hilite.hh', - 'json-impls.hh', - 'json-utils.hh', - 'logging.hh', - 'lru-cache.hh', - 'memory-source-accessor.hh', - 'muxable-pipe.hh', - 'os-string.hh', - 'pool.hh', - 'pos-idx.hh', - 'pos-table.hh', - 'position.hh', - 'posix-source-accessor.hh', - 'processes.hh', - 'ref.hh', - 'references.hh', - 'regex-combinators.hh', - 'repair-flag.hh', - 'serialise.hh', - 'signals.hh', - 'signature/local-keys.hh', - 'signature/signer.hh', - 'source-accessor.hh', - 'source-path.hh', - 'split.hh', - 'std-hash.hh', - 'strings.hh', - 'strings-inline.hh', - 'suggestions.hh', - 'sync.hh', - 'tarfile.hh', - 'terminal.hh', - 'thread-pool.hh', - 'topo-sort.hh', - 'types.hh', - 'unix-domain-socket.hh', - 'url-parts.hh', - 'url.hh', - 'users.hh', - 'util.hh', - 'variant-wrapper.hh', - 'xml-writer.hh', -) - if host_machine.system() == 'linux' subdir('linux') endif diff --git a/src/libutil/mounted-source-accessor.cc b/src/libutil/mounted-source-accessor.cc index 79223d15573..aa00cbd8e74 100644 --- a/src/libutil/mounted-source-accessor.cc +++ b/src/libutil/mounted-source-accessor.cc @@ -1,4 +1,4 @@ -#include "source-accessor.hh" +#include "nix/source-accessor.hh" namespace nix { diff --git a/src/libutil/package.nix b/src/libutil/package.nix index 8114dd645fc..0c410dfab28 100644 --- a/src/libutil/package.nix +++ b/src/libutil/package.nix @@ -34,9 +34,13 @@ mkMesonLibrary (finalAttrs: { ./widecharwidth ./meson.build ./meson.options + ./include/nix/meson.build ./linux/meson.build + ./linux/include/nix/meson.build ./unix/meson.build + ./unix/include/nix/meson.build ./windows/meson.build + ./windows/include/nix/meson.build (fileset.fileFilter (file: file.hasExt "cc") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; diff --git a/src/libutil/pos-table.cc b/src/libutil/pos-table.cc index 8178beb9018..59234e3fc18 100644 --- a/src/libutil/pos-table.cc +++ b/src/libutil/pos-table.cc @@ -1,4 +1,4 @@ -#include "pos-table.hh" +#include "nix/pos-table.hh" #include diff --git a/src/libutil/position.cc b/src/libutil/position.cc index 275985c8c0d..515be245b14 100644 --- a/src/libutil/position.cc +++ b/src/libutil/position.cc @@ -1,4 +1,4 @@ -#include "position.hh" +#include "nix/position.hh" namespace nix { diff --git a/src/libutil/posix-source-accessor.cc b/src/libutil/posix-source-accessor.cc index 70ad6474fd6..5da9fa6237f 100644 --- a/src/libutil/posix-source-accessor.cc +++ b/src/libutil/posix-source-accessor.cc @@ -1,7 +1,7 @@ -#include "posix-source-accessor.hh" -#include "source-path.hh" -#include "signals.hh" -#include "sync.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/source-path.hh" +#include "nix/signals.hh" +#include "nix/sync.hh" #include diff --git a/src/libutil/references.cc b/src/libutil/references.cc index b30e62c7b2b..46c22c09cda 100644 --- a/src/libutil/references.cc +++ b/src/libutil/references.cc @@ -1,6 +1,6 @@ -#include "references.hh" -#include "hash.hh" -#include "archive.hh" +#include "nix/references.hh" +#include "nix/hash.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc index d612c11b2d7..415ccf3a0d0 100644 --- a/src/libutil/serialise.cc +++ b/src/libutil/serialise.cc @@ -1,6 +1,6 @@ -#include "serialise.hh" -#include "signals.hh" -#include "util.hh" +#include "nix/serialise.hh" +#include "nix/signals.hh" +#include "nix/util.hh" #include #include @@ -11,7 +11,7 @@ #ifdef _WIN32 # include # include -# include "windows-error.hh" +# include "nix/windows-error.hh" #else # include #endif diff --git a/src/libutil/signature/local-keys.cc b/src/libutil/signature/local-keys.cc index 70bcb5f33c2..86d3dfe3c24 100644 --- a/src/libutil/signature/local-keys.cc +++ b/src/libutil/signature/local-keys.cc @@ -1,7 +1,7 @@ -#include "signature/local-keys.hh" +#include "nix/signature/local-keys.hh" -#include "file-system.hh" -#include "util.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" #include namespace nix { diff --git a/src/libutil/signature/signer.cc b/src/libutil/signature/signer.cc index 0d26867b54a..4a61b67ebb6 100644 --- a/src/libutil/signature/signer.cc +++ b/src/libutil/signature/signer.cc @@ -1,5 +1,5 @@ -#include "signature/signer.hh" -#include "error.hh" +#include "nix/signature/signer.hh" +#include "nix/error.hh" #include diff --git a/src/libutil/source-accessor.cc b/src/libutil/source-accessor.cc index 78f038cf377..738d7f2f195 100644 --- a/src/libutil/source-accessor.cc +++ b/src/libutil/source-accessor.cc @@ -1,5 +1,5 @@ -#include "source-accessor.hh" -#include "archive.hh" +#include "nix/source-accessor.hh" +#include "nix/archive.hh" namespace nix { diff --git a/src/libutil/source-path.cc b/src/libutil/source-path.cc index 759d3c35579..12150c22398 100644 --- a/src/libutil/source-path.cc +++ b/src/libutil/source-path.cc @@ -1,4 +1,4 @@ -#include "source-path.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libutil/strings.cc b/src/libutil/strings.cc index 1635321bb9c..43c9a0815ca 100644 --- a/src/libutil/strings.cc +++ b/src/libutil/strings.cc @@ -2,9 +2,9 @@ #include #include -#include "strings-inline.hh" -#include "os-string.hh" -#include "error.hh" +#include "nix/strings-inline.hh" +#include "nix/os-string.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil/suggestions.cc b/src/libutil/suggestions.cc index 84c8e296f17..0f593ada0c7 100644 --- a/src/libutil/suggestions.cc +++ b/src/libutil/suggestions.cc @@ -1,6 +1,6 @@ -#include "suggestions.hh" -#include "ansicolor.hh" -#include "terminal.hh" +#include "nix/suggestions.hh" +#include "nix/ansicolor.hh" +#include "nix/terminal.hh" #include #include diff --git a/src/libutil/tarfile.cc b/src/libutil/tarfile.cc index 9e54c9be2d8..aec05e09287 100644 --- a/src/libutil/tarfile.cc +++ b/src/libutil/tarfile.cc @@ -1,10 +1,10 @@ #include #include -#include "finally.hh" -#include "serialise.hh" -#include "tarfile.hh" -#include "file-system.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/tarfile.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/terminal.cc b/src/libutil/terminal.cc index 8a8373f1bf9..233edabb48d 100644 --- a/src/libutil/terminal.cc +++ b/src/libutil/terminal.cc @@ -1,6 +1,6 @@ -#include "terminal.hh" -#include "environment-variables.hh" -#include "sync.hh" +#include "nix/terminal.hh" +#include "nix/environment-variables.hh" +#include "nix/sync.hh" #if _WIN32 # include diff --git a/src/libutil/thread-pool.cc b/src/libutil/thread-pool.cc index 0725c192685..6b7f2d01771 100644 --- a/src/libutil/thread-pool.cc +++ b/src/libutil/thread-pool.cc @@ -1,6 +1,6 @@ -#include "thread-pool.hh" -#include "signals.hh" -#include "util.hh" +#include "nix/thread-pool.hh" +#include "nix/signals.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/union-source-accessor.cc b/src/libutil/union-source-accessor.cc index eec0850c249..e24d6f2bd5b 100644 --- a/src/libutil/union-source-accessor.cc +++ b/src/libutil/union-source-accessor.cc @@ -1,4 +1,4 @@ -#include "source-accessor.hh" +#include "nix/source-accessor.hh" namespace nix { diff --git a/src/libutil/unix-domain-socket.cc b/src/libutil/unix-domain-socket.cc index 1707fdb75e1..831dd666c9f 100644 --- a/src/libutil/unix-domain-socket.cc +++ b/src/libutil/unix-domain-socket.cc @@ -1,6 +1,6 @@ -#include "file-system.hh" -#include "unix-domain-socket.hh" -#include "util.hh" +#include "nix/file-system.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/util.hh" #ifdef _WIN32 # include @@ -8,7 +8,7 @@ #else # include # include -# include "processes.hh" +# include "nix/processes.hh" #endif #include diff --git a/src/libutil/unix/environment-variables.cc b/src/libutil/unix/environment-variables.cc index cd7c8f5e566..9814cbcc28f 100644 --- a/src/libutil/unix/environment-variables.cc +++ b/src/libutil/unix/environment-variables.cc @@ -1,6 +1,6 @@ #include -#include "environment-variables.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libutil/unix/file-descriptor.cc b/src/libutil/unix/file-descriptor.cc index a02a53b1eeb..566675349f3 100644 --- a/src/libutil/unix/file-descriptor.cc +++ b/src/libutil/unix/file-descriptor.cc @@ -1,7 +1,7 @@ -#include "file-system.hh" -#include "signals.hh" -#include "finally.hh" -#include "serialise.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" #include #include diff --git a/src/libutil/unix/file-path.cc b/src/libutil/unix/file-path.cc index cccee86a1d7..3dd61397225 100644 --- a/src/libutil/unix/file-path.cc +++ b/src/libutil/unix/file-path.cc @@ -3,8 +3,8 @@ #include #include -#include "file-path.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/unix/file-system.cc b/src/libutil/unix/file-system.cc index bbbbfa5597c..119e8a27727 100644 --- a/src/libutil/unix/file-system.cc +++ b/src/libutil/unix/file-system.cc @@ -1,4 +1,4 @@ -#include "file-system.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/unix/include/nix/meson.build b/src/libutil/unix/include/nix/meson.build new file mode 100644 index 00000000000..5f3095ab117 --- /dev/null +++ b/src/libutil/unix/include/nix/meson.build @@ -0,0 +1,8 @@ +# Public headers directory + +include_dirs += include_directories('..') + +headers += files( + 'monitor-fd.hh', + 'signals-impl.hh', +) diff --git a/src/libutil/unix/monitor-fd.hh b/src/libutil/unix/include/nix/monitor-fd.hh similarity index 99% rename from src/libutil/unix/monitor-fd.hh rename to src/libutil/unix/include/nix/monitor-fd.hh index c1f8705ebb0..720cbb937e8 100644 --- a/src/libutil/unix/monitor-fd.hh +++ b/src/libutil/unix/include/nix/monitor-fd.hh @@ -10,7 +10,7 @@ #include #include -#include "signals.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libutil/unix/signals-impl.hh b/src/libutil/unix/include/nix/signals-impl.hh similarity index 95% rename from src/libutil/unix/signals-impl.hh rename to src/libutil/unix/include/nix/signals-impl.hh index 037416e7d6b..a63e0372599 100644 --- a/src/libutil/unix/signals-impl.hh +++ b/src/libutil/unix/include/nix/signals-impl.hh @@ -10,11 +10,11 @@ * downstream code.) */ -#include "types.hh" -#include "error.hh" -#include "logging.hh" -#include "ansicolor.hh" -#include "signals.hh" +#include "nix/types.hh" +#include "nix/error.hh" +#include "nix/logging.hh" +#include "nix/ansicolor.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libutil/unix/meson.build b/src/libutil/unix/meson.build index 1c5bf27fb14..1373ed17a79 100644 --- a/src/libutil/unix/meson.build +++ b/src/libutil/unix/meson.build @@ -10,9 +10,4 @@ sources += files( 'users.cc', ) -include_dirs += include_directories('.') - -headers += files( - 'monitor-fd.hh', - 'signals-impl.hh', -) +subdir('include/nix') diff --git a/src/libutil/unix/muxable-pipe.cc b/src/libutil/unix/muxable-pipe.cc index 0104663c3bf..e81f47bc09d 100644 --- a/src/libutil/unix/muxable-pipe.cc +++ b/src/libutil/unix/muxable-pipe.cc @@ -1,8 +1,8 @@ #include -#include "logging.hh" -#include "util.hh" -#include "muxable-pipe.hh" +#include "nix/logging.hh" +#include "nix/util.hh" +#include "nix/muxable-pipe.hh" namespace nix { diff --git a/src/libutil/unix/os-string.cc b/src/libutil/unix/os-string.cc index 8378afde292..e97308a4a4c 100644 --- a/src/libutil/unix/os-string.cc +++ b/src/libutil/unix/os-string.cc @@ -3,8 +3,8 @@ #include #include -#include "file-path.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/unix/processes.cc b/src/libutil/unix/processes.cc index da198bed430..032992a2f2d 100644 --- a/src/libutil/unix/processes.cc +++ b/src/libutil/unix/processes.cc @@ -1,10 +1,10 @@ -#include "current-process.hh" -#include "environment-variables.hh" -#include "executable-path.hh" -#include "signals.hh" -#include "processes.hh" -#include "finally.hh" -#include "serialise.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" +#include "nix/executable-path.hh" +#include "nix/signals.hh" +#include "nix/processes.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" #include #include diff --git a/src/libutil/unix/signals.cc b/src/libutil/unix/signals.cc index d0608dace67..168b33bfb90 100644 --- a/src/libutil/unix/signals.cc +++ b/src/libutil/unix/signals.cc @@ -1,8 +1,8 @@ -#include "signals.hh" -#include "util.hh" -#include "error.hh" -#include "sync.hh" -#include "terminal.hh" +#include "nix/signals.hh" +#include "nix/util.hh" +#include "nix/error.hh" +#include "nix/sync.hh" +#include "nix/terminal.hh" #include diff --git a/src/libutil/unix/users.cc b/src/libutil/unix/users.cc index 107a6e04f98..1ba194d7185 100644 --- a/src/libutil/unix/users.cc +++ b/src/libutil/unix/users.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "users.hh" -#include "environment-variables.hh" -#include "file-system.hh" +#include "nix/util.hh" +#include "nix/users.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" #include #include diff --git a/src/libutil/url.cc b/src/libutil/url.cc index 8fb1eecfb6c..f042d3b0f59 100644 --- a/src/libutil/url.cc +++ b/src/libutil/url.cc @@ -1,8 +1,8 @@ -#include "url.hh" -#include "url-parts.hh" -#include "util.hh" -#include "split.hh" -#include "canon-path.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" +#include "nix/util.hh" +#include "nix/split.hh" +#include "nix/canon-path.hh" namespace nix { diff --git a/src/libutil/users.cc b/src/libutil/users.cc index b4bc67cbcf2..d4fb08ab569 100644 --- a/src/libutil/users.cc +++ b/src/libutil/users.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "users.hh" -#include "environment-variables.hh" -#include "file-system.hh" +#include "nix/util.hh" +#include "nix/users.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/util.cc b/src/libutil/util.cc index ed5c7e4f1ef..37f30d91f26 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "fmt.hh" -#include "file-path.hh" -#include "signals.hh" +#include "nix/util.hh" +#include "nix/fmt.hh" +#include "nix/file-path.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libutil/windows/environment-variables.cc b/src/libutil/windows/environment-variables.cc index 2ed086c600e..e1f41f8d268 100644 --- a/src/libutil/windows/environment-variables.cc +++ b/src/libutil/windows/environment-variables.cc @@ -1,4 +1,4 @@ -#include "environment-variables.hh" +#include "nix/environment-variables.hh" #ifdef _WIN32 # include "processenv.h" diff --git a/src/libutil/windows/file-descriptor.cc b/src/libutil/windows/file-descriptor.cc index e2a473a7cce..7f77cae89f6 100644 --- a/src/libutil/windows/file-descriptor.cc +++ b/src/libutil/windows/file-descriptor.cc @@ -1,9 +1,9 @@ -#include "file-system.hh" -#include "signals.hh" -#include "finally.hh" -#include "serialise.hh" -#include "windows-error.hh" -#include "file-path.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/windows-error.hh" +#include "nix/file-path.hh" #ifdef _WIN32 #include diff --git a/src/libutil/windows/file-path.cc b/src/libutil/windows/file-path.cc index 7405c426b62..5079bcbcd4e 100644 --- a/src/libutil/windows/file-path.cc +++ b/src/libutil/windows/file-path.cc @@ -3,9 +3,9 @@ #include #include -#include "file-path.hh" -#include "file-path-impl.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/file-path-impl.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/windows/file-system.cc b/src/libutil/windows/file-system.cc index 7ed1c04a623..22f1f89abb2 100644 --- a/src/libutil/windows/file-system.cc +++ b/src/libutil/windows/file-system.cc @@ -1,4 +1,4 @@ -#include "file-system.hh" +#include "nix/file-system.hh" #ifdef _WIN32 namespace nix { diff --git a/src/libutil/windows/include/nix/meson.build b/src/libutil/windows/include/nix/meson.build new file mode 100644 index 00000000000..898b7db8963 --- /dev/null +++ b/src/libutil/windows/include/nix/meson.build @@ -0,0 +1,9 @@ +# Public headers directory + +include_dirs += include_directories('..') + +headers += files( + 'signals-impl.hh', + 'windows-async-pipe.hh', + 'windows-error.hh', +) diff --git a/src/libutil/windows/signals-impl.hh b/src/libutil/windows/include/nix/signals-impl.hh similarity index 95% rename from src/libutil/windows/signals-impl.hh rename to src/libutil/windows/include/nix/signals-impl.hh index 26d2600bf04..fcdf18276eb 100644 --- a/src/libutil/windows/signals-impl.hh +++ b/src/libutil/windows/include/nix/signals-impl.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/windows/windows-async-pipe.hh b/src/libutil/windows/include/nix/windows-async-pipe.hh similarity index 93% rename from src/libutil/windows/windows-async-pipe.hh rename to src/libutil/windows/include/nix/windows-async-pipe.hh index 53715e26010..55f6ea31d0a 100644 --- a/src/libutil/windows/windows-async-pipe.hh +++ b/src/libutil/windows/include/nix/windows-async-pipe.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "file-descriptor.hh" +#include "nix/file-descriptor.hh" #ifdef _WIN32 namespace nix::windows { diff --git a/src/libutil/windows/windows-error.hh b/src/libutil/windows/include/nix/windows-error.hh similarity index 97% rename from src/libutil/windows/windows-error.hh rename to src/libutil/windows/include/nix/windows-error.hh index 66c67b43a6c..c07d61609a1 100644 --- a/src/libutil/windows/windows-error.hh +++ b/src/libutil/windows/include/nix/windows-error.hh @@ -4,7 +4,7 @@ #ifdef _WIN32 #include -#include "error.hh" +#include "nix/error.hh" namespace nix::windows { diff --git a/src/libutil/windows/meson.build b/src/libutil/windows/meson.build index 1c645fe0573..2423c77eac6 100644 --- a/src/libutil/windows/meson.build +++ b/src/libutil/windows/meson.build @@ -11,10 +11,4 @@ sources += files( 'windows-error.cc', ) -include_dirs += include_directories('.') - -headers += files( - 'signals-impl.hh', - 'windows-async-pipe.hh', - 'windows-error.hh', -) +subdir('include/nix') diff --git a/src/libutil/windows/muxable-pipe.cc b/src/libutil/windows/muxable-pipe.cc index ac28821202c..d9a3e2ca536 100644 --- a/src/libutil/windows/muxable-pipe.cc +++ b/src/libutil/windows/muxable-pipe.cc @@ -1,10 +1,10 @@ #ifdef _WIN32 # include -# include "windows-error.hh" +# include "nix/windows-error.hh" -# include "logging.hh" -# include "util.hh" -# include "muxable-pipe.hh" +# include "nix/logging.hh" +# include "nix/util.hh" +# include "nix/muxable-pipe.hh" namespace nix { diff --git a/src/libutil/windows/os-string.cc b/src/libutil/windows/os-string.cc index b09ef8b90d2..b9aff210bb0 100644 --- a/src/libutil/windows/os-string.cc +++ b/src/libutil/windows/os-string.cc @@ -3,9 +3,9 @@ #include #include -#include "file-path.hh" -#include "file-path-impl.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/file-path-impl.hh" +#include "nix/util.hh" #ifdef _WIN32 diff --git a/src/libutil/windows/processes.cc b/src/libutil/windows/processes.cc index 90cb1f5f5a5..cdb659a79c9 100644 --- a/src/libutil/windows/processes.cc +++ b/src/libutil/windows/processes.cc @@ -1,16 +1,16 @@ -#include "current-process.hh" -#include "environment-variables.hh" -#include "error.hh" -#include "executable-path.hh" -#include "file-descriptor.hh" -#include "file-path.hh" -#include "signals.hh" -#include "processes.hh" -#include "finally.hh" -#include "serialise.hh" -#include "file-system.hh" -#include "util.hh" -#include "windows-error.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" +#include "nix/error.hh" +#include "nix/executable-path.hh" +#include "nix/file-descriptor.hh" +#include "nix/file-path.hh" +#include "nix/signals.hh" +#include "nix/processes.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" +#include "nix/windows-error.hh" #include #include diff --git a/src/libutil/windows/users.cc b/src/libutil/windows/users.cc index 438c4221cf3..1d49e667bab 100644 --- a/src/libutil/windows/users.cc +++ b/src/libutil/windows/users.cc @@ -1,8 +1,8 @@ -#include "util.hh" -#include "users.hh" -#include "environment-variables.hh" -#include "file-system.hh" -#include "windows-error.hh" +#include "nix/util.hh" +#include "nix/users.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" +#include "nix/windows-error.hh" #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN diff --git a/src/libutil/windows/windows-async-pipe.cc b/src/libutil/windows/windows-async-pipe.cc index 4e139d5cfb9..77ccd9e3f3f 100644 --- a/src/libutil/windows/windows-async-pipe.cc +++ b/src/libutil/windows/windows-async-pipe.cc @@ -1,5 +1,5 @@ -#include "windows-async-pipe.hh" -#include "windows-error.hh" +#include "nix/windows-async-pipe.hh" +#include "nix/windows-error.hh" #ifdef _WIN32 diff --git a/src/libutil/windows/windows-error.cc b/src/libutil/windows/windows-error.cc index b92f9155f97..8c523e4033b 100644 --- a/src/libutil/windows/windows-error.cc +++ b/src/libutil/windows/windows-error.cc @@ -1,4 +1,4 @@ -#include "windows-error.hh" +#include "nix/windows-error.hh" #ifdef _WIN32 #include diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc index 7993bee9af0..78a40ef64b3 100644 --- a/src/libutil/xml-writer.cc +++ b/src/libutil/xml-writer.cc @@ -1,6 +1,6 @@ #include -#include "xml-writer.hh" +#include "nix/xml-writer.hh" namespace nix { diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index a5ae12a12d9..065a3b3e8c0 100644 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -9,25 +9,25 @@ #include -#include "current-process.hh" -#include "parsed-derivations.hh" -#include "derivation-options.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "globals.hh" -#include "realisation.hh" -#include "derivations.hh" -#include "shared.hh" -#include "path-with-outputs.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "get-drvs.hh" -#include "common-eval-args.hh" -#include "attr-path.hh" -#include "legacy.hh" -#include "users.hh" -#include "network-proxy.hh" -#include "compatibility-settings.hh" +#include "nix/current-process.hh" +#include "nix/parsed-derivations.hh" +#include "nix/derivation-options.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/globals.hh" +#include "nix/realisation.hh" +#include "nix/derivations.hh" +#include "nix/shared.hh" +#include "nix/path-with-outputs.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/get-drvs.hh" +#include "nix/common-eval-args.hh" +#include "nix/attr-path.hh" +#include "nix/legacy.hh" +#include "nix/users.hh" +#include "nix/network-proxy.hh" +#include "nix/compatibility-settings.hh" #include "man-pages.hh" using namespace nix; diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc index ee61db99488..33efb891858 100644 --- a/src/nix-channel/nix-channel.cc +++ b/src/nix-channel/nix-channel.cc @@ -1,12 +1,12 @@ -#include "profiles.hh" -#include "shared.hh" -#include "globals.hh" -#include "filetransfer.hh" -#include "store-api.hh" -#include "legacy.hh" -#include "eval-settings.hh" // for defexpr -#include "users.hh" -#include "tarball.hh" +#include "nix/profiles.hh" +#include "nix/shared.hh" +#include "nix/globals.hh" +#include "nix/filetransfer.hh" +#include "nix/store-api.hh" +#include "nix/legacy.hh" +#include "nix/eval-settings.hh" // for defexpr +#include "nix/users.hh" +#include "nix/tarball.hh" #include "self-exe.hh" #include "man-pages.hh" diff --git a/src/nix-collect-garbage/nix-collect-garbage.cc b/src/nix-collect-garbage/nix-collect-garbage.cc index a060a01fd15..c6f996f20fe 100644 --- a/src/nix-collect-garbage/nix-collect-garbage.cc +++ b/src/nix-collect-garbage/nix-collect-garbage.cc @@ -1,12 +1,12 @@ -#include "file-system.hh" -#include "signals.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" -#include "profiles.hh" -#include "shared.hh" -#include "globals.hh" -#include "legacy.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" +#include "nix/profiles.hh" +#include "nix/shared.hh" +#include "nix/globals.hh" +#include "nix/legacy.hh" #include "man-pages.hh" #include diff --git a/src/nix-copy-closure/nix-copy-closure.cc b/src/nix-copy-closure/nix-copy-closure.cc index 15bff0a0ad5..8094925dc58 100644 --- a/src/nix-copy-closure/nix-copy-closure.cc +++ b/src/nix-copy-closure/nix-copy-closure.cc @@ -1,7 +1,7 @@ -#include "shared.hh" -#include "realisation.hh" -#include "store-api.hh" -#include "legacy.hh" +#include "nix/shared.hh" +#include "nix/realisation.hh" +#include "nix/store-api.hh" +#include "nix/legacy.hh" #include "man-pages.hh" using namespace nix; diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index aa1edb4c8e3..c02c27d3678 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1,22 +1,22 @@ -#include "users.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "globals.hh" -#include "names.hh" -#include "profiles.hh" -#include "path-with-outputs.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/users.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/globals.hh" +#include "nix/names.hh" +#include "nix/profiles.hh" +#include "nix/path-with-outputs.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" #include "user-env.hh" -#include "value-to-json.hh" -#include "xml-writer.hh" -#include "legacy.hh" -#include "eval-settings.hh" // for defexpr -#include "terminal.hh" +#include "nix/value-to-json.hh" +#include "nix/xml-writer.hh" +#include "nix/legacy.hh" +#include "nix/eval-settings.hh" // for defexpr +#include "nix/terminal.hh" #include "man-pages.hh" #include diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc index ee62077c0a7..81abefc2fda 100644 --- a/src/nix-env/user-env.cc +++ b/src/nix-env/user-env.cc @@ -1,14 +1,14 @@ #include "user-env.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "path-with-outputs.hh" -#include "local-fs-store.hh" -#include "globals.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "profiles.hh" -#include "print-ambiguous.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/path-with-outputs.hh" +#include "nix/local-fs-store.hh" +#include "nix/globals.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/profiles.hh" +#include "nix/print-ambiguous.hh" #include #include diff --git a/src/nix-env/user-env.hh b/src/nix-env/user-env.hh index 15da3fcb3f0..8ec124d07c6 100644 --- a/src/nix-env/user-env.hh +++ b/src/nix-env/user-env.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "get-drvs.hh" +#include "nix/get-drvs.hh" namespace nix { diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 0cf926369e5..d4765952ba8 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -1,17 +1,17 @@ -#include "globals.hh" -#include "print-ambiguous.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "get-drvs.hh" -#include "attr-path.hh" -#include "signals.hh" -#include "value-to-xml.hh" -#include "value-to-json.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "common-eval-args.hh" -#include "legacy.hh" +#include "nix/globals.hh" +#include "nix/print-ambiguous.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/get-drvs.hh" +#include "nix/attr-path.hh" +#include "nix/signals.hh" +#include "nix/value-to-xml.hh" +#include "nix/value-to-json.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/common-eval-args.hh" +#include "nix/legacy.hh" #include "man-pages.hh" #include diff --git a/src/nix-store/dotgraph.cc b/src/nix-store/dotgraph.cc index 2c530999b55..0cab4665601 100644 --- a/src/nix-store/dotgraph.cc +++ b/src/nix-store/dotgraph.cc @@ -1,5 +1,5 @@ #include "dotgraph.hh" -#include "store-api.hh" +#include "nix/store-api.hh" #include diff --git a/src/nix-store/dotgraph.hh b/src/nix-store/dotgraph.hh index 4fd9440803f..cb4041f8e34 100644 --- a/src/nix-store/dotgraph.hh +++ b/src/nix-store/dotgraph.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/nix-store/graphml.cc b/src/nix-store/graphml.cc index 3e789a2d8b3..1eb2ccdf68c 100644 --- a/src/nix-store/graphml.cc +++ b/src/nix-store/graphml.cc @@ -1,6 +1,6 @@ #include "graphml.hh" -#include "store-api.hh" -#include "derivations.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" #include diff --git a/src/nix-store/graphml.hh b/src/nix-store/graphml.hh index bd3a4a37c46..2989733d775 100644 --- a/src/nix-store/graphml.hh +++ b/src/nix-store/graphml.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index d182b1eee57..7bdf3b1a336 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -1,23 +1,23 @@ -#include "archive.hh" -#include "derivations.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include "dotgraph.hh" -#include "globals.hh" -#include "store-cast.hh" -#include "local-fs-store.hh" -#include "log-store.hh" -#include "serve-protocol.hh" -#include "serve-protocol-connection.hh" -#include "shared.hh" +#include "nix/globals.hh" +#include "nix/store-cast.hh" +#include "nix/local-fs-store.hh" +#include "nix/log-store.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/shared.hh" #include "graphml.hh" -#include "legacy.hh" -#include "posix-source-accessor.hh" -#include "path-with-outputs.hh" +#include "nix/legacy.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/path-with-outputs.hh" #include "man-pages.hh" #ifndef _WIN32 // TODO implement on Windows or provide allowed-to-noop interface -# include "local-store.hh" -# include "monitor-fd.hh" -# include "posix-fs-canonicalise.hh" +# include "nix/local-store.hh" +# include "nix/monitor-fd.hh" +# include "nix/posix-fs-canonicalise.hh" #endif #include @@ -27,9 +27,9 @@ #include #include -#include "build-result.hh" -#include "exit.hh" -#include "serve-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/exit.hh" +#include "nix/serve-protocol-impl.hh" namespace nix_store { diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc index 7f15de374eb..6c71dc69fb4 100644 --- a/src/nix/add-to-store.cc +++ b/src/nix/add-to-store.cc @@ -1,10 +1,10 @@ -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "archive.hh" -#include "git.hh" -#include "posix-source-accessor.hh" -#include "misc-store-flags.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/misc-store-flags.hh" using namespace nix; diff --git a/src/nix/app.cc b/src/nix/app.cc index 935ed18ecba..2b6c222697e 100644 --- a/src/nix/app.cc +++ b/src/nix/app.cc @@ -1,13 +1,13 @@ -#include "installables.hh" -#include "installable-derived-path.hh" -#include "installable-value.hh" -#include "store-api.hh" -#include "eval-inline.hh" -#include "eval-cache.hh" -#include "names.hh" -#include "command.hh" -#include "derivations.hh" -#include "downstream-placeholder.hh" +#include "nix/installables.hh" +#include "nix/installable-derived-path.hh" +#include "nix/installable-value.hh" +#include "nix/store-api.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-cache.hh" +#include "nix/names.hh" +#include "nix/command.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" namespace nix { diff --git a/src/nix/build.cc b/src/nix/build.cc index 120facf593a..80cf5ddad1d 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -1,8 +1,8 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" #include diff --git a/src/nix/bundle.cc b/src/nix/bundle.cc index 5b7862c4e0c..61338393933 100644 --- a/src/nix/bundle.cc +++ b/src/nix/bundle.cc @@ -1,10 +1,10 @@ -#include "installable-flake.hh" -#include "command-installable-value.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "eval-inline.hh" +#include "nix/installable-flake.hh" +#include "nix/command-installable-value.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/eval-inline.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/cat.cc b/src/nix/cat.cc index 214d256e956..11de32b403a 100644 --- a/src/nix/cat.cc +++ b/src/nix/cat.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "store-api.hh" -#include "nar-accessor.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/nar-accessor.hh" using namespace nix; diff --git a/src/nix/config-check.cc b/src/nix/config-check.cc index a72b0654232..bc23fd7be38 100644 --- a/src/nix/config-check.cc +++ b/src/nix/config-check.cc @@ -1,14 +1,14 @@ #include -#include "command.hh" -#include "exit.hh" -#include "logging.hh" -#include "serve-protocol.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "worker-protocol.hh" -#include "executable-path.hh" +#include "nix/command.hh" +#include "nix/exit.hh" +#include "nix/logging.hh" +#include "nix/serve-protocol.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/worker-protocol.hh" +#include "nix/executable-path.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/config.cc b/src/nix/config.cc index d77f5db695e..6a34faaec88 100644 --- a/src/nix/config.cc +++ b/src/nix/config.cc @@ -1,8 +1,8 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "config-global.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/config-global.hh" #include diff --git a/src/nix/copy.cc b/src/nix/copy.cc index 399a6c0fd34..0ed99df53bc 100644 --- a/src/nix/copy.cc +++ b/src/nix/copy.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" using namespace nix; diff --git a/src/nix/crash-handler.cc b/src/nix/crash-handler.cc index 8ffd436acee..65687f79ee3 100644 --- a/src/nix/crash-handler.cc +++ b/src/nix/crash-handler.cc @@ -1,6 +1,7 @@ #include "crash-handler.hh" -#include "fmt.hh" -#include "logging.hh" + +#include "nix/fmt.hh" +#include "nix/logging.hh" #include #include diff --git a/src/nix/derivation-add.cc b/src/nix/derivation-add.cc index 4d91d453800..da52ac14c05 100644 --- a/src/nix/derivation-add.cc +++ b/src/nix/derivation-add.cc @@ -1,10 +1,10 @@ // FIXME: rename to 'nix plan add' or 'nix derivation add'? -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "archive.hh" -#include "derivations.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include using namespace nix; diff --git a/src/nix/derivation-show.cc b/src/nix/derivation-show.cc index f0b9390fb1c..038fa5f9684 100644 --- a/src/nix/derivation-show.cc +++ b/src/nix/derivation-show.cc @@ -1,11 +1,11 @@ // FIXME: integrate this with `nix path-info`? // FIXME: rename to 'nix store derivation show'? -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "archive.hh" -#include "derivations.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include using namespace nix; diff --git a/src/nix/derivation.cc b/src/nix/derivation.cc index 59a78d37879..6e0d28d9abf 100644 --- a/src/nix/derivation.cc +++ b/src/nix/derivation.cc @@ -1,4 +1,4 @@ -#include "command.hh" +#include "nix/command.hh" using namespace nix; diff --git a/src/nix/develop.cc b/src/nix/develop.cc index ca3bfc50d61..c8bfc06fb53 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -1,12 +1,12 @@ -#include "config-global.hh" -#include "eval.hh" -#include "installable-flake.hh" -#include "command-installable-value.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "outputs-spec.hh" -#include "derivations.hh" +#include "nix/config-global.hh" +#include "nix/eval.hh" +#include "nix/installable-flake.hh" +#include "nix/command-installable-value.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/outputs-spec.hh" +#include "nix/derivations.hh" #ifndef _WIN32 // TODO re-enable on Windows # include "run.hh" @@ -18,7 +18,7 @@ #include #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/diff-closures.cc b/src/nix/diff-closures.cc index 2bc7fe82b1b..042da8d3ada 100644 --- a/src/nix/diff-closures.cc +++ b/src/nix/diff-closures.cc @@ -1,12 +1,12 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "common-args.hh" -#include "names.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/common-args.hh" +#include "nix/names.hh" #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/nix/dump-path.cc b/src/nix/dump-path.cc index 98a059fa1bd..bf82de84679 100644 --- a/src/nix/dump-path.cc +++ b/src/nix/dump-path.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "store-api.hh" -#include "archive.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" using namespace nix; diff --git a/src/nix/edit.cc b/src/nix/edit.cc index 49807da9ecd..770bbfc7129 100644 --- a/src/nix/edit.cc +++ b/src/nix/edit.cc @@ -1,9 +1,9 @@ -#include "current-process.hh" -#include "command-installable-value.hh" -#include "shared.hh" -#include "eval.hh" -#include "attr-path.hh" -#include "editor-for.hh" +#include "nix/current-process.hh" +#include "nix/command-installable-value.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/attr-path.hh" +#include "nix/editor-for.hh" #include diff --git a/src/nix/env.cc b/src/nix/env.cc index 832320320ae..982120252fa 100644 --- a/src/nix/env.cc +++ b/src/nix/env.cc @@ -1,11 +1,11 @@ #include #include -#include "command.hh" -#include "eval.hh" +#include "nix/command.hh" +#include "nix/eval.hh" #include "run.hh" -#include "strings.hh" -#include "executable-path.hh" +#include "nix/strings.hh" +#include "nix/executable-path.hh" using namespace nix; diff --git a/src/nix/eval.cc b/src/nix/eval.cc index b88588081cc..09623abc741 100644 --- a/src/nix/eval.cc +++ b/src/nix/eval.cc @@ -1,10 +1,10 @@ -#include "command-installable-value.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "value-to-json.hh" +#include "nix/command-installable-value.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/value-to-json.hh" #include diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 6526f75b44c..f263601d0f8 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -1,30 +1,30 @@ -#include "command.hh" -#include "installable-flake.hh" -#include "common-args.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "flake/flake.hh" -#include "get-drvs.hh" -#include "signals.hh" -#include "store-api.hh" -#include "derivations.hh" -#include "outputs-spec.hh" -#include "attr-path.hh" -#include "fetchers.hh" -#include "registry.hh" -#include "eval-cache.hh" -#include "markdown.hh" -#include "users.hh" -#include "fetch-to-store.hh" -#include "local-fs-store.hh" +#include "nix/command.hh" +#include "nix/installable-flake.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/flake/flake.hh" +#include "nix/get-drvs.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" +#include "nix/outputs-spec.hh" +#include "nix/attr-path.hh" +#include "nix/fetchers.hh" +#include "nix/registry.hh" +#include "nix/eval-cache.hh" +#include "nix/markdown.hh" +#include "nix/users.hh" +#include "nix/fetch-to-store.hh" +#include "nix/local-fs-store.hh" #include #include #include -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/fmt.cc b/src/nix/fmt.cc index f444d6addf1..e49f7608418 100644 --- a/src/nix/fmt.cc +++ b/src/nix/fmt.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "installable-value.hh" -#include "eval.hh" +#include "nix/command.hh" +#include "nix/installable-value.hh" +#include "nix/eval.hh" #include "run.hh" using namespace nix; diff --git a/src/nix/hash.cc b/src/nix/hash.cc index 91bba47f42b..db937283acf 100644 --- a/src/nix/hash.cc +++ b/src/nix/hash.cc @@ -1,13 +1,13 @@ -#include "command.hh" -#include "hash.hh" -#include "content-address.hh" -#include "legacy.hh" -#include "shared.hh" -#include "references.hh" -#include "archive.hh" -#include "git.hh" -#include "posix-source-accessor.hh" -#include "misc-store-flags.hh" +#include "nix/command.hh" +#include "nix/hash.hh" +#include "nix/content-address.hh" +#include "nix/legacy.hh" +#include "nix/shared.hh" +#include "nix/references.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/misc-store-flags.hh" #include "man-pages.hh" using namespace nix; diff --git a/src/nix/log.cc b/src/nix/log.cc index 6e23188dbf2..ee37cd03c4e 100644 --- a/src/nix/log.cc +++ b/src/nix/log.cc @@ -1,8 +1,8 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "log-store.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/log-store.hh" using namespace nix; diff --git a/src/nix/ls.cc b/src/nix/ls.cc index 63f97f2d3b6..c5a1c450485 100644 --- a/src/nix/ls.cc +++ b/src/nix/ls.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "store-api.hh" -#include "nar-accessor.hh" -#include "common-args.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/nar-accessor.hh" +#include "nix/common-args.hh" #include using namespace nix; diff --git a/src/nix/main.cc b/src/nix/main.cc index 188d424bc5e..3d57263dfe9 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -1,26 +1,27 @@ -#include "args/root.hh" -#include "current-process.hh" -#include "command.hh" -#include "common-args.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "globals.hh" -#include "legacy.hh" -#include "shared.hh" -#include "store-api.hh" -#include "filetransfer.hh" -#include "finally.hh" -#include "loggers.hh" -#include "markdown.hh" -#include "memory-source-accessor.hh" -#include "terminal.hh" -#include "users.hh" -#include "network-proxy.hh" -#include "eval-cache.hh" -#include "flake/flake.hh" -#include "flake/settings.hh" +#include "nix/args/root.hh" +#include "nix/current-process.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/globals.hh" +#include "nix/legacy.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/filetransfer.hh" +#include "nix/finally.hh" +#include "nix/loggers.hh" +#include "nix/markdown.hh" +#include "nix/memory-source-accessor.hh" +#include "nix/terminal.hh" +#include "nix/users.hh" +#include "nix/network-proxy.hh" +#include "nix/eval-cache.hh" +#include "nix/flake/flake.hh" +#include "nix/flake/settings.hh" +#include "nix/json-utils.hh" + #include "self-exe.hh" -#include "json-utils.hh" #include "crash-handler.hh" #include @@ -35,7 +36,7 @@ #endif #if __linux__ -# include "namespaces.hh" +# include "nix/namespaces.hh" #endif #ifndef _WIN32 @@ -44,7 +45,7 @@ extern std::string chrootHelperName; void chrootHelper(int argc, char * * argv); #endif -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/nix/make-content-addressed.cc b/src/nix/make-content-addressed.cc index 2d58377ed57..39218124dba 100644 --- a/src/nix/make-content-addressed.cc +++ b/src/nix/make-content-addressed.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "store-api.hh" -#include "make-content-addressed.hh" -#include "common-args.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/make-content-addressed.hh" +#include "nix/common-args.hh" #include diff --git a/src/nix/man-pages.cc b/src/nix/man-pages.cc index e9e89bb62a7..993ef28e1be 100644 --- a/src/nix/man-pages.cc +++ b/src/nix/man-pages.cc @@ -1,7 +1,7 @@ #include "man-pages.hh" -#include "file-system.hh" -#include "current-process.hh" -#include "environment-variables.hh" +#include "nix/file-system.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/nix/meson.build b/src/nix/meson.build index 1ad53c80757..adcf80a259e 100644 --- a/src/nix/meson.build +++ b/src/nix/meson.build @@ -54,9 +54,9 @@ config_h = configure_file( add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', '-include', 'config-nix-cli.hh', language : 'cpp', ) diff --git a/src/nix/nar.cc b/src/nix/nar.cc index 8ad4f92a796..ba815551d59 100644 --- a/src/nix/nar.cc +++ b/src/nix/nar.cc @@ -1,4 +1,4 @@ -#include "command.hh" +#include "nix/command.hh" using namespace nix; diff --git a/src/nix/optimise-store.cc b/src/nix/optimise-store.cc index 985006e5a54..ac1b03f60a5 100644 --- a/src/nix/optimise-store.cc +++ b/src/nix/optimise-store.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" #include diff --git a/src/nix/path-from-hash-part.cc b/src/nix/path-from-hash-part.cc index 7f7cda8d3d3..060231d025a 100644 --- a/src/nix/path-from-hash-part.cc +++ b/src/nix/path-from-hash-part.cc @@ -1,5 +1,5 @@ -#include "command.hh" -#include "store-api.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" using namespace nix; diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index 3246d3751f6..31a8f0ad4e1 100644 --- a/src/nix/path-info.cc +++ b/src/nix/path-info.cc @@ -1,15 +1,15 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "common-args.hh" -#include "nar-info.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/common-args.hh" +#include "nix/nar-info.hh" #include #include #include -#include "strings.hh" +#include "nix/strings.hh" using namespace nix; using nlohmann::json; diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc index 8467a4e89b8..8ee9b5f7288 100644 --- a/src/nix/prefetch.cc +++ b/src/nix/prefetch.cc @@ -1,17 +1,18 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "filetransfer.hh" -#include "finally.hh" -#include "loggers.hh" -#include "tarfile.hh" -#include "attr-path.hh" -#include "eval-inline.hh" -#include "legacy.hh" -#include "posix-source-accessor.hh" -#include "misc-store-flags.hh" -#include "terminal.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/filetransfer.hh" +#include "nix/finally.hh" +#include "nix/loggers.hh" +#include "nix/tarfile.hh" +#include "nix/attr-path.hh" +#include "nix/eval-inline.hh" +#include "nix/legacy.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/misc-store-flags.hh" +#include "nix/terminal.hh" + #include "man-pages.hh" #include diff --git a/src/nix/profile.cc b/src/nix/profile.cc index f10d06747a6..ef6957874d6 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -1,23 +1,23 @@ -#include "command.hh" -#include "installable-flake.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "derivations.hh" -#include "archive.hh" -#include "builtins/buildenv.hh" -#include "flake/flakeref.hh" +#include "nix/command.hh" +#include "nix/installable-flake.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" +#include "nix/archive.hh" +#include "nix/builtins/buildenv.hh" +#include "nix/flake/flakeref.hh" #include "../nix-env/user-env.hh" -#include "profiles.hh" -#include "names.hh" -#include "url.hh" -#include "flake/url-name.hh" +#include "nix/profiles.hh" +#include "nix/names.hh" +#include "nix/url.hh" +#include "nix/flake/url-name.hh" #include #include #include -#include "strings.hh" +#include "nix/strings.hh" using namespace nix; diff --git a/src/nix/realisation.cc b/src/nix/realisation.cc index e4b42510f46..4b63e4741d4 100644 --- a/src/nix/realisation.cc +++ b/src/nix/realisation.cc @@ -1,5 +1,5 @@ -#include "command.hh" -#include "common-args.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" #include diff --git a/src/nix/registry.cc b/src/nix/registry.cc index ee45162302c..f464ab02f6a 100644 --- a/src/nix/registry.cc +++ b/src/nix/registry.cc @@ -1,11 +1,11 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "eval.hh" -#include "flake/flake.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "registry.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/flake/flake.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/registry.hh" using namespace nix; using namespace nix::flake; diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 5a570749f4c..fb895445587 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -1,11 +1,11 @@ -#include "eval.hh" -#include "eval-settings.hh" -#include "config-global.hh" -#include "globals.hh" -#include "command.hh" -#include "installable-value.hh" -#include "repl.hh" -#include "processes.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/config-global.hh" +#include "nix/globals.hh" +#include "nix/command.hh" +#include "nix/installable-value.hh" +#include "nix/repl.hh" +#include "nix/processes.hh" #include "self-exe.hh" namespace nix { diff --git a/src/nix/run.cc b/src/nix/run.cc index 897824d68cd..0345fab9aa4 100644 --- a/src/nix/run.cc +++ b/src/nix/run.cc @@ -1,20 +1,20 @@ -#include "current-process.hh" +#include "nix/current-process.hh" #include "run.hh" -#include "command-installable-value.hh" -#include "common-args.hh" -#include "shared.hh" -#include "signals.hh" -#include "store-api.hh" -#include "derivations.hh" -#include "local-fs-store.hh" -#include "finally.hh" -#include "source-accessor.hh" -#include "eval.hh" +#include "nix/command-installable-value.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" +#include "nix/local-fs-store.hh" +#include "nix/finally.hh" +#include "nix/source-accessor.hh" +#include "nix/eval.hh" #include #if __linux__ # include -# include "personality.hh" +# include "nix/personality.hh" #endif #include diff --git a/src/nix/run.hh b/src/nix/run.hh index 51517fdc94a..eb670319ca5 100644 --- a/src/nix/run.hh +++ b/src/nix/run.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/nix/search.cc b/src/nix/search.cc index 9975907de01..ab46c2f5174 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -1,22 +1,22 @@ -#include "command-installable-value.hh" -#include "globals.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "names.hh" -#include "get-drvs.hh" -#include "common-args.hh" -#include "shared.hh" -#include "eval-cache.hh" -#include "attr-path.hh" -#include "hilite.hh" -#include "strings-inline.hh" +#include "nix/command-installable-value.hh" +#include "nix/globals.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/names.hh" +#include "nix/get-drvs.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/eval-cache.hh" +#include "nix/attr-path.hh" +#include "nix/hilite.hh" +#include "nix/strings-inline.hh" #include #include #include -#include "strings.hh" +#include "nix/strings.hh" using namespace nix; using json = nlohmann::json; diff --git a/src/nix/self-exe.cc b/src/nix/self-exe.cc index 77d20a835e3..c9ab566cec7 100644 --- a/src/nix/self-exe.cc +++ b/src/nix/self-exe.cc @@ -1,6 +1,6 @@ -#include "current-process.hh" -#include "file-system.hh" -#include "globals.hh" +#include "nix/current-process.hh" +#include "nix/file-system.hh" +#include "nix/globals.hh" #include "self-exe.hh" namespace nix { diff --git a/src/nix/sigs.cc b/src/nix/sigs.cc index 10b99b45231..bbdc330026c 100644 --- a/src/nix/sigs.cc +++ b/src/nix/sigs.cc @@ -1,8 +1,8 @@ -#include "signals.hh" -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "thread-pool.hh" +#include "nix/signals.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/thread-pool.hh" #include diff --git a/src/nix/store-copy-log.cc b/src/nix/store-copy-log.cc index a6e8aeff7cb..7dde15dfa43 100644 --- a/src/nix/store-copy-log.cc +++ b/src/nix/store-copy-log.cc @@ -1,10 +1,10 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "log-store.hh" -#include "sync.hh" -#include "thread-pool.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/log-store.hh" +#include "nix/sync.hh" +#include "nix/thread-pool.hh" #include diff --git a/src/nix/store-delete.cc b/src/nix/store-delete.cc index 6719227dfe7..3d73b7b9a2a 100644 --- a/src/nix/store-delete.cc +++ b/src/nix/store-delete.cc @@ -1,9 +1,9 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" using namespace nix; diff --git a/src/nix/store-gc.cc b/src/nix/store-gc.cc index 8b9b5d1642a..a8ea3f2fa0f 100644 --- a/src/nix/store-gc.cc +++ b/src/nix/store-gc.cc @@ -1,9 +1,9 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" using namespace nix; diff --git a/src/nix/store-info.cc b/src/nix/store-info.cc index 8d20a15cbce..bcb9d56aa0e 100644 --- a/src/nix/store-info.cc +++ b/src/nix/store-info.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "finally.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/finally.hh" #include diff --git a/src/nix/store-repair.cc b/src/nix/store-repair.cc index 895e3968507..cd63a836a1a 100644 --- a/src/nix/store-repair.cc +++ b/src/nix/store-repair.cc @@ -1,5 +1,5 @@ -#include "command.hh" -#include "store-api.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" using namespace nix; diff --git a/src/nix/store.cc b/src/nix/store.cc index 79b41e0965e..ccf02c22e1d 100644 --- a/src/nix/store.cc +++ b/src/nix/store.cc @@ -1,4 +1,4 @@ -#include "command.hh" +#include "nix/command.hh" using namespace nix; diff --git a/src/nix/unix/daemon.cc b/src/nix/unix/daemon.cc index fd572ce3030..5da068a7007 100644 --- a/src/nix/unix/daemon.cc +++ b/src/nix/unix/daemon.cc @@ -1,20 +1,20 @@ ///@file -#include "signals.hh" -#include "unix-domain-socket.hh" -#include "command.hh" -#include "shared.hh" -#include "local-store.hh" -#include "remote-store.hh" -#include "remote-store-connection.hh" -#include "serialise.hh" -#include "archive.hh" -#include "globals.hh" -#include "config-global.hh" -#include "derivations.hh" -#include "finally.hh" -#include "legacy.hh" -#include "daemon.hh" +#include "nix/signals.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/local-store.hh" +#include "nix/remote-store.hh" +#include "nix/remote-store-connection.hh" +#include "nix/serialise.hh" +#include "nix/archive.hh" +#include "nix/globals.hh" +#include "nix/config-global.hh" +#include "nix/derivations.hh" +#include "nix/finally.hh" +#include "nix/legacy.hh" +#include "nix/daemon.hh" #include "man-pages.hh" #include @@ -35,7 +35,7 @@ #include #if __linux__ -#include "cgroup.hh" +#include "nix/cgroup.hh" #endif #if __APPLE__ || __FreeBSD__ diff --git a/src/nix/upgrade-nix.cc b/src/nix/upgrade-nix.cc index 398e533ce48..2852858569d 100644 --- a/src/nix/upgrade-nix.cc +++ b/src/nix/upgrade-nix.cc @@ -1,13 +1,13 @@ -#include "processes.hh" -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "filetransfer.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "attr-path.hh" -#include "names.hh" -#include "executable-path.hh" +#include "nix/processes.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/filetransfer.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/attr-path.hh" +#include "nix/names.hh" +#include "nix/executable-path.hh" #include "self-exe.hh" using namespace nix; diff --git a/src/nix/verify.cc b/src/nix/verify.cc index 52585fe08d5..0adfec89527 100644 --- a/src/nix/verify.cc +++ b/src/nix/verify.cc @@ -1,13 +1,13 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "thread-pool.hh" -#include "signals.hh" -#include "keys.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/thread-pool.hh" +#include "nix/signals.hh" +#include "nix/keys.hh" #include -#include "exit.hh" +#include "nix/exit.hh" using namespace nix; diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc index ae5c45ae3e9..fe8f3ecc37c 100644 --- a/src/nix/why-depends.cc +++ b/src/nix/why-depends.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "store-api.hh" -#include "source-accessor.hh" -#include "shared.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/source-accessor.hh" +#include "nix/shared.hh" #include diff --git a/src/perl/lib/Nix/Store.xs b/src/perl/lib/Nix/Store.xs index cfc3ac034a3..f368a2e42ca 100644 --- a/src/perl/lib/Nix/Store.xs +++ b/src/perl/lib/Nix/Store.xs @@ -1,5 +1,5 @@ -#include "config-util.hh" -#include "config-store.hh" +#include "nix/config-util.hh" +#include "nix/config-store.hh" #include "EXTERN.h" #include "perl.h" @@ -9,11 +9,11 @@ #undef do_open #undef do_close -#include "derivations.hh" -#include "realisation.hh" -#include "globals.hh" -#include "store-api.hh" -#include "posix-source-accessor.hh" +#include "nix/derivations.hh" +#include "nix/realisation.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/posix-source-accessor.hh" #include #include diff --git a/tests/functional/plugins/meson.build b/tests/functional/plugins/meson.build index 13acdbbc574..cee43f0b575 100644 --- a/tests/functional/plugins/meson.build +++ b/tests/functional/plugins/meson.build @@ -4,9 +4,9 @@ libplugintest = shared_module( cpp_args : [ # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', ], dependencies : [ dependency('nix-expr'), diff --git a/tests/functional/plugins/plugintest.cc b/tests/functional/plugins/plugintest.cc index 7433ad19008..e3343bcbc2d 100644 --- a/tests/functional/plugins/plugintest.cc +++ b/tests/functional/plugins/plugintest.cc @@ -1,5 +1,5 @@ -#include "config-global.hh" -#include "primops.hh" +#include "nix/config-global.hh" +#include "nix/primops.hh" using namespace nix; diff --git a/tests/functional/test-libstoreconsumer/main.cc b/tests/functional/test-libstoreconsumer/main.cc index c61489af69a..7cb0da944c1 100644 --- a/tests/functional/test-libstoreconsumer/main.cc +++ b/tests/functional/test-libstoreconsumer/main.cc @@ -1,6 +1,6 @@ -#include "globals.hh" -#include "store-api.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" #include using namespace nix; diff --git a/tests/functional/test-libstoreconsumer/meson.build b/tests/functional/test-libstoreconsumer/meson.build index 7076127f70a..13a7f6d6f9b 100644 --- a/tests/functional/test-libstoreconsumer/meson.build +++ b/tests/functional/test-libstoreconsumer/meson.build @@ -4,8 +4,8 @@ libstoreconsumer_tester = executable( cpp_args : [ # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', ], dependencies : [ dependency('nix-store'),