diff --git a/doc/manual/source/development/testing.md b/doc/manual/source/development/testing.md index d0c3a1c78..ebc0e27d2 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 4c75df246..87dc1e18a 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 9f5950572..b2409de85 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 88b704288..56eb248a5 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 905e70f32..21b52cea5 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 7e0c15eb8..52fa61091 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 86d13fab7..efcdb799d 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 57e1774be..805701749 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 6bf36bd64..b82f41d2b 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 dc78d3e59..bd8f685e0 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 7880d4119..5ce352a63 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 9570ce3e7..9d3c8e343 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 c62365b32..e72175891 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 a129a957a..18319c1f2 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 8acd7011e..0a8aa48bc 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 86c2f8219..ceb2eca61 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 e0b4f18b3..8f86e6c4c 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 212403dd4..5bbe4beb5 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 4b6dbd306..f8840103f 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 c995c3019..2393cbcff 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 000000000..debe4a605 --- /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 124372af7..b8579e90f 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 0b6856acb..ca797f465 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 cc70efd07..463ba6818 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 11d1820f5..b22fb9438 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 8917e7a01..dfd7bdd65 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 abacd7350..2e53f6198 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 6c9ee6748..f4c272515 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 1aa2e65c1..ac2da0ed2 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 81eb883da..f1eaa71e9 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 6df09ee37..25da75d3f 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 faf4c6610..5670b590b 100644 --- a/src/libcmd/markdown.cc +++ b/src/libcmd/markdown.cc @@ -1,8 +1,8 @@ -#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" diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build index 70d3b95da..727f4e14d 100644 --- a/src/libcmd/meson.build +++ b/src/libcmd/meson.build @@ -61,9 +61,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', language : 'cpp', ) @@ -88,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 4e29e8981..70933648f 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 738bf6147..31e9eb8dd 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 d459d1c20..5cfe550a3 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 d8c8dd99d..773e111b2 100644 --- a/src/libcmd/repl-interacter.cc +++ b/src/libcmd/repl-interacter.cc @@ -16,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 38b219643..8bd5417d7 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 "nix/error.hh" +#include "nix/repl-interacter.hh" +#include "nix/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 "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 "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libexpr-c/meson.build b/src/libexpr-c/meson.build index 8405525ca..8b00b8d70 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 1df8acd1e..c7682c792 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 f59664011..205a2ee62 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 d673bcb0b..7f4cd6a8c 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 6c524b975..f4a327281 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 448f4a58a..3116cb59f 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 711b0adbc..7cd6ad180 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 000000000..9e517c7f6 --- /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 095ea1d0e..dfd5fbd3d 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 "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 "tests/libstore.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 6ddca0d14..e5960b177 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 8c68c78bb..d98e72242 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 56e814cd1..b68adb2c2 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 44b0ff386..5d4af1088 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 36837cd6a..7b2d60269 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 634f9bf69..1e427ffa5 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 53013a34a..abba15db8 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 61f6be0db..3bc672746 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 f4cc118d6..67fdcf209 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 e3412d9ef..719b5a727 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 9f6edb9b3..3fc726cb2 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 633224ae6..903c7a239 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 27bef9a6a..49a86b826 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 7fc8b4f64..0f86ba650 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 2bf726477..4114f08f6 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 080679355..72f233597 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 d77b4d53b..4ddd24d12 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 c8d62772f..bf3b501f4 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 43b545035..8590f9aac 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 5762d5891..9f91f8ff5 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 822ec7620..8dde64790 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 866ef817a..c6fc9f32a 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 ea3319f99..f35c332c9 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 58a5d951a..d80fa473e 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 07ce05a2c..defa4e9d2 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 b54afdce1..458507db8 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 2dcee49d9..f534cc494 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 c6057b384..9c6e54e4b 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 1ac13fcd2..61b44aa17 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 eb00ffb93..06d00efc2 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 4df9a1acd..93360e4e3 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 b1911e3a4..899ae715b 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 b4e5007b0..ebed23dbb 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 5d1a0c4d6..c00b06006 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 d16fd4035..48d8a544b 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 8bb8bbd32..42091b9ba 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 91439b0aa..59743fe79 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 8330dd2dc..2becffe7c 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 e4e277af8..aeb70c79e 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 3c8fa5cc0..a2e0d303d 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 000000000..d712cc798 --- /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 88ebc80f8..deb26dd29 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 21a880e8e..aa3c2455d 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 9f76975db..75c6f0d46 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 50c260a9b..06f4e805c 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 7ddda81b8..09405e8f0 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 acd843638..22a97b5f3 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 be12f6248..b55674b12 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 867c4e3a8..9875c83c6 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 6d702c0f2..3e9dce4d6 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 8925693e3..45155b3d4 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 d6791c6e4..f996cce42 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 17cab7ad5..d5da3f2b1 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 d9eeb73e2..9eb4502fc 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 067f86e01..c8a5ec9fd 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 040da3dbc..3fd4dca7f 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 f17226728..e5289de6a 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 141b77fac..8f309b14e 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 dc58e8d53..27fec4c51 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 3d602ae2d..5aae69f9d 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 05c8ed3df..2e2f2c18e 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 ede7d97ba..832d17cbb 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 04b8d0595..fc48c54ee 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 64e3abf2d..59698552e 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 bd013eab2..b14d54113 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 404425054..05fe2e7bd 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 a40c98643..b275e1e5c 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 d62aaf25f..39f97e68b 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 657744e74..8c33430f1 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 5aa4fe4fd..846776aed 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 9734ebec4..e4df226a4 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 6d9633268..2052e193a 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 5f4ceedaa..25c3e6b5f 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 ee6ef1734..e41db0b5b 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 b60ff5675..80f99c859 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 80796bd0f..98965cf79 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 25d04cdc9..68e5e932b 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 6c2241f3a..089c8d6f3 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 c7ed4c7af..bdd095538 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 fe347a59d..2be08feaf 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 abf021554..068a6722f 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 d4557b6d4..1a9c8ae6b 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 bd6c01435..9f48d1e98 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 2217595a5..a4adbdea9 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 4e8f5808d..f41e8e863 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 ea4dbe338..80b7e7156 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 97a74bce0..f1fdee35f 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 4d834fe0c..592401785 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 c6c3ca7a7..811e27b30 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 c762629f3..7ef809c1c 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 01354a6e3..07a9adfbe 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 1f8d84e53..04855c070 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 36df91962..cd7c86a82 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 c683bd058..65c86a7c4 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 000000000..eb02be43c --- /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 8f47e1590..7c091ea12 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 989cf3fa2..8e65fda11 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 2042041d5..63a217124 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 0e1b86711..7e5eb0be3 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 61cbca202..73e677f44 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 f8efbc8d3..aaf52ff74 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 3f52e9878..aaeaa4b5d 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 bdc7538e2..95bc2ce50 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 c18e12d23..ec470159b 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 528bf2a4f..997582b57 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 699612e25..01bff82f7 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 469e0ade4..ec754dfaa 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 2479bf2e0..a1b586e82 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 4c154a342..4565b4f5d 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 2b1f5124b..f378ba6d6 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 1c8765f21..4012582f2 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 9aa7773a0..eb6de4e6e 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 15bc6b111..c795850f9 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 4879de463..a0ddf0387 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 98ebdee5f..508274dbd 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 183259137..8bf9fa196 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 4fc720eb5..340fe4dc7 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 b0971a696..08a384366 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 cac7c4384..bab7f9439 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 d62b34552..3e3311cf7 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 203060563..07be75123 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 d7a151587..2fa385060 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 d3c15018e..93ebaa497 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 cbc6d01eb..97bd7a495 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 5f0d9fb21..54f501e11 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 6f32754d2..4577e8f38 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 000000000..023bd64bd --- /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 b780722de..e231de9c1 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 d7250c252..683880b20 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 0e9380a12..0229ef86b 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 692d53f47..61dbceff8 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 0e347d26f..090d8b464 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 7481702f6..f7b2e2d1c 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 98b287fa7..dabdae83c 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 000000000..8584b9042 --- /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 fc1b0fe78..195c5ceee 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 a6a18ceb0..8144ad845 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 07d83a960..1cf7c6dcf 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 7c24abb29..08b0bdb4f 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 c03697c48..31b36dbcf 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 ccfd7f900..db1067c1a 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 2d4d901db..eb4db83e6 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 bc2ffc9ba..639977efc 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 10f71c1dc..b4ec5967e 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 2e2275fee..f7e192f3a 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 bc306e0d0..ab0af1f52 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 13db0c07c..e32cdfcca 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 b9f6a3171..4c04facce 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 000000000..ed3e4f2ff --- /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 98d61f228..57cad487c 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 699ba957e..02e818f97 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 b7d5c2c33..f418b563d 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 f5bf9042d..14a74d2e4 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 4751b3373..eebcda28e 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 3f6799d1c..6c7d69adb 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 59d649889..c7d9689bf 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 1a3020f17..e1b987720 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 ccac25ee1..c223ad116 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 8ddda8027..945230187 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 c8f6dd002..39293b0c0 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 72eb84fec..428ebcd76 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 107cf13e3..d8f9642ab 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 "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 "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/derivation.cc b/src/libstore-tests/derivation.cc index 14652921a..5ef1c0094 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 97ded5183..e6a2fcace 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 fd29530ac..76c6410ad 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 1e415f625..bc4e52936 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 eb31a2408..5a23cf5b2 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 2e840228d..8adc22202 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 b34ca9237..8e9d25bc3 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 abc3ea796..8977234a3 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 2d66e9534..219494f16 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 9f3d8e1d4..0dcfeaacd 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 b4bdb8329..b15ee351a 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 0d155743d..544680914 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 a8b7b8e5f..b7d9860fb 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 63cde681b..007e5a935 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 d6c4c2a7f..df3b60f13 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 c4c055abf..bcfce2c9f 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 d91d1cedd..da4b7af39 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 7aa5f2f2c..99db360ce 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 3dbbf3879..dd53b80d6 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 b853a5f1f..1c54a229e 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 d4c42f0fd..f8e533fa0 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 5ccb20871..7157bfbfd 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 99b042d5b..0a417ed3e 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 896779f85..48c449e79 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 96cbfd62f..72ad11fae 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 1309c313c..b99d2770d 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 a5926be87..bc410be92 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 3bf22320e..70b32d3ad 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 6628d7d8e..04eea96c9 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 c36b77293..7f5790e5a 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 bab3bd470..964291464 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 0f7bcd99b..4145593cf 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 90e58dfdb..28af8427c 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 43fbb62cd..9e76ee7d3 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 fc2b5ac6f..4845d5873 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 05332b9bb..d4123e326 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 e1cdfece6..a3745b4ef 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 60cb64b7b..bce285141 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 1fc1718f7..8683fd8ad 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 c31c801c2..794ce6b6e 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 c97d52773..cb6d98d5a 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 3e3318965..c02d78115 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 91d47f946..52c46ddee 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 c1e871e93..b922b30a6 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 1c62cdfad..efec2a409 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 7d55cc43b..42c781ca2 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 0a86a9d0d..dc71d17e8 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 d7c000dfa..4f8c53ca8 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 f32616f94..a8d77f753 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 6bd7fd14a..ec012cda8 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 8c66cfeb3..20d726346 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 26391b744..ec34fd3cf 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 63d1cd2f8..37c860d5f 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 6054975d7..61cba972f 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 f2cf797e5..c8139025c 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 f5e617208..467e258df 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 091946e01..5943ae507 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 8e112e176..00fc3bf90 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 360882c02..71d5fc015 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 a878e84c9..260f19256 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 5deb6f4c9..54aa8cb5e 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 2b5d1296a..6a2cbb1ef 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 a8ce32d8d..38df57967 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 6e4ea5cd9..459b7de78 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 7b62b81ba..a01083332 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 bd60fe887..24c5ca3d7 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 23f9c2b30..f50ca6e94 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 c911ecea2..eb6662d3b 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 0ecc7f376..31ad1aabd 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 020f770b0..f5f685540 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 c539ff836..bda883890 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 d2fc43210..9dadda4d3 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 b74ebc1ee..de4de138b 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 3da19493f..ae0fa8d02 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 92aa4ae56..9c4a9230d 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 7e977bbf1..ad7b32793 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 997e8ecbb..acff6621d 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 9bb569f0b..2a5f6e3e7 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 63628abed..1cee3cc9f 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 680318d43..917c7ad21 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 a84f7dbeb..5cd8a9f88 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 b70ab9078..6cd1853a5 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 60bb2b477..75fe4462f 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 000000000..b8f145679 --- /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 a6909d545..f11c22b1c 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 0043897c6..b64330547 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 bbd1d05d5..3a301f7e8 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 561c9a863..117be878f 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 30d15311d..324d3a334 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 51992fa84..34e254e0d 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 9a4c466a8..45c411ddd 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 0553003f8..0b5e42764 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 5f76a583a..e2ff303f2 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 902262362..56cd5aeb7 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 42a84a1a3..68f5a0262 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 45a4f3f20..1309db098 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 33fcf04b3..85f45cb73 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 ddb4af770..2d868980c 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 d09762a53..5abb195ee 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 f8549d0b2..5b11a04f7 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 ea6cd471e..ebc9b2a81 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 7d303a115..a0ca22bbb 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 18de115ae..367c41d36 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 73bf71443..f1a9e1ede 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 099eade64..2621d3b42 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 8c112bb74..a8587f618 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 037380b71..4143fa8a4 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 29a2a8b2c..34ec4f79e 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 eb05df011..fa046d6de 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 1ae4ac064..c25329fd6 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 2473e72c5..4e6691016 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 fd4332b91..66e084a24 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 7100a1db0..922640fe0 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 a8e571664..0a2e3fe9f 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 c2f446db1..a1a4668f2 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 87398df90..902d21542 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 c356fa1bf..175ddf01f 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 844d0d6ed..1b51cbe15 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 668725fc7..1b2a612a2 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 480f41059..bc2794499 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 000000000..f37370c6f --- /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 0c494b5d6..b9a2aed21 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 255d174a6..bbff765de 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 dcc6affe4..90a770ab0 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 5449b20eb..2798899fa 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 56ff6bef3..c2cc329b4 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 a9459d098..45e0d1b62 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 8a26832ab..b2c2ff16a 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 eb729b697..7710ae99b 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 a3130d7cc..c7d44b1a9 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 b32a15037..7dfbe19df 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 9d3b24326..ef08f4af7 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 c0e1b1022..2842bf3fb 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 c4e0b137b..7fe2e7ecb 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 80e8d3414..acb7bd3bf 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 27fcc2864..176332a4a 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 aeff24c64..c2cda58e7 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 b623a975c..7d56a7afd 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 f992684df..553bc043e 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 b26c36efe..0e8f9ba95 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 6e87e60f4..574ada7ac 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 15f52ec9d..a5aa8f48f 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 e526b1ff6..87f7c6a72 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 3e9d05477..d1eb02e70 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 c855e797f..36bee6741 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 46a78cc86..5fddae42f 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 46efedfe3..19358f136 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 86bfdd1a8..63b156b30 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 7e360b5fe..2b3f0675d 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 cd807991b..b71d179b7 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 42e81765d..cb45838a5 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 cfa713b00..69ebad75b 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 07379999b..577297af8 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 08bfad9e4..0e2a3bc9d 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 f02e472fd..1f9622255 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 954a97467..dc889cb39 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 70e6d5dfe..86b6eda7c 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 172c82324..29ac59168 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 b4968dfad..610e70f99 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 3c445eb13..b41eae39c 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 aa31c3caf..c19d1e646 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 79eb25a91..5407bef14 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 859663b68..0643d7ff8 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 61cf534f4..b82a51183 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 7659e8f99..a5c8d36c5 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 000000000..b07787c0a --- /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 d9d190131..7c80aa1a1 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 1ec4579ec..3cc24c859 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 29f4b2cb3..4426f0768 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 29a98d8e2..0161a8c32 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 6585df4be..a30e808a7 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 f06fb2893..e99723652 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 2733a33ba..cd53bc585 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 3e061d53e..483c5484a 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 7fa4252ac..362d8c59a 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 51b9663b4..3614b42b3 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 000000000..6490d19ac --- /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 5e790e75b..f90793633 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 1f9fa59ae..b965ac1a2 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 895ac3664..f5d38d0f8 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 db944cf06..f235af9eb 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 fafd47c86..033758d7b 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 7a13bd4ff..25781dc60 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 122a09dcb..52b081fb8 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 950224430..abcc85641 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 7f91308af..6ef6d3c99 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 75018660d..4d98344fb 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 868d11f6f..16dedc63f 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 7597e7807..b6b777bcc 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 bbbf3500f..7c7dfbd7b 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 886e70da5..aae410d2b 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 8d182357d..041209882 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 27d926a87..686114a9f 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 a8c31a00e..363f71b7a 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 048956a58..b91d5019b 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 3a639aef9..1ba69a573 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 5ef581888..e571a9bf6 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 704a4acb0..b8722bd30 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 1d7304f05..ca89ee02f 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 091d3d5ed..98763588a 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 7b77bd87f..f768de011 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 127e42dda..8402768d3 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 484ecc247..0726b89c0 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 9033595e8..5d1435e3a 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 c3efa6d51..362629b55 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 c617acae0..502d4e90b 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 33a1fae9b..26b99263b 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 279994abc..36d0b7169 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 f4fc6e770..3d3296cc3 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 7e1d2aa15..89a461c2c 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 a3f7c720a..53b7cd208 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 adcde25c9..7fc1f3154 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 20d8a1e09..2c7c91dd0 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 05ecf724e..184318cc4 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 03db6378a..c6f48ac32 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 d27028565..788ad7109 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 f06025253..9c19faec2 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 3ed1dd1d3..b325d09e7 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 ca8480304..b108dd58a 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 255ae2cf5..11655c55c 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 8c93c9156..9ccc7ed3b 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 5947cf742..f2948807a 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 ccd008c7c..bd0baaeff 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 8d665c7df..24e3484f2 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 73cd8b04e..e177cfa31 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 158e202d1..c05c3e9ec 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 69301d9c8..71eb34611 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 707c0f882..2af1364b1 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 b1a370d7a..5ae326ec6 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 fadba5972..5e7c2e9fd 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 3303dbc32..696f86d0b 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 6a7a8b092..22eca6014 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 e5088230d..6d843e091 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 eea687d8a..313b18faf 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 c38fa8a46..9131f49fa 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 c30d6cef8..987d14f9e 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 34a43b538..bb83b85a5 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 4709679a6..34d5bbb1d 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 16e3b93e4..c8fc7c9a4 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 e0c531b1f..25f479e48 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 093e7a915..d77eece93 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 2caf51524..b0e8ad2ce 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 94c2cb2e4..b02e27f50 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 502d2823e..f4135af64 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 660dcfe0b..d98f4e752 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 1a95f5c97..9a5f364a3 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 04fa18e35..6ac4497cb 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 cbbe80c4e..dc14691e2 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 c5cfa1c39..3af4a24cf 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 1d02ba94d..946bb65b3 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 226068387..c56debd2b 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 fde362999..785756a0f 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 8e4a88b9d..15bceac13 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 31dcc5e6b..b29ab17cb 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 850b7162d..45d9f43b7 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 5c5073731..30803e63e 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 1a6a7c333..2dc1bb796 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 13d526f42..3c9adebac 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 b26163a04..9dd344c50 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 1afc5d796..96ffcd3c0 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 e5a7a833f..c83ad2316 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 012a388c0..08ab3f2d4 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 000000000..798d49828 --- /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 53ac39170..e4d6a74a3 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 b2ceb7143..65b789ba0 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 a6fe09d79..9f4ff2e0b 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 07e261c4c..34457a824 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 5d491e633..d81e9246c 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 bbbe7dcab..80ea14223 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 8bc9f7ec9..b608f7015 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 14721d069..ef49a43b6 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 8bff345c3..b4953525e 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 9977f0dac..368976b11 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 e50170fe2..3eeb75608 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 79ae092ac..5efc177fc 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 fc2288f74..119a67016 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 3b9b2b83b..2d7c490b1 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 25b8e0ff6..38cf285e0 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 e39ab400c..5517c20a6 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 d340f3d97..25c062ac8 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 5e29c6bba..aea91f90e 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 4adc48657..e3b2a29b9 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 a52811fbf..ed37ca01e 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 ba2baeb13..87508f9e4 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 2b12f5af2..071d5092f 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 d22c3311d..d48b8b9bf 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 0d55cf93b..7ece2bd7b 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 f67811e21..aff8abb9a 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 ad3e8a017..7b3c3fa3b 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 87d135ba6..91c7de9d1 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 000000000..285c1489b --- /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 208920b80..3eb5f6a14 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 a1ded76ca..40907ed0d 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 c5e21dffc..a53734a2f 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 1b0b2d0d9..0411a039d 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 c4eee1031..7c8414fb0 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 3c0cb0d6b..0bc147dcf 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 79223d155..aa00cbd8e 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 8114dd645..0c410dfab 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 8178beb90..59234e3fc 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 275985c8c..515be245b 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 70ad6474f..5da9fa623 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 b30e62c7b..46c22c09c 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 d612c11b2..415ccf3a0 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 70bcb5f33..86d3dfe3c 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 0d26867b5..4a61b67eb 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 78f038cf3..738d7f2f1 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 759d3c355..12150c223 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 1635321bb..43c9a0815 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 84c8e296f..0f593ada0 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 9e54c9be2..aec05e092 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 8a8373f1b..233edabb4 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 0725c1926..6b7f2d017 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 eec0850c2..e24d6f2bd 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 1707fdb75..831dd666c 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 cd7c8f5e5..9814cbcc2 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 a02a53b1e..566675349 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 cccee86a1..3dd613972 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 bbbbfa559..119e8a277 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 000000000..5f3095ab1 --- /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 c1f8705eb..720cbb937 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 037416e7d..a63e03725 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 1c5bf27fb..1373ed17a 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 0104663c3..e81f47bc0 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 8378afde2..e97308a4a 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 da198bed4..032992a2f 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 d0608dace..168b33bfb 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 107a6e04f..1ba194d71 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 8fb1eecfb..f042d3b0f 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 b4bc67cbc..d4fb08ab5 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 ed5c7e4f1..37f30d91f 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 2ed086c60..e1f41f8d2 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 e2a473a7c..7f77cae89 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 7405c426b..5079bcbcd 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 7ed1c04a6..22f1f89ab 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 000000000..898b7db89 --- /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 26d2600bf..fcdf18276 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 53715e260..55f6ea31d 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 66c67b43a..c07d61609 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 1c645fe05..2423c77ea 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 ac2882120..d9a3e2ca5 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 b09ef8b90..b9aff210b 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 90cb1f5f5..cdb659a79 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 438c4221c..1d49e667b 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 4e139d5cf..77ccd9e3f 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 b92f9155f..8c523e403 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 7993bee9a..78a40ef64 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 a5ae12a12..065a3b3e8 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 ee61db994..33efb8918 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 a060a01fd..c6f996f20 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 15bff0a0a..8094925dc 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 aa1edb4c8..c02c27d36 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 ee62077c0..81abefc2f 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 15da3fcb3..8ec124d07 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 0cf926369..d4765952b 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 2c530999b..0cab46656 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 4fd944080..cb4041f8e 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 3e789a2d8..1eb2ccdf6 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 bd3a4a37c..2989733d7 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 d182b1eee..7bdf3b1a3 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 7f15de374..6c71dc69f 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 935ed18ec..2b6c22269 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 120facf59..80cf5ddad 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 5b7862c4e..613383939 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 214d256e9..11de32b40 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 a72b06542..bc23fd7be 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 d77f5db69..6a34faaec 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 399a6c0fd..0ed99df53 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 8ffd436ac..65687f79e 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 4d91d4538..da52ac14c 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 f0b9390fb..038fa5f96 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 59a78d378..6e0d28d9a 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 ca3bfc50d..c8bfc06fb 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 2bc7fe82b..042da8d3a 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 98a059fa1..bf82de846 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 49807da9e..770bbfc71 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 832320320..982120252 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 b88588081..09623abc7 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 6526f75b4..f263601d0 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 f444d6add..e49f76084 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 91bba47f4..db937283a 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 6e23188db..ee37cd03c 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 63f97f2d3..c5a1c4504 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 188d424bc..3d57263df 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 2d58377ed..39218124d 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 e9e89bb62..993ef28e1 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 1ad53c807..adcf80a25 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 8ad4f92a7..ba815551d 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 985006e5a..ac1b03f60 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 7f7cda8d3..060231d02 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 3246d3751..31a8f0ad4 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 8467a4e89..8ee9b5f72 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 f10d06747..ef6957874 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 e4b42510f..4b63e4741 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 ee4516230..f464ab02f 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 5a570749f..fb8954455 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 897824d68..0345fab9a 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 51517fdc9..eb670319c 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 9975907de..ab46c2f51 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 77d20a835..c9ab566ce 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 10b99b452..bbdc33002 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 a6e8aeff7..7dde15dfa 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 6719227df..3d73b7b9a 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 8b9b5d164..a8ea3f2fa 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 8d20a15cb..bcb9d56aa 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 895e39685..cd63a836a 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 79b41e096..ccf02c22e 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 fd572ce30..5da068a70 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 398e533ce..285285856 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 52585fe08..0adfec895 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 ae5c45ae3..fe8f3ecc3 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 cfc3ac034..f368a2e42 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 13acdbbc5..cee43f0b5 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 7433ad190..e3343bcbc 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 c61489af6..7cb0da944 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 7076127f7..13a7f6d6f 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'),