From 7066309fa3a40a9b7ccce134082db0be3f6a0172 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 20 Feb 2025 14:15:07 -0500 Subject: [PATCH] WIP --- nix-meson-build-support/export/meson.build | 1 - src/build-remote/build-remote.cc | 26 +++--- src/libcmd/built-path.cc | 8 +- src/libcmd/command-installable-value.cc | 2 +- src/libcmd/command.cc | 20 ++-- src/libcmd/common-eval-args.cc | 34 +++---- src/libcmd/editor-for.cc | 6 +- src/libcmd/installable-attr-path.cc | 36 +++---- src/libcmd/installable-derived-path.cc | 4 +- src/libcmd/installable-flake.cc | 38 ++++---- src/libcmd/installable-value.cc | 6 +- src/libcmd/installables.cc | 48 +++++----- src/libcmd/legacy.cc | 2 +- src/libcmd/markdown.cc | 10 +- src/libcmd/meson.build | 39 ++------ src/libcmd/misc-store-flags.cc | 2 +- src/libcmd/network-proxy.cc | 4 +- src/libcmd/{ => nix}/built-path.hh | 4 +- .../{ => nix}/command-installable-value.hh | 4 +- src/libcmd/{ => nix}/command.hh | 10 +- src/libcmd/{ => nix}/common-eval-args.hh | 8 +- .../{ => nix}/compatibility-settings.hh | 2 +- src/libcmd/{ => nix}/editor-for.hh | 4 +- src/libcmd/{ => nix}/installable-attr-path.hh | 32 +++---- .../{ => nix}/installable-derived-path.hh | 2 +- src/libcmd/{ => nix}/installable-flake.hh | 4 +- src/libcmd/{ => nix}/installable-value.hh | 4 +- src/libcmd/{ => nix}/installables.hh | 12 +-- src/libcmd/{ => nix}/legacy.hh | 0 src/libcmd/{ => nix}/markdown.hh | 0 src/libcmd/nix/meson.build | 28 ++++++ src/libcmd/{ => nix}/misc-store-flags.hh | 4 +- src/libcmd/{ => nix}/network-proxy.hh | 2 +- src/libcmd/{ => nix}/repl-interacter.hh | 4 +- src/libcmd/{ => nix}/repl.hh | 2 +- src/libcmd/repl-interacter.cc | 12 +-- src/libcmd/repl.cc | 56 +++++------ src/libexpr-c/meson.build | 6 +- src/libexpr-c/nix_api_expr.cc | 10 +- src/libexpr-c/nix_api_expr_internal.h | 10 +- src/libexpr-c/nix_api_external.cc | 12 +-- src/libexpr-c/nix_api_external.h | 7 +- src/libexpr-c/nix_api_value.cc | 16 ++-- src/libexpr-c/nix_api_value.h | 7 +- src/libexpr-test-support/meson.build | 14 +-- src/libexpr-test-support/nix/meson.build | 9 ++ .../{ => nix}/tests/libexpr.hh | 20 ++-- .../{ => nix}/tests/nix_api_expr.hh | 2 +- .../{ => nix}/tests/value/context.hh | 2 +- .../tests/value/context.cc | 4 +- src/libexpr-tests/derived-path.cc | 4 +- src/libexpr-tests/error_traces.cc | 2 +- src/libexpr-tests/eval.cc | 4 +- src/libexpr-tests/json.cc | 4 +- src/libexpr-tests/main.cc | 4 +- src/libexpr-tests/meson.build | 6 +- src/libexpr-tests/nix_api_expr.cc | 6 +- src/libexpr-tests/nix_api_external.cc | 4 +- src/libexpr-tests/nix_api_value.cc | 6 +- src/libexpr-tests/primops.cc | 6 +- src/libexpr-tests/search-path.cc | 2 +- src/libexpr-tests/trivial.cc | 2 +- src/libexpr-tests/value/context.cc | 6 +- src/libexpr-tests/value/print.cc | 6 +- src/libexpr-tests/value/value.cc | 4 +- src/libexpr/attr-path.cc | 4 +- src/libexpr/attr-set.cc | 4 +- src/libexpr/eval-cache.cc | 14 +-- src/libexpr/eval-error.cc | 6 +- src/libexpr/eval-gc.cc | 12 +-- src/libexpr/eval-settings.cc | 10 +- src/libexpr/eval.cc | 45 ++++----- src/libexpr/function-trace.cc | 4 +- src/libexpr/get-drvs.cc | 10 +- src/libexpr/json-to-value.cc | 6 +- src/libexpr/lexer-helpers.cc | 3 +- src/libexpr/lexer.l | 6 +- src/libexpr/meson.build | 46 +-------- src/libexpr/{ => nix}/attr-path.hh | 2 +- src/libexpr/{ => nix}/attr-set.hh | 4 +- src/libexpr/{ => nix}/eval-cache.hh | 6 +- src/libexpr/{ => nix}/eval-error.hh | 4 +- src/libexpr/{ => nix}/eval-gc.hh | 0 src/libexpr/{ => nix}/eval-inline.hh | 8 +- src/libexpr/{ => nix}/eval-settings.hh | 4 +- src/libexpr/{ => nix}/eval.hh | 30 +++--- src/libexpr/{ => nix}/function-trace.hh | 2 +- src/libexpr/{ => nix}/gc-small-vector.hh | 2 +- src/libexpr/{ => nix}/get-drvs.hh | 4 +- src/libexpr/{ => nix}/json-to-value.hh | 2 +- src/libexpr/{ => nix}/lexer-helpers.hh | 0 src/libexpr/nix/meson.build | 39 ++++++++ src/libexpr/{ => nix}/nixexpr.hh | 8 +- src/libexpr/{ => nix}/parser-state.hh | 2 +- src/libexpr/{ => nix}/pos-idx.hh | 0 src/libexpr/{ => nix}/pos-table.hh | 6 +- src/libexpr/{ => nix}/primops.hh | 2 +- src/libexpr/{ => nix}/print-ambiguous.hh | 2 +- src/libexpr/{ => nix}/print-options.hh | 0 src/libexpr/{ => nix}/print.hh | 4 +- src/libexpr/{ => nix}/repl-exit-status.hh | 0 src/libexpr/{ => nix}/search-path.hh | 4 +- src/libexpr/{ => nix}/symbol-table.hh | 6 +- src/libexpr/{ => nix}/value-to-json.hh | 4 +- src/libexpr/{ => nix}/value-to-xml.hh | 4 +- src/libexpr/{ => nix}/value.hh | 12 +-- src/libexpr/{ => nix}/value/context.hh | 6 +- src/libexpr/nixexpr.cc | 12 +-- src/libexpr/parser.y | 16 ++-- src/libexpr/paths.cc | 4 +- src/libexpr/primops.cc | 32 +++---- src/libexpr/primops/context.cc | 8 +- src/libexpr/primops/fetchClosure.cc | 10 +- src/libexpr/primops/fetchMercurial.cc | 14 +-- src/libexpr/primops/fetchTree.cc | 24 ++--- src/libexpr/primops/fromTOML.cc | 4 +- src/libexpr/print-ambiguous.cc | 8 +- src/libexpr/print.cc | 14 +-- src/libexpr/search-path.cc | 2 +- src/libexpr/value-to-json.cc | 8 +- src/libexpr/value-to-xml.cc | 8 +- src/libexpr/value/context.cc | 4 +- src/libfetchers-tests/git-utils.cc | 12 +-- src/libfetchers-tests/meson.build | 6 +- src/libfetchers-tests/public-key.cc | 6 +- src/libfetchers/attrs.cc | 4 +- src/libfetchers/cache.cc | 10 +- src/libfetchers/fetch-settings.cc | 2 +- src/libfetchers/fetch-to-store.cc | 6 +- src/libfetchers/fetchers.cc | 14 +-- src/libfetchers/filtering-source-accessor.cc | 2 +- src/libfetchers/git-lfs-fetch.cc | 14 +-- src/libfetchers/git-utils.cc | 18 ++-- src/libfetchers/git.cc | 34 +++---- src/libfetchers/github.cc | 24 ++--- src/libfetchers/indirect.cc | 6 +- src/libfetchers/mercurial.cc | 20 ++-- src/libfetchers/meson.build | 22 +---- src/libfetchers/{ => nix}/attrs.hh | 4 +- src/libfetchers/{ => nix}/cache.hh | 4 +- src/libfetchers/{ => nix}/fetch-settings.hh | 4 +- src/libfetchers/{ => nix}/fetch-to-store.hh | 10 +- src/libfetchers/{ => nix}/fetchers.hh | 14 +-- .../{ => nix}/filtering-source-accessor.hh | 2 +- src/libfetchers/{ => nix}/git-lfs-fetch.hh | 6 +- src/libfetchers/{ => nix}/git-utils.hh | 4 +- src/libfetchers/nix/meson.build | 15 +++ src/libfetchers/{ => nix}/registry.hh | 4 +- .../{ => nix}/store-path-accessor.hh | 2 +- src/libfetchers/{ => nix}/tarball.hh | 8 +- src/libfetchers/path.cc | 8 +- src/libfetchers/registry.cc | 14 +-- src/libfetchers/store-path-accessor.cc | 4 +- src/libfetchers/tarball.cc | 22 ++--- src/libflake-c/meson.build | 8 +- src/libflake-c/nix_api_flake.cc | 2 +- src/libflake-c/nix_api_flake_internal.hh | 4 +- src/libflake-tests/flakeref.cc | 4 +- src/libflake-tests/meson.build | 6 +- src/libflake-tests/nix_api_flake.cc | 4 +- src/libflake-tests/url-name.cc | 2 +- src/libflake/flake/config.cc | 8 +- src/libflake/flake/flake.cc | 30 +++--- src/libflake/flake/flakeref.cc | 10 +- src/libflake/flake/lockfile.cc | 10 +- src/libflake/flake/settings.cc | 2 +- src/libflake/flake/url-name.cc | 2 +- src/libflake/meson.build | 18 +--- src/libflake/{ => nix}/flake/flake.hh | 8 +- src/libflake/{ => nix}/flake/flakeref.hh | 8 +- src/libflake/{ => nix}/flake/lockfile.hh | 2 +- src/libflake/{ => nix}/flake/settings.hh | 6 +- src/libflake/{ => nix}/flake/url-name.hh | 8 +- src/libflake/nix/meson.build | 11 +++ src/libmain-c/meson.build | 6 +- src/libmain-c/nix_api_main.cc | 2 +- src/libmain/common-args.cc | 16 ++-- src/libmain/loggers.cc | 6 +- src/libmain/meson.build | 21 +---- src/libmain/{ => nix}/common-args.hh | 4 +- src/libmain/{ => nix}/loggers.hh | 2 +- src/libmain/nix/meson.build | 16 ++++ src/libmain/{ => nix}/plugin.hh | 0 src/libmain/{ => nix}/progress-bar.hh | 2 +- src/libmain/{ => nix}/shared.hh | 14 +-- src/libmain/plugin.cc | 4 +- src/libmain/progress-bar.cc | 10 +- src/libmain/shared.cc | 20 ++-- src/libmain/unix/stack.cc | 4 +- src/libstore-c/meson.build | 4 +- src/libstore-c/nix_api_store.cc | 8 +- src/libstore-c/nix_api_store_internal.h | 2 +- .../{tests => }/derived-path.cc | 2 +- src/libstore-test-support/meson.build | 21 ++--- src/libstore-test-support/nix/meson.build | 12 +++ .../{ => nix}/tests/derived-path.hh | 6 +- .../{ => nix}/tests/libstore.hh | 2 +- .../{ => nix}/tests/nix_api_store.hh | 4 +- .../{ => nix}/tests/outputs-spec.hh | 4 +- .../{ => nix}/tests/path.hh | 2 +- .../{ => nix}/tests/protocol.hh | 4 +- .../{tests => }/outputs-spec.cc | 2 +- src/libstore-test-support/{tests => }/path.cc | 8 +- src/libstore-tests/common-protocol.cc | 10 +- src/libstore-tests/content-address.cc | 2 +- .../derivation-advanced-attrs.cc | 20 ++-- src/libstore-tests/derivation.cc | 8 +- src/libstore-tests/derived-path.cc | 4 +- src/libstore-tests/downstream-placeholder.cc | 2 +- src/libstore-tests/http-binary-cache-store.cc | 2 +- src/libstore-tests/legacy-ssh-store.cc | 2 +- .../local-binary-cache-store.cc | 2 +- src/libstore-tests/local-overlay-store.cc | 2 +- src/libstore-tests/local-store.cc | 8 +- src/libstore-tests/machines.cc | 8 +- src/libstore-tests/meson.build | 4 +- src/libstore-tests/nar-info-disk-cache.cc | 4 +- src/libstore-tests/nar-info.cc | 8 +- src/libstore-tests/nix_api_store.cc | 4 +- src/libstore-tests/outputs-spec.cc | 2 +- src/libstore-tests/path-info.cc | 6 +- src/libstore-tests/path.cc | 10 +- src/libstore-tests/references.cc | 2 +- src/libstore-tests/s3-binary-cache-store.cc | 2 +- src/libstore-tests/serve-protocol.cc | 14 +-- src/libstore-tests/ssh-store.cc | 2 +- src/libstore-tests/store-reference.cc | 8 +- src/libstore-tests/uds-remote-store.cc | 2 +- src/libstore-tests/worker-protocol.cc | 14 +-- src/libstore/binary-cache-store.cc | 30 +++--- src/libstore/build-result.cc | 2 +- ...erivation-creation-and-realisation-goal.cc | 4 +- src/libstore/build/derivation-goal.cc | 36 +++---- .../build/drv-output-substitution-goal.cc | 10 +- src/libstore/build/entry-points.cc | 12 +-- src/libstore/build/goal.cc | 4 +- src/libstore/build/meson.build | 9 ++ src/libstore/build/substitution-goal.cc | 10 +- src/libstore/build/worker.cc | 20 ++-- src/libstore/builtins/buildenv.cc | 6 +- src/libstore/builtins/fetchurl.cc | 10 +- src/libstore/builtins/unpack-channel.cc | 4 +- src/libstore/common-protocol.cc | 16 ++-- src/libstore/common-ssh-store-config.cc | 4 +- src/libstore/content-address.cc | 6 +- src/libstore/daemon.cc | 36 +++---- src/libstore/derivation-options.cc | 10 +- src/libstore/derivations.cc | 22 ++--- src/libstore/derived-path-map.cc | 6 +- src/libstore/derived-path.cc | 8 +- src/libstore/downstream-placeholder.cc | 4 +- src/libstore/dummy-store.cc | 4 +- src/libstore/export-import.cc | 10 +- src/libstore/filetransfer.cc | 20 ++-- src/libstore/gc.cc | 16 ++-- src/libstore/globals.cc | 22 ++--- src/libstore/http-binary-cache-store.cc | 10 +- src/libstore/indirect-root-store.cc | 2 +- src/libstore/keys.cc | 6 +- src/libstore/legacy-ssh-store.cc | 28 +++--- src/libstore/linux/meson.build | 7 +- .../linux/{ => nix}/fchmodat2-compat.hh | 0 src/libstore/linux/nix/meson.build | 6 ++ src/libstore/linux/{ => nix}/personality.hh | 0 src/libstore/linux/personality.cc | 4 +- src/libstore/local-binary-cache-store.cc | 8 +- src/libstore/local-fs-store.cc | 14 +-- src/libstore/local-overlay-store.cc | 10 +- src/libstore/local-store.cc | 40 ++++---- src/libstore/log-store.cc | 2 +- src/libstore/machines.cc | 6 +- src/libstore/make-content-addressed.cc | 4 +- src/libstore/meson.build | 93 +------------------ src/libstore/misc.cc | 24 ++--- src/libstore/names.cc | 4 +- src/libstore/nar-accessor.cc | 4 +- src/libstore/nar-info-disk-cache.cc | 12 +-- src/libstore/nar-info.cc | 10 +- src/libstore/{ => nix}/binary-cache-store.hh | 8 +- src/libstore/{ => nix}/build-result.hh | 4 +- ...erivation-creation-and-realisation-goal.hh | 8 +- .../{ => nix}/build/derivation-goal.hh | 14 +-- .../build/drv-output-substitution-goal.hh | 8 +- src/libstore/{ => nix}/build/goal.hh | 4 +- .../{ => nix}/build/substitution-goal.hh | 8 +- src/libstore/{ => nix}/build/worker.hh | 12 +-- src/libstore/{ => nix}/builtins.hh | 2 +- src/libstore/{ => nix}/builtins/buildenv.hh | 2 +- .../{ => nix}/common-protocol-impl.hh | 4 +- src/libstore/{ => nix}/common-protocol.hh | 2 +- .../{ => nix}/common-ssh-store-config.hh | 2 +- src/libstore/{ => nix}/content-address.hh | 8 +- src/libstore/{ => nix}/daemon.hh | 4 +- src/libstore/{ => nix}/derivation-options.hh | 4 +- src/libstore/{ => nix}/derivations.hh | 16 ++-- src/libstore/{ => nix}/derived-path-map.hh | 4 +- src/libstore/{ => nix}/derived-path.hh | 8 +- .../{ => nix}/downstream-placeholder.hh | 6 +- src/libstore/{ => nix}/filetransfer.hh | 10 +- src/libstore/{ => nix}/gc-store.hh | 2 +- src/libstore/{ => nix}/globals.hh | 10 +- .../{ => nix}/http-binary-cache-store.hh | 2 +- src/libstore/{ => nix}/indirect-root-store.hh | 2 +- src/libstore/{ => nix}/keys.hh | 2 +- src/libstore/{ => nix}/legacy-ssh-store.hh | 12 +-- .../length-prefixed-protocol-helper.hh | 2 +- .../{ => nix}/local-binary-cache-store.hh | 2 +- src/libstore/{ => nix}/local-fs-store.hh | 6 +- src/libstore/{ => nix}/local-overlay-store.hh | 2 +- src/libstore/{ => nix}/local-store.hh | 10 +- src/libstore/{ => nix}/log-store.hh | 2 +- src/libstore/{ => nix}/machines.hh | 4 +- .../{ => nix}/make-content-addressed.hh | 2 +- src/libstore/nix/meson.build | 82 ++++++++++++++++ src/libstore/{ => nix}/names.hh | 2 +- src/libstore/{ => nix}/nar-accessor.hh | 2 +- src/libstore/{ => nix}/nar-info-disk-cache.hh | 6 +- src/libstore/{ => nix}/nar-info.hh | 6 +- src/libstore/{ => nix}/outputs-spec.hh | 4 +- src/libstore/{ => nix}/parsed-derivations.hh | 4 +- src/libstore/{ => nix}/path-info.hh | 8 +- src/libstore/{ => nix}/path-references.hh | 4 +- src/libstore/{ => nix}/path-regex.hh | 0 src/libstore/{ => nix}/path-with-outputs.hh | 4 +- src/libstore/{ => nix}/path.hh | 2 +- src/libstore/{ => nix}/pathlocks.hh | 2 +- .../{ => nix}/posix-fs-canonicalise.hh | 4 +- src/libstore/{ => nix}/profiles.hh | 4 +- src/libstore/{ => nix}/realisation.hh | 10 +- src/libstore/{ => nix}/remote-fs-accessor.hh | 6 +- .../{ => nix}/remote-store-connection.hh | 8 +- src/libstore/{ => nix}/remote-store.hh | 6 +- .../{ => nix}/s3-binary-cache-store.hh | 2 +- src/libstore/{ => nix}/s3.hh | 2 +- .../{ => nix}/serve-protocol-connection.hh | 4 +- src/libstore/{ => nix}/serve-protocol-impl.hh | 4 +- src/libstore/{ => nix}/serve-protocol.hh | 2 +- src/libstore/{ => nix}/sqlite.hh | 2 +- src/libstore/{ => nix}/ssh-store.hh | 8 +- src/libstore/{ => nix}/ssh.hh | 6 +- src/libstore/{ => nix}/store-api.hh | 28 +++--- src/libstore/{ => nix}/store-cast.hh | 2 +- src/libstore/{ => nix}/store-dir-config.hh | 10 +- src/libstore/{ => nix}/store-reference.hh | 2 +- src/libstore/{ => nix}/uds-remote-store.hh | 6 +- .../{ => nix}/worker-protocol-connection.hh | 4 +- .../{ => nix}/worker-protocol-impl.hh | 4 +- src/libstore/{ => nix}/worker-protocol.hh | 2 +- src/libstore/optimise-store.cc | 10 +- src/libstore/outputs-spec.cc | 10 +- src/libstore/parsed-derivations.cc | 2 +- src/libstore/path-info.cc | 10 +- src/libstore/path-references.cc | 6 +- src/libstore/path-with-outputs.cc | 6 +- src/libstore/path.cc | 2 +- src/libstore/pathlocks.cc | 8 +- src/libstore/posix-fs-canonicalise.cc | 12 +-- src/libstore/profiles.cc | 10 +- src/libstore/realisation.cc | 8 +- src/libstore/remote-fs-accessor.cc | 4 +- src/libstore/remote-store.cc | 40 ++++---- src/libstore/s3-binary-cache-store.cc | 16 ++-- src/libstore/serve-protocol-connection.cc | 8 +- src/libstore/serve-protocol.cc | 16 ++-- src/libstore/sqlite.cc | 10 +- src/libstore/ssh-store.cc | 18 ++-- src/libstore/ssh.cc | 12 +-- src/libstore/store-api.cc | 42 ++++----- src/libstore/store-reference.cc | 10 +- src/libstore/uds-remote-store.cc | 6 +- src/libstore/unix/build/child.cc | 6 +- src/libstore/unix/build/hook-instance.cc | 14 +-- .../unix/build/local-derivation-goal.cc | 54 +++++------ src/libstore/unix/meson.build | 12 +-- src/libstore/unix/{ => nix}/build/child.hh | 0 .../unix/{ => nix}/build/hook-instance.hh | 6 +- .../{ => nix}/build/local-derivation-goal.hh | 6 +- src/libstore/unix/nix/meson.build | 8 ++ src/libstore/unix/{ => nix}/user-lock.hh | 0 src/libstore/unix/pathlocks.cc | 8 +- src/libstore/unix/user-lock.cc | 10 +- src/libstore/windows/pathlocks.cc | 10 +- src/libstore/worker-protocol-connection.cc | 8 +- src/libstore/worker-protocol.cc | 16 ++-- src/libutil-c/meson.build | 2 +- src/libutil-c/nix_api_util.cc | 6 +- src/libutil-c/nix_api_util_internal.h | 2 +- src/libutil-test-support/{tests => }/hash.cc | 4 +- src/libutil-test-support/meson.build | 16 +--- src/libutil-test-support/nix/meson.build | 11 +++ .../{ => nix}/tests/characterization.hh | 6 +- .../{ => nix}/tests/gtest-with-params.hh | 0 .../{ => nix}/tests/hash.hh | 2 +- .../{ => nix}/tests/nix_api_util.hh | 0 .../{ => nix}/tests/string_callback.hh | 0 .../tests/tracing-file-system-object-sink.hh | 2 +- .../{tests => }/string_callback.cc | 2 +- .../tracing-file-system-object-sink.cc | 2 +- src/libutil-tests/args.cc | 4 +- src/libutil-tests/canon-path.cc | 2 +- src/libutil-tests/checked-arithmetic.cc | 4 +- src/libutil-tests/chunked-vector.cc | 2 +- src/libutil-tests/closure.cc | 2 +- src/libutil-tests/compression.cc | 2 +- src/libutil-tests/config.cc | 4 +- src/libutil-tests/executable-path.cc | 2 +- src/libutil-tests/file-content-address.cc | 2 +- src/libutil-tests/file-system.cc | 12 +-- src/libutil-tests/git.cc | 6 +- src/libutil-tests/hash.cc | 2 +- src/libutil-tests/hilite.cc | 2 +- src/libutil-tests/json-utils.cc | 4 +- src/libutil-tests/logging.cc | 4 +- src/libutil-tests/lru-cache.cc | 2 +- src/libutil-tests/meson.build | 2 +- src/libutil-tests/nix_api_util.cc | 8 +- src/libutil-tests/pool.cc | 2 +- src/libutil-tests/position.cc | 2 +- src/libutil-tests/processes.cc | 2 +- src/libutil-tests/references.cc | 2 +- src/libutil-tests/spawn.cc | 2 +- src/libutil-tests/strings.cc | 4 +- src/libutil-tests/suggestions.cc | 2 +- src/libutil-tests/terminal.cc | 8 +- src/libutil-tests/url.cc | 2 +- src/libutil-tests/util.cc | 10 +- src/libutil-tests/xml-writer.cc | 2 +- src/libutil/archive.cc | 12 +-- src/libutil/args.cc | 14 +-- src/libutil/canon-path.cc | 8 +- src/libutil/compression.cc | 10 +- src/libutil/compute-levels.cc | 2 +- src/libutil/config-global.cc | 2 +- src/libutil/config.cc | 18 ++-- src/libutil/current-process.cc | 16 ++-- src/libutil/english.cc | 2 +- src/libutil/environment-variables.cc | 4 +- src/libutil/error.cc | 12 +-- src/libutil/executable-path.cc | 10 +- src/libutil/exit.cc | 2 +- src/libutil/experimental-features.cc | 8 +- src/libutil/file-content-address.cc | 8 +- src/libutil/file-descriptor.cc | 6 +- src/libutil/file-system.cc | 18 ++-- src/libutil/fs-sink.cc | 10 +- src/libutil/git.cc | 10 +- src/libutil/hash.cc | 10 +- src/libutil/hilite.cc | 2 +- src/libutil/json-utils.cc | 6 +- src/libutil/linux/cgroup.cc | 10 +- src/libutil/linux/meson.build | 7 +- src/libutil/linux/namespaces.cc | 14 +-- src/libutil/linux/{ => nix}/cgroup.hh | 2 +- src/libutil/linux/nix/meson.build | 8 ++ src/libutil/linux/{ => nix}/namespaces.hh | 2 +- src/libutil/logging.cc | 16 ++-- src/libutil/memory-source-accessor.cc | 2 +- src/libutil/meson.build | 87 +---------------- src/libutil/mounted-source-accessor.cc | 2 +- .../{ => nix}/abstract-setting-to-json.hh | 4 +- src/libutil/{ => nix}/ansicolor.hh | 0 src/libutil/{ => nix}/archive.hh | 6 +- src/libutil/{ => nix}/args.hh | 6 +- src/libutil/{ => nix}/args/root.hh | 2 +- src/libutil/{ => nix}/callback.hh | 0 src/libutil/{ => nix}/canon-path.hh | 0 src/libutil/{ => nix}/checked-arithmetic.hh | 0 src/libutil/{ => nix}/chunked-vector.hh | 2 +- src/libutil/{ => nix}/closure.hh | 2 +- src/libutil/{ => nix}/comparator.hh | 0 src/libutil/{ => nix}/compression.hh | 6 +- src/libutil/{ => nix}/compute-levels.hh | 2 +- src/libutil/{ => nix}/config-global.hh | 2 +- src/libutil/{ => nix}/config-impl.hh | 4 +- src/libutil/{ => nix}/config.hh | 4 +- src/libutil/{ => nix}/current-process.hh | 2 +- src/libutil/{ => nix}/english.hh | 0 .../{ => nix}/environment-variables.hh | 4 +- src/libutil/{ => nix}/error.hh | 4 +- src/libutil/{ => nix}/exec.hh | 2 +- src/libutil/{ => nix}/executable-path.hh | 2 +- src/libutil/{ => nix}/exit.hh | 0 .../{ => nix}/experimental-features.hh | 4 +- src/libutil/{ => nix}/file-content-address.hh | 2 +- src/libutil/{ => nix}/file-descriptor.hh | 4 +- src/libutil/{ => nix}/file-path-impl.hh | 0 src/libutil/{ => nix}/file-path.hh | 4 +- src/libutil/{ => nix}/file-system.hh | 10 +- src/libutil/{ => nix}/finally.hh | 0 src/libutil/{ => nix}/fmt.hh | 2 +- src/libutil/{ => nix}/fs-sink.hh | 6 +- src/libutil/{ => nix}/git.hh | 10 +- src/libutil/{ => nix}/hash.hh | 8 +- src/libutil/{ => nix}/hilite.hh | 0 src/libutil/{ => nix}/json-impls.hh | 2 +- src/libutil/{ => nix}/json-utils.hh | 2 +- src/libutil/{ => nix}/logging.hh | 6 +- src/libutil/{ => nix}/lru-cache.hh | 0 .../{ => nix}/memory-source-accessor.hh | 6 +- src/libutil/nix/meson.build | 85 +++++++++++++++++ src/libutil/{ => nix}/muxable-pipe.hh | 6 +- src/libutil/{ => nix}/os-string.hh | 0 src/libutil/{ => nix}/pool.hh | 4 +- src/libutil/{ => nix}/position.hh | 2 +- .../{ => nix}/posix-source-accessor.hh | 2 +- src/libutil/{ => nix}/processes.hh | 10 +- src/libutil/{ => nix}/ref.hh | 0 src/libutil/{ => nix}/references.hh | 2 +- src/libutil/{ => nix}/regex-combinators.hh | 0 src/libutil/{ => nix}/repair-flag.hh | 0 src/libutil/{ => nix}/serialise.hh | 6 +- src/libutil/{ => nix}/signals.hh | 8 +- src/libutil/{ => nix}/signature/local-keys.hh | 2 +- src/libutil/{ => nix}/signature/signer.hh | 4 +- src/libutil/{ => nix}/source-accessor.hh | 6 +- src/libutil/{ => nix}/source-path.hh | 8 +- src/libutil/{ => nix}/split.hh | 2 +- src/libutil/{ => nix}/std-hash.hh | 0 src/libutil/{ => nix}/strings-inline.hh | 2 +- src/libutil/{ => nix}/strings.hh | 0 src/libutil/{ => nix}/suggestions.hh | 2 +- src/libutil/{ => nix}/sync.hh | 2 +- src/libutil/{ => nix}/tarfile.hh | 4 +- src/libutil/{ => nix}/terminal.hh | 0 src/libutil/{ => nix}/thread-pool.hh | 4 +- src/libutil/{ => nix}/topo-sort.hh | 2 +- src/libutil/{ => nix}/types.hh | 0 src/libutil/{ => nix}/unix-domain-socket.hh | 4 +- src/libutil/{ => nix}/url-parts.hh | 0 src/libutil/{ => nix}/url.hh | 2 +- src/libutil/{ => nix}/users.hh | 2 +- src/libutil/{ => nix}/util.hh | 8 +- src/libutil/{ => nix}/variant-wrapper.hh | 0 src/libutil/{ => nix}/xml-writer.hh | 0 src/libutil/position.cc | 2 +- src/libutil/posix-source-accessor.cc | 8 +- src/libutil/references.cc | 6 +- src/libutil/serialise.cc | 8 +- src/libutil/signature/local-keys.cc | 6 +- src/libutil/signature/signer.cc | 4 +- src/libutil/source-accessor.cc | 4 +- src/libutil/source-path.cc | 2 +- src/libutil/strings.cc | 6 +- src/libutil/suggestions.cc | 6 +- src/libutil/tarfile.cc | 8 +- src/libutil/terminal.cc | 6 +- src/libutil/thread-pool.cc | 6 +- src/libutil/union-source-accessor.cc | 2 +- src/libutil/unix-domain-socket.cc | 8 +- src/libutil/unix/environment-variables.cc | 2 +- src/libutil/unix/file-descriptor.cc | 8 +- src/libutil/unix/file-path.cc | 4 +- src/libutil/unix/file-system.cc | 2 +- src/libutil/unix/meson.build | 7 +- src/libutil/unix/muxable-pipe.cc | 6 +- src/libutil/unix/nix/meson.build | 8 ++ src/libutil/unix/{ => nix}/monitor-fd.hh | 2 +- src/libutil/unix/{ => nix}/signals-impl.hh | 10 +- src/libutil/unix/os-string.cc | 4 +- src/libutil/unix/processes.cc | 14 +-- src/libutil/unix/signals.cc | 10 +- src/libutil/unix/users.cc | 8 +- src/libutil/url.cc | 10 +- src/libutil/users.cc | 8 +- src/libutil/util.cc | 8 +- src/libutil/windows/environment-variables.cc | 4 +- src/libutil/windows/file-descriptor.cc | 12 +-- src/libutil/windows/file-path.cc | 6 +- src/libutil/windows/file-system.cc | 2 +- src/libutil/windows/meson.build | 8 +- src/libutil/windows/muxable-pipe.cc | 8 +- src/libutil/windows/nix/meson.build | 9 ++ src/libutil/windows/{ => nix}/signals-impl.hh | 2 +- .../windows/{ => nix}/windows-async-pipe.hh | 2 +- .../windows/{ => nix}/windows-error.hh | 2 +- src/libutil/windows/os-string.cc | 6 +- src/libutil/windows/processes.cc | 26 +++--- src/libutil/windows/users.cc | 10 +- src/libutil/windows/windows-async-pipe.cc | 4 +- src/libutil/windows/windows-error.cc | 2 +- src/libutil/xml-writer.cc | 2 +- src/nix-build/nix-build.cc | 38 ++++---- src/nix-channel/nix-channel.cc | 18 ++-- .../nix-collect-garbage.cc | 18 ++-- src/nix-copy-closure/nix-copy-closure.cc | 8 +- src/nix-env/nix-env.cc | 36 +++---- src/nix-env/user-env.cc | 20 ++-- src/nix-env/user-env.hh | 2 +- src/nix-instantiate/nix-instantiate.cc | 28 +++--- src/nix-store/dotgraph.cc | 2 +- src/nix-store/dotgraph.hh | 2 +- src/nix-store/graphml.cc | 4 +- src/nix-store/graphml.hh | 2 +- src/nix-store/nix-store.cc | 36 +++---- src/nix/add-to-store.cc | 14 +-- src/nix/app.cc | 20 ++-- src/nix/build.cc | 12 +-- src/nix/bundle.cc | 14 +-- src/nix/cat.cc | 8 +- src/nix/config-check.cc | 18 ++-- src/nix/config.cc | 10 +- src/nix/copy.cc | 8 +- src/nix/derivation-add.cc | 10 +- src/nix/derivation-show.cc | 10 +- src/nix/derivation.cc | 2 +- src/nix/develop.cc | 22 ++--- src/nix/diff-closures.cc | 12 +-- src/nix/dump-path.cc | 6 +- src/nix/edit.cc | 14 +-- src/nix/env.cc | 8 +- src/nix/eval.cc | 16 ++-- src/nix/flake.cc | 44 ++++----- src/nix/fmt.cc | 6 +- src/nix/hash.cc | 20 ++-- src/nix/log.cc | 12 +-- src/nix/ls.cc | 8 +- src/nix/main.cc | 46 ++++----- src/nix/make-content-addressed.cc | 8 +- src/nix/man-pages.cc | 6 +- src/nix/meson.build | 13 +-- src/nix/nar.cc | 2 +- src/nix/optimise-store.cc | 6 +- src/nix/path-from-hash-part.cc | 4 +- src/nix/path-info.cc | 12 +-- src/nix/prefetch.cc | 28 +++--- src/nix/profile.cc | 28 +++--- src/nix/realisation.cc | 4 +- src/nix/registry.cc | 16 ++-- src/nix/repl.cc | 16 ++-- src/nix/run.cc | 26 +++--- src/nix/run.hh | 2 +- src/nix/search.cc | 28 +++--- src/nix/self-exe.cc | 6 +- src/nix/sigs.cc | 12 +-- src/nix/store-copy-log.cc | 14 +-- src/nix/store-delete.cc | 12 +-- src/nix/store-gc.cc | 12 +-- src/nix/store-info.cc | 8 +- src/nix/store-repair.cc | 4 +- src/nix/store.cc | 2 +- src/nix/unix/daemon.cc | 32 +++---- src/nix/upgrade-nix.cc | 22 ++--- src/nix/verify.cc | 14 +-- src/nix/why-depends.cc | 10 +- src/perl/lib/Nix/Store.xs | 14 +-- tests/functional/plugins/meson.build | 8 +- tests/functional/plugins/plugintest.cc | 4 +- .../functional/test-libstoreconsumer/main.cc | 6 +- .../test-libstoreconsumer/meson.build | 4 +- 649 files changed, 2797 insertions(+), 2753 deletions(-) rename src/libcmd/{ => nix}/built-path.hh (98%) rename src/libcmd/{ => nix}/command-installable-value.hh (87%) rename src/libcmd/{ => nix}/command.hh (98%) rename src/libcmd/{ => nix}/common-eval-args.hh (92%) rename src/libcmd/{ => nix}/compatibility-settings.hh (98%) rename src/libcmd/{ => nix}/editor-for.hh (77%) rename src/libcmd/{ => nix}/installable-attr-path.hh (65%) rename src/libcmd/{ => nix}/installable-derived-path.hh (94%) rename src/libcmd/{ => nix}/installable-flake.hh (97%) rename src/libcmd/{ => nix}/installable-value.hh (98%) rename src/libcmd/{ => nix}/installables.hh (96%) rename src/libcmd/{ => nix}/legacy.hh (100%) rename src/libcmd/{ => nix}/markdown.hh (100%) create mode 100644 src/libcmd/nix/meson.build rename src/libcmd/{ => nix}/misc-store-flags.hh (92%) rename src/libcmd/{ => nix}/network-proxy.hh (94%) rename src/libcmd/{ => nix}/repl-interacter.hh (95%) rename src/libcmd/{ => nix}/repl.hh (97%) create mode 100644 src/libexpr-test-support/nix/meson.build rename src/libexpr-test-support/{ => nix}/tests/libexpr.hh (94%) rename src/libexpr-test-support/{ => nix}/tests/nix_api_expr.hh (93%) rename src/libexpr-test-support/{ => nix}/tests/value/context.hh (94%) rename src/libexpr/{ => nix}/attr-path.hh (95%) rename src/libexpr/{ => nix}/attr-set.hh (98%) rename src/libexpr/{ => nix}/eval-cache.hh (97%) rename src/libexpr/{ => nix}/eval-error.hh (98%) rename src/libexpr/{ => nix}/eval-gc.hh (100%) rename src/libexpr/{ => nix}/eval-inline.hh (97%) rename src/libexpr/{ => nix}/eval-settings.hh (99%) rename src/libexpr/{ => nix}/eval.hh (98%) rename src/libexpr/{ => nix}/function-trace.hh (88%) rename src/libexpr/{ => nix}/gc-small-vector.hh (96%) rename src/libexpr/{ => nix}/get-drvs.hh (98%) rename src/libexpr/{ => nix}/json-to-value.hh (89%) rename src/libexpr/{ => nix}/lexer-helpers.hh (100%) create mode 100644 src/libexpr/nix/meson.build rename src/libexpr/{ => nix}/nixexpr.hh (99%) rename src/libexpr/{ => nix}/parser-state.hh (99%) rename src/libexpr/{ => nix}/pos-idx.hh (100%) rename src/libexpr/{ => nix}/pos-table.hh (96%) rename src/libexpr/{ => nix}/primops.hh (98%) rename src/libexpr/{ => nix}/print-ambiguous.hh (95%) rename src/libexpr/{ => nix}/print-options.hh (100%) rename src/libexpr/{ => nix}/print.hh (97%) rename src/libexpr/{ => nix}/repl-exit-status.hh (100%) rename src/libexpr/{ => nix}/search-path.hh (98%) rename src/libexpr/{ => nix}/symbol-table.hh (97%) rename src/libexpr/{ => nix}/value-to-json.hh (90%) rename src/libexpr/{ => nix}/value-to-xml.hh (82%) rename src/libexpr/{ => nix}/value.hh (98%) rename src/libexpr/{ => nix}/value/context.hh (95%) rename src/libfetchers/{ => nix}/attrs.hh (96%) rename src/libfetchers/{ => nix}/cache.hh (97%) rename src/libfetchers/{ => nix}/fetch-settings.hh (98%) rename src/libfetchers/{ => nix}/fetch-to-store.hh (71%) rename src/libfetchers/{ => nix}/fetchers.hh (97%) rename src/libfetchers/{ => nix}/filtering-source-accessor.hh (98%) rename src/libfetchers/{ => nix}/git-lfs-fetch.hh (92%) rename src/libfetchers/{ => nix}/git-utils.hh (98%) create mode 100644 src/libfetchers/nix/meson.build rename src/libfetchers/{ => nix}/registry.hh (96%) rename src/libfetchers/{ => nix}/store-path-accessor.hh (87%) rename src/libfetchers/{ => nix}/tarball.hh (90%) rename src/libflake/{ => nix}/flake/flake.hh (98%) rename src/libflake/{ => nix}/flake/flakeref.hh (97%) rename src/libflake/{ => nix}/flake/lockfile.hh (98%) rename src/libflake/{ => nix}/flake/settings.hh (93%) rename src/libflake/{ => nix}/flake/url-name.hh (85%) create mode 100644 src/libflake/nix/meson.build rename src/libmain/{ => nix}/common-args.hh (96%) rename src/libmain/{ => nix}/loggers.hh (91%) create mode 100644 src/libmain/nix/meson.build rename src/libmain/{ => nix}/plugin.hh (100%) rename src/libmain/{ => nix}/progress-bar.hh (84%) rename src/libmain/{ => nix}/shared.hh (94%) rename src/libstore-test-support/{tests => }/derived-path.cc (97%) create mode 100644 src/libstore-test-support/nix/meson.build rename src/libstore-test-support/{ => nix}/tests/derived-path.hh (86%) rename src/libstore-test-support/{ => nix}/tests/libstore.hh (94%) rename src/libstore-test-support/{ => nix}/tests/nix_api_store.hh (96%) rename src/libstore-test-support/{ => nix}/tests/outputs-spec.hh (76%) rename src/libstore-test-support/{ => nix}/tests/path.hh (94%) rename src/libstore-test-support/{ => nix}/tests/protocol.hh (96%) rename src/libstore-test-support/{tests => }/outputs-spec.cc (93%) rename src/libstore-test-support/{tests => }/path.cc (93%) create mode 100644 src/libstore/build/meson.build rename src/libstore/linux/{ => nix}/fchmodat2-compat.hh (100%) create mode 100644 src/libstore/linux/nix/meson.build rename src/libstore/linux/{ => nix}/personality.hh (100%) rename src/libstore/{ => nix}/binary-cache-store.hh (97%) rename src/libstore/{ => nix}/build-result.hh (98%) rename src/libstore/{ => nix}/build/derivation-creation-and-realisation-goal.hh (95%) rename src/libstore/{ => nix}/build/derivation-goal.hh (97%) rename src/libstore/{ => nix}/build/drv-output-substitution-goal.hh (89%) rename src/libstore/{ => nix}/build/goal.hh (99%) rename src/libstore/{ => nix}/build/substitution-goal.hh (94%) rename src/libstore/{ => nix}/build/worker.hh (98%) rename src/libstore/{ => nix}/builtins.hh (92%) rename src/libstore/{ => nix}/builtins/buildenv.hh (97%) rename src/libstore/{ => nix}/common-protocol-impl.hh (93%) rename src/libstore/{ => nix}/common-protocol.hh (99%) rename src/libstore/{ => nix}/common-ssh-store-config.hh (98%) rename src/libstore/{ => nix}/content-address.hh (98%) rename src/libstore/{ => nix}/daemon.hh (82%) rename src/libstore/{ => nix}/derivation-options.hh (98%) rename src/libstore/{ => nix}/derivations.hh (98%) rename src/libstore/{ => nix}/derived-path-map.hh (98%) rename src/libstore/{ => nix}/derived-path.hh (98%) rename src/libstore/{ => nix}/downstream-placeholder.hh (97%) rename src/libstore/{ => nix}/filetransfer.hh (97%) rename src/libstore/{ => nix}/gc-store.hh (99%) rename src/libstore/{ => nix}/globals.hh (99%) rename src/libstore/{ => nix}/http-binary-cache-store.hh (94%) rename src/libstore/{ => nix}/indirect-root-store.hh (98%) rename src/libstore/{ => nix}/keys.hh (66%) rename src/libstore/{ => nix}/legacy-ssh-store.hh (97%) rename src/libstore/{ => nix}/length-prefixed-protocol-helper.hh (99%) rename src/libstore/{ => nix}/local-binary-cache-store.hh (92%) rename src/libstore/{ => nix}/local-fs-store.hh (96%) rename src/libstore/{ => nix}/local-overlay-store.hh (99%) rename src/libstore/{ => nix}/local-store.hh (98%) rename src/libstore/{ => nix}/log-store.hh (95%) rename src/libstore/{ => nix}/machines.hh (97%) rename src/libstore/{ => nix}/make-content-addressed.hh (94%) create mode 100644 src/libstore/nix/meson.build rename src/libstore/{ => nix}/names.hh (96%) rename src/libstore/{ => nix}/nar-accessor.hh (96%) rename src/libstore/{ => nix}/nar-info-disk-cache.hh (94%) rename src/libstore/{ => nix}/nar-info.hh (93%) rename src/libstore/{ => nix}/outputs-spec.hh (98%) rename src/libstore/{ => nix}/parsed-derivations.hh (95%) rename src/libstore/{ => nix}/path-info.hh (98%) rename src/libstore/{ => nix}/path-references.hh (91%) rename src/libstore/{ => nix}/path-regex.hh (100%) rename src/libstore/{ => nix}/path-with-outputs.hh (95%) rename src/libstore/{ => nix}/path.hh (98%) rename src/libstore/{ => nix}/pathlocks.hh (97%) rename src/libstore/{ => nix}/posix-fs-canonicalise.hh (96%) rename src/libstore/{ => nix}/profiles.hh (99%) rename src/libstore/{ => nix}/realisation.hh (96%) rename src/libstore/{ => nix}/remote-fs-accessor.hh (91%) rename src/libstore/{ => nix}/remote-store-connection.hh (91%) rename src/libstore/{ => nix}/remote-store.hh (98%) rename src/libstore/{ => nix}/s3-binary-cache-store.hh (98%) rename src/libstore/{ => nix}/s3.hh (97%) rename src/libstore/{ => nix}/serve-protocol-connection.hh (98%) rename src/libstore/{ => nix}/serve-protocol-impl.hh (95%) rename src/libstore/{ => nix}/serve-protocol.hh (99%) rename src/libstore/{ => nix}/sqlite.hh (99%) rename src/libstore/{ => nix}/ssh-store.hh (91%) rename src/libstore/{ => nix}/ssh.hh (95%) rename src/libstore/{ => nix}/store-api.hh (98%) rename src/libstore/{ => nix}/store-cast.hh (94%) rename src/libstore/{ => nix}/store-dir-config.hh (95%) rename src/libstore/{ => nix}/store-reference.hh (98%) rename src/libstore/{ => nix}/uds-remote-store.hh (95%) rename src/libstore/{ => nix}/worker-protocol-connection.hh (98%) rename src/libstore/{ => nix}/worker-protocol-impl.hh (95%) rename src/libstore/{ => nix}/worker-protocol.hh (99%) rename src/libstore/unix/{ => nix}/build/child.hh (100%) rename src/libstore/unix/{ => nix}/build/hook-instance.hh (85%) rename src/libstore/unix/{ => nix}/build/local-derivation-goal.hh (98%) create mode 100644 src/libstore/unix/nix/meson.build rename src/libstore/unix/{ => nix}/user-lock.hh (100%) rename src/libutil-test-support/{tests => }/hash.cc (91%) create mode 100644 src/libutil-test-support/nix/meson.build rename src/libutil-test-support/{ => nix}/tests/characterization.hh (96%) rename src/libutil-test-support/{ => nix}/tests/gtest-with-params.hh (100%) rename src/libutil-test-support/{ => nix}/tests/hash.hh (88%) rename src/libutil-test-support/{ => nix}/tests/nix_api_util.hh (100%) rename src/libutil-test-support/{ => nix}/tests/string_callback.hh (100%) rename src/libutil-test-support/{ => nix}/tests/tracing-file-system-object-sink.hh (97%) rename src/libutil-test-support/{tests => }/string_callback.cc (85%) rename src/libutil-test-support/{tests => }/tracing-file-system-object-sink.cc (95%) rename src/libutil/linux/{ => nix}/cgroup.hh (97%) create mode 100644 src/libutil/linux/nix/meson.build rename src/libutil/linux/{ => nix}/namespaces.hh (96%) rename src/libutil/{ => nix}/abstract-setting-to-json.hh (87%) rename src/libutil/{ => nix}/ansicolor.hh (100%) rename src/libutil/{ => nix}/archive.hh (96%) rename src/libutil/{ => nix}/args.hh (99%) rename src/libutil/{ => nix}/args/root.hh (98%) rename src/libutil/{ => nix}/callback.hh (100%) rename src/libutil/{ => nix}/canon-path.hh (100%) rename src/libutil/{ => nix}/checked-arithmetic.hh (100%) rename src/libutil/{ => nix}/chunked-vector.hh (98%) rename src/libutil/{ => nix}/closure.hh (98%) rename src/libutil/{ => nix}/comparator.hh (100%) rename src/libutil/{ => nix}/compression.hh (90%) rename src/libutil/{ => nix}/compute-levels.hh (74%) rename src/libutil/{ => nix}/config-global.hh (96%) rename src/libutil/{ => nix}/config-impl.hh (98%) rename src/libutil/{ => nix}/config.hh (99%) rename src/libutil/{ => nix}/current-process.hh (97%) rename src/libutil/{ => nix}/english.hh (100%) rename src/libutil/{ => nix}/environment-variables.hh (96%) rename src/libutil/{ => nix}/error.hh (99%) rename src/libutil/{ => nix}/exec.hh (91%) rename src/libutil/{ => nix}/executable-path.hh (98%) rename src/libutil/{ => nix}/exit.hh (100%) rename src/libutil/{ => nix}/experimental-features.hh (98%) rename src/libutil/{ => nix}/file-content-address.hh (99%) rename src/libutil/{ => nix}/file-descriptor.hh (98%) rename src/libutil/{ => nix}/file-path-impl.hh (100%) rename src/libutil/{ => nix}/file-path.hh (94%) rename src/libutil/{ => nix}/file-system.hh (98%) rename src/libutil/{ => nix}/finally.hh (100%) rename src/libutil/{ => nix}/fmt.hh (99%) rename src/libutil/{ => nix}/fs-sink.hh (97%) rename src/libutil/{ => nix}/git.hh (97%) rename src/libutil/{ => nix}/hash.hh (98%) rename src/libutil/{ => nix}/hilite.hh (100%) rename src/libutil/{ => nix}/json-impls.hh (95%) rename src/libutil/{ => nix}/json-utils.hh (99%) rename src/libutil/{ => nix}/logging.hh (98%) rename src/libutil/{ => nix}/lru-cache.hh (100%) rename src/libutil/{ => nix}/memory-source-accessor.hh (97%) create mode 100644 src/libutil/nix/meson.build rename src/libutil/{ => nix}/muxable-pipe.hh (94%) rename src/libutil/{ => nix}/os-string.hh (100%) rename src/libutil/{ => nix}/pool.hh (99%) rename src/libutil/{ => nix}/position.hh (99%) rename src/libutil/{ => nix}/posix-source-accessor.hh (98%) rename src/libutil/{ => nix}/processes.hh (95%) rename src/libutil/{ => nix}/ref.hh (100%) rename src/libutil/{ => nix}/references.hh (97%) rename src/libutil/{ => nix}/regex-combinators.hh (100%) rename src/libutil/{ => nix}/repair-flag.hh (100%) rename src/libutil/{ => nix}/serialise.hh (99%) rename src/libutil/{ => nix}/signals.hh (90%) rename src/libutil/{ => nix}/signature/local-keys.hh (99%) rename src/libutil/{ => nix}/signature/signer.hh (94%) rename src/libutil/{ => nix}/source-accessor.hh (98%) rename src/libutil/{ => nix}/source-path.hh (96%) rename src/libutil/{ => nix}/split.hh (97%) rename src/libutil/{ => nix}/std-hash.hh (100%) rename src/libutil/{ => nix}/strings-inline.hh (99%) rename src/libutil/{ => nix}/strings.hh (100%) rename src/libutil/{ => nix}/suggestions.hh (98%) rename src/libutil/{ => nix}/sync.hh (99%) rename src/libutil/{ => nix}/tarfile.hh (96%) rename src/libutil/{ => nix}/terminal.hh (100%) rename src/libutil/{ => nix}/thread-pool.hh (98%) rename src/libutil/{ => nix}/topo-sort.hh (97%) rename src/libutil/{ => nix}/types.hh (100%) rename src/libutil/{ => nix}/unix-domain-socket.hh (95%) rename src/libutil/{ => nix}/url-parts.hh (100%) rename src/libutil/{ => nix}/url.hh (98%) rename src/libutil/{ => nix}/users.hh (98%) rename src/libutil/{ => nix}/util.hh (98%) rename src/libutil/{ => nix}/variant-wrapper.hh (100%) rename src/libutil/{ => nix}/xml-writer.hh (100%) create mode 100644 src/libutil/unix/nix/meson.build rename src/libutil/unix/{ => nix}/monitor-fd.hh (98%) rename src/libutil/unix/{ => nix}/signals-impl.hh (95%) create mode 100644 src/libutil/windows/nix/meson.build rename src/libutil/windows/{ => nix}/signals-impl.hh (95%) rename src/libutil/windows/{ => nix}/windows-async-pipe.hh (93%) rename src/libutil/windows/{ => nix}/windows-error.hh (97%) diff --git a/nix-meson-build-support/export/meson.build b/nix-meson-build-support/export/meson.build index 9f59505721e..b2409de8571 100644 --- a/nix-meson-build-support/export/meson.build +++ b/nix-meson-build-support/export/meson.build @@ -16,7 +16,6 @@ import('pkgconfig').generate( filebase : meson.project_name(), name : 'Nix', description : 'Nix Package Manager', - subdirs : ['nix'], extra_cflags : ['-std=c++2a'], requires : requires_public, requires_private : requires_private, diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 88b70428845..56eb248a5d4 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -9,19 +9,19 @@ #include #endif -#include "machines.hh" -#include "shared.hh" -#include "plugin.hh" -#include "pathlocks.hh" -#include "globals.hh" -#include "serialise.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "strings.hh" -#include "derivations.hh" -#include "local-store.hh" -#include "legacy.hh" -#include "experimental-features.hh" +#include "nix/machines.hh" +#include "nix/shared.hh" +#include "nix/plugin.hh" +#include "nix/pathlocks.hh" +#include "nix/globals.hh" +#include "nix/serialise.hh" +#include "nix/build-result.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" +#include "nix/derivations.hh" +#include "nix/local-store.hh" +#include "nix/legacy.hh" +#include "nix/experimental-features.hh" using namespace nix; using std::cin; diff --git a/src/libcmd/built-path.cc b/src/libcmd/built-path.cc index 905e70f32c9..21b52cea5f2 100644 --- a/src/libcmd/built-path.cc +++ b/src/libcmd/built-path.cc @@ -1,7 +1,7 @@ -#include "built-path.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "comparator.hh" +#include "nix/built-path.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/comparator.hh" #include diff --git a/src/libcmd/command-installable-value.cc b/src/libcmd/command-installable-value.cc index 7e0c15eb8cb..52fa610916a 100644 --- a/src/libcmd/command-installable-value.cc +++ b/src/libcmd/command-installable-value.cc @@ -1,4 +1,4 @@ -#include "command-installable-value.hh" +#include "nix/command-installable-value.hh" namespace nix { diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 86d13fab796..efcdb799de0 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -1,16 +1,16 @@ #include #include -#include "command.hh" -#include "markdown.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "derivations.hh" -#include "nixexpr.hh" -#include "profiles.hh" -#include "repl.hh" -#include "strings.hh" -#include "environment-variables.hh" +#include "nix/command.hh" +#include "nix/markdown.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/derivations.hh" +#include "nix/nixexpr.hh" +#include "nix/profiles.hh" +#include "nix/repl.hh" +#include "nix/strings.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libcmd/common-eval-args.cc b/src/libcmd/common-eval-args.cc index 57e1774be7b..805701749e2 100644 --- a/src/libcmd/common-eval-args.cc +++ b/src/libcmd/common-eval-args.cc @@ -1,20 +1,20 @@ -#include "fetch-settings.hh" -#include "eval-settings.hh" -#include "common-eval-args.hh" -#include "shared.hh" -#include "config-global.hh" -#include "filetransfer.hh" -#include "eval.hh" -#include "fetchers.hh" -#include "registry.hh" -#include "flake/flakeref.hh" -#include "flake/settings.hh" -#include "store-api.hh" -#include "command.hh" -#include "tarball.hh" -#include "fetch-to-store.hh" -#include "compatibility-settings.hh" -#include "eval-settings.hh" +#include "nix/fetch-settings.hh" +#include "nix/eval-settings.hh" +#include "nix/common-eval-args.hh" +#include "nix/shared.hh" +#include "nix/config-global.hh" +#include "nix/filetransfer.hh" +#include "nix/eval.hh" +#include "nix/fetchers.hh" +#include "nix/registry.hh" +#include "nix/flake/flakeref.hh" +#include "nix/flake/settings.hh" +#include "nix/store-api.hh" +#include "nix/command.hh" +#include "nix/tarball.hh" +#include "nix/fetch-to-store.hh" +#include "nix/compatibility-settings.hh" +#include "nix/eval-settings.hh" namespace nix { diff --git a/src/libcmd/editor-for.cc b/src/libcmd/editor-for.cc index 6bf36bd647b..b82f41d2b8f 100644 --- a/src/libcmd/editor-for.cc +++ b/src/libcmd/editor-for.cc @@ -1,6 +1,6 @@ -#include "editor-for.hh" -#include "environment-variables.hh" -#include "source-path.hh" +#include "nix/editor-for.hh" +#include "nix/environment-variables.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libcmd/installable-attr-path.cc b/src/libcmd/installable-attr-path.cc index 8917e7a018a..dfd7bdd65b2 100644 --- a/src/libcmd/installable-attr-path.cc +++ b/src/libcmd/installable-attr-path.cc @@ -1,21 +1,21 @@ -#include "globals.hh" -#include "installable-attr-path.hh" -#include "outputs-spec.hh" -#include "util.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "flake/flake.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installable-attr-path.hh" +#include "nix/outputs-spec.hh" +#include "nix/util.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/flake/flake.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include diff --git a/src/libcmd/installable-derived-path.cc b/src/libcmd/installable-derived-path.cc index abacd73502c..2e53f61982e 100644 --- a/src/libcmd/installable-derived-path.cc +++ b/src/libcmd/installable-derived-path.cc @@ -1,5 +1,5 @@ -#include "installable-derived-path.hh" -#include "derivations.hh" +#include "nix/installable-derived-path.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libcmd/installable-flake.cc b/src/libcmd/installable-flake.cc index 6c9ee674808..f4c27251529 100644 --- a/src/libcmd/installable-flake.cc +++ b/src/libcmd/installable-flake.cc @@ -1,22 +1,22 @@ -#include "globals.hh" -#include "installable-flake.hh" -#include "installable-derived-path.hh" -#include "outputs-spec.hh" -#include "util.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "flake/flake.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installable-flake.hh" +#include "nix/installable-derived-path.hh" +#include "nix/outputs-spec.hh" +#include "nix/util.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/flake/flake.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include diff --git a/src/libcmd/installable-value.cc b/src/libcmd/installable-value.cc index 1aa2e65c1e5..ac2da0ed20c 100644 --- a/src/libcmd/installable-value.cc +++ b/src/libcmd/installable-value.cc @@ -1,6 +1,6 @@ -#include "installable-value.hh" -#include "eval-cache.hh" -#include "fetch-to-store.hh" +#include "nix/installable-value.hh" +#include "nix/eval-cache.hh" +#include "nix/fetch-to-store.hh" namespace nix { diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 81eb883daba..f1eaa71e9b0 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -1,33 +1,33 @@ -#include "globals.hh" -#include "installables.hh" -#include "installable-derived-path.hh" -#include "installable-attr-path.hh" -#include "installable-flake.hh" -#include "outputs-spec.hh" -#include "users.hh" -#include "util.hh" -#include "command.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "get-drvs.hh" -#include "store-api.hh" -#include "shared.hh" -#include "flake/flake.hh" -#include "eval-cache.hh" -#include "url.hh" -#include "registry.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/installables.hh" +#include "nix/installable-derived-path.hh" +#include "nix/installable-attr-path.hh" +#include "nix/installable-flake.hh" +#include "nix/outputs-spec.hh" +#include "nix/users.hh" +#include "nix/util.hh" +#include "nix/command.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/get-drvs.hh" +#include "nix/store-api.hh" +#include "nix/shared.hh" +#include "nix/flake/flake.hh" +#include "nix/eval-cache.hh" +#include "nix/url.hh" +#include "nix/registry.hh" +#include "nix/build-result.hh" #include #include #include -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libcmd/legacy.cc b/src/libcmd/legacy.cc index 6df09ee37a5..25da75d3fb4 100644 --- a/src/libcmd/legacy.cc +++ b/src/libcmd/legacy.cc @@ -1,4 +1,4 @@ -#include "legacy.hh" +#include "nix/legacy.hh" namespace nix { diff --git a/src/libcmd/markdown.cc b/src/libcmd/markdown.cc index 4566e6ba63c..bfccd56d088 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" #if HAVE_LOWDOWN # include diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build index 4145f408a09..da281b09400 100644 --- a/src/libcmd/meson.build +++ b/src/libcmd/meson.build @@ -53,20 +53,15 @@ else error('illegal editline flavor', readline_flavor) endif -config_h = configure_file( - configuration : configdata, - output : 'config-cmd.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', 'config-main.hh', - '-include', 'config-cmd.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + # '-include', 'nix/config-fetchers.h', + '-include', 'nix/config-expr.hh', + '-include', 'nix/config-main.hh', + '-include', 'nix/config-cmd.hh', language : 'cpp', ) @@ -91,27 +86,7 @@ sources = files( 'repl.cc', ) -include_dirs = [include_directories('.')] - -headers = [config_h] + 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('nix') this_library = library( 'nixcmd', diff --git a/src/libcmd/misc-store-flags.cc b/src/libcmd/misc-store-flags.cc index 4e29e8981ae..70933648ff0 100644 --- a/src/libcmd/misc-store-flags.cc +++ b/src/libcmd/misc-store-flags.cc @@ -1,4 +1,4 @@ -#include "misc-store-flags.hh" +#include "nix/misc-store-flags.hh" namespace nix::flag { diff --git a/src/libcmd/network-proxy.cc b/src/libcmd/network-proxy.cc index 738bf614729..31e9eb8ddb7 100644 --- a/src/libcmd/network-proxy.cc +++ b/src/libcmd/network-proxy.cc @@ -1,8 +1,8 @@ -#include "network-proxy.hh" +#include "nix/network-proxy.hh" #include -#include "environment-variables.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libcmd/built-path.hh b/src/libcmd/nix/built-path.hh similarity index 98% rename from src/libcmd/built-path.hh rename to src/libcmd/nix/built-path.hh index dc78d3e599d..bd8f685e005 100644 --- a/src/libcmd/built-path.hh +++ b/src/libcmd/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/nix/command-installable-value.hh similarity index 87% rename from src/libcmd/command-installable-value.hh rename to src/libcmd/nix/command-installable-value.hh index 7880d411998..5ce352a6345 100644 --- a/src/libcmd/command-installable-value.hh +++ b/src/libcmd/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/nix/command.hh similarity index 98% rename from src/libcmd/command.hh rename to src/libcmd/nix/command.hh index 9570ce3e7ac..9d3c8e343d4 100644 --- a/src/libcmd/command.hh +++ b/src/libcmd/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/nix/common-eval-args.hh similarity index 92% rename from src/libcmd/common-eval-args.hh rename to src/libcmd/nix/common-eval-args.hh index c62365b32e2..e7217589162 100644 --- a/src/libcmd/common-eval-args.hh +++ b/src/libcmd/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/nix/compatibility-settings.hh similarity index 98% rename from src/libcmd/compatibility-settings.hh rename to src/libcmd/nix/compatibility-settings.hh index a129a957a64..18319c1f2d2 100644 --- a/src/libcmd/compatibility-settings.hh +++ b/src/libcmd/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/nix/editor-for.hh similarity index 77% rename from src/libcmd/editor-for.hh rename to src/libcmd/nix/editor-for.hh index 8acd7011e69..0a8aa48bc6c 100644 --- a/src/libcmd/editor-for.hh +++ b/src/libcmd/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/nix/installable-attr-path.hh similarity index 65% rename from src/libcmd/installable-attr-path.hh rename to src/libcmd/nix/installable-attr-path.hh index 86c2f82192c..ceb2eca616c 100644 --- a/src/libcmd/installable-attr-path.hh +++ b/src/libcmd/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/nix/installable-derived-path.hh similarity index 94% rename from src/libcmd/installable-derived-path.hh rename to src/libcmd/nix/installable-derived-path.hh index e0b4f18b38b..8f86e6c4cdf 100644 --- a/src/libcmd/installable-derived-path.hh +++ b/src/libcmd/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/nix/installable-flake.hh similarity index 97% rename from src/libcmd/installable-flake.hh rename to src/libcmd/nix/installable-flake.hh index 212403dd42c..5bbe4beb5b2 100644 --- a/src/libcmd/installable-flake.hh +++ b/src/libcmd/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/nix/installable-value.hh similarity index 98% rename from src/libcmd/installable-value.hh rename to src/libcmd/nix/installable-value.hh index 4b6dbd306aa..f8840103f7c 100644 --- a/src/libcmd/installable-value.hh +++ b/src/libcmd/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/nix/installables.hh similarity index 96% rename from src/libcmd/installables.hh rename to src/libcmd/nix/installables.hh index c995c3019f4..2393cbcffe6 100644 --- a/src/libcmd/installables.hh +++ b/src/libcmd/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/nix/legacy.hh similarity index 100% rename from src/libcmd/legacy.hh rename to src/libcmd/nix/legacy.hh diff --git a/src/libcmd/markdown.hh b/src/libcmd/nix/markdown.hh similarity index 100% rename from src/libcmd/markdown.hh rename to src/libcmd/nix/markdown.hh diff --git a/src/libcmd/nix/meson.build b/src/libcmd/nix/meson.build new file mode 100644 index 00000000000..72e69ed8fda --- /dev/null +++ b/src/libcmd/nix/meson.build @@ -0,0 +1,28 @@ +# Public headers directory + +include_dirs = [include_directories('..')] + +config_h = configure_file( + configuration : configdata, + output : 'config-cmd.hh', +) + +headers = [config_h] + 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/nix/misc-store-flags.hh similarity index 92% rename from src/libcmd/misc-store-flags.hh rename to src/libcmd/nix/misc-store-flags.hh index 124372af78c..b8579e90fb1 100644 --- a/src/libcmd/misc-store-flags.hh +++ b/src/libcmd/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/nix/network-proxy.hh similarity index 94% rename from src/libcmd/network-proxy.hh rename to src/libcmd/nix/network-proxy.hh index 0b6856acbf4..ca797f465ec 100644 --- a/src/libcmd/network-proxy.hh +++ b/src/libcmd/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/nix/repl-interacter.hh similarity index 95% rename from src/libcmd/repl-interacter.hh rename to src/libcmd/nix/repl-interacter.hh index cc70efd0729..463ba68184c 100644 --- a/src/libcmd/repl-interacter.hh +++ b/src/libcmd/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/nix/repl.hh similarity index 97% rename from src/libcmd/repl.hh rename to src/libcmd/nix/repl.hh index 11d1820f504..b22fb9438a6 100644 --- a/src/libcmd/repl.hh +++ b/src/libcmd/nix/repl.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "eval.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libcmd/repl-interacter.cc b/src/libcmd/repl-interacter.cc index 187af46eaa4..b204d64fd89 100644 --- a/src/libcmd/repl-interacter.cc +++ b/src/libcmd/repl-interacter.cc @@ -14,12 +14,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 3043be7a370..3a389107cc9 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -2,34 +2,34 @@ #include #include -#include "error.hh" -#include "repl-interacter.hh" -#include "repl.hh" - -#include "ansicolor.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "attr-path.hh" -#include "signals.hh" -#include "store-api.hh" -#include "log-store.hh" -#include "common-eval-args.hh" -#include "get-drvs.hh" -#include "derivations.hh" -#include "globals.hh" -#include "flake/flake.hh" -#include "flake/lockfile.hh" -#include "users.hh" -#include "editor-for.hh" -#include "finally.hh" -#include "markdown.hh" -#include "local-fs-store.hh" -#include "print.hh" -#include "ref.hh" -#include "value.hh" - -#include "strings.hh" +#include "nix/error.hh" +#include "nix/repl-interacter.hh" +#include "nix/repl.hh" + +#include "nix/ansicolor.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/attr-path.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/log-store.hh" +#include "nix/common-eval-args.hh" +#include "nix/get-drvs.hh" +#include "nix/derivations.hh" +#include "nix/globals.hh" +#include "nix/flake/flake.hh" +#include "nix/flake/lockfile.hh" +#include "nix/users.hh" +#include "nix/editor-for.hh" +#include "nix/finally.hh" +#include "nix/markdown.hh" +#include "nix/local-fs-store.hh" +#include "nix/print.hh" +#include "nix/ref.hh" +#include "nix/value.hh" + +#include "nix/strings.hh" namespace nix { diff --git a/src/libexpr-c/meson.build b/src/libexpr-c/meson.build index 9487132cf36..61b427b5e22 100644 --- a/src/libexpr-c/meson.build +++ b/src/libexpr-c/meson.build @@ -40,9 +40,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', # From C libraries, for our public, installed headers too '-include', 'config-util.h', diff --git a/src/libexpr-c/nix_api_expr.cc b/src/libexpr-c/nix_api_expr.cc index a024248cdd0..b5d2c619978 100644 --- a/src/libexpr-c/nix_api_expr.cc +++ b/src/libexpr-c/nix_api_expr.cc @@ -2,11 +2,11 @@ #include #include -#include "eval.hh" -#include "eval-gc.hh" -#include "globals.hh" -#include "eval-settings.hh" -#include "ref.hh" +#include "nix/eval.hh" +#include "nix/eval-gc.hh" +#include "nix/globals.hh" +#include "nix/eval-settings.hh" +#include "nix/ref.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" diff --git a/src/libexpr-c/nix_api_expr_internal.h b/src/libexpr-c/nix_api_expr_internal.h index f596640115f..205a2ee6240 100644 --- a/src/libexpr-c/nix_api_expr_internal.h +++ b/src/libexpr-c/nix_api_expr_internal.h @@ -1,12 +1,12 @@ #ifndef NIX_API_EXPR_INTERNAL_H #define NIX_API_EXPR_INTERNAL_H -#include "fetch-settings.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "attr-set.hh" +#include "nix/fetch-settings.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/attr-set.hh" #include "nix_api_value.h" -#include "search-path.hh" +#include "nix/search-path.hh" struct nix_eval_state_builder { diff --git a/src/libexpr-c/nix_api_external.cc b/src/libexpr-c/nix_api_external.cc index d673bcb0b30..7f4cd6a8c4d 100644 --- a/src/libexpr-c/nix_api_external.cc +++ b/src/libexpr-c/nix_api_external.cc @@ -1,8 +1,8 @@ -#include "attr-set.hh" -#include "config.hh" -#include "eval.hh" -#include "globals.hh" -#include "value.hh" +#include "nix/attr-set.hh" +#include "nix/config.hh" +#include "nix/eval.hh" +#include "nix/globals.hh" +#include "nix/value.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" @@ -10,7 +10,7 @@ #include "nix_api_util.h" #include "nix_api_util_internal.h" #include "nix_api_value.h" -#include "value/context.hh" +#include "nix/value/context.hh" #include diff --git a/src/libexpr-c/nix_api_external.h b/src/libexpr-c/nix_api_external.h index 6c524b9755d..f4a32728100 100644 --- a/src/libexpr-c/nix_api_external.h +++ b/src/libexpr-c/nix_api_external.h @@ -12,9 +12,10 @@ #include "nix_api_expr.h" #include "nix_api_util.h" #include "nix_api_value.h" -#include "stdbool.h" -#include "stddef.h" -#include "stdint.h" + +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/libexpr-c/nix_api_value.cc b/src/libexpr-c/nix_api_value.cc index 448f4a58a78..3116cb59f7d 100644 --- a/src/libexpr-c/nix_api_value.cc +++ b/src/libexpr-c/nix_api_value.cc @@ -1,10 +1,10 @@ -#include "attr-set.hh" -#include "config.hh" -#include "eval.hh" -#include "globals.hh" -#include "path.hh" -#include "primops.hh" -#include "value.hh" +#include "nix/attr-set.hh" +#include "nix/config.hh" +#include "nix/eval.hh" +#include "nix/globals.hh" +#include "nix/path.hh" +#include "nix/primops.hh" +#include "nix/value.hh" #include "nix_api_expr.h" #include "nix_api_expr_internal.h" @@ -12,7 +12,7 @@ #include "nix_api_util_internal.h" #include "nix_api_store_internal.h" #include "nix_api_value.h" -#include "value/context.hh" +#include "nix/value/context.hh" // Internal helper functions to check [in] and [out] `Value *` parameters static const nix::Value & check_value_not_null(const nix_value * value) diff --git a/src/libexpr-c/nix_api_value.h b/src/libexpr-c/nix_api_value.h index 711b0adbc82..7cd6ad18087 100644 --- a/src/libexpr-c/nix_api_value.h +++ b/src/libexpr-c/nix_api_value.h @@ -10,9 +10,10 @@ #include "nix_api_util.h" #include "nix_api_store.h" -#include "stdbool.h" -#include "stddef.h" -#include "stdint.h" + +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/libexpr-test-support/meson.build b/src/libexpr-test-support/meson.build index 56e814cd132..a015e61cde7 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('nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libexpr-test-support/nix/meson.build b/src/libexpr-test-support/nix/meson.build new file mode 100644 index 00000000000..9e517c7f6c5 --- /dev/null +++ b/src/libexpr-test-support/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/nix/tests/libexpr.hh similarity index 94% rename from src/libexpr-test-support/tests/libexpr.hh rename to src/libexpr-test-support/nix/tests/libexpr.hh index 095ea1d0e4b..dfd5fbd3d2a 100644 --- a/src/libexpr-test-support/tests/libexpr.hh +++ b/src/libexpr-test-support/nix/tests/libexpr.hh @@ -4,16 +4,16 @@ #include #include -#include "fetch-settings.hh" -#include "value.hh" -#include "nixexpr.hh" -#include "nixexpr.hh" -#include "eval.hh" -#include "eval-gc.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" - -#include "tests/libstore.hh" +#include "nix/fetch-settings.hh" +#include "nix/value.hh" +#include "nix/nixexpr.hh" +#include "nix/nixexpr.hh" +#include "nix/eval.hh" +#include "nix/eval-gc.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" + +#include "nix/tests/libstore.hh" namespace nix { class LibExprTest : public LibStoreTest { diff --git a/src/libexpr-test-support/tests/nix_api_expr.hh b/src/libexpr-test-support/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/nix/tests/nix_api_expr.hh index 6ddca0d14d4..e5960b177a5 100644 --- a/src/libexpr-test-support/tests/nix_api_expr.hh +++ b/src/libexpr-test-support/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/nix/tests/value/context.hh similarity index 94% rename from src/libexpr-test-support/tests/value/context.hh rename to src/libexpr-test-support/nix/tests/value/context.hh index 8c68c78bbd1..d98e722421a 100644 --- a/src/libexpr-test-support/tests/value/context.hh +++ b/src/libexpr-test-support/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/tests/value/context.cc b/src/libexpr-test-support/tests/value/context.cc index 8658bdaef16..b1482ed3beb 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 d5fc6f20155..c8d38b2d839 100644 --- a/src/libexpr-tests/derived-path.cc +++ b/src/libexpr-tests/derived-path.cc @@ -2,8 +2,8 @@ #include #include -#include "tests/derived-path.hh" -#include "tests/libexpr.hh" +#include "nix/tests/derived-path.hh" +#include "nix/tests/libexpr.hh" namespace nix { diff --git a/src/libexpr-tests/error_traces.cc b/src/libexpr-tests/error_traces.cc index 53013a34a36..abba15db8cd 100644 --- a/src/libexpr-tests/error_traces.cc +++ b/src/libexpr-tests/error_traces.cc @@ -1,7 +1,7 @@ #include #include -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" namespace nix { diff --git a/src/libexpr-tests/eval.cc b/src/libexpr-tests/eval.cc index 61f6be0db6f..3bc672746ab 100644 --- a/src/libexpr-tests/eval.cc +++ b/src/libexpr-tests/eval.cc @@ -1,8 +1,8 @@ #include #include -#include "eval.hh" -#include "tests/libexpr.hh" +#include "nix/eval.hh" +#include "nix/tests/libexpr.hh" namespace nix { diff --git a/src/libexpr-tests/json.cc b/src/libexpr-tests/json.cc index f4cc118d664..67fdcf209a6 100644 --- a/src/libexpr-tests/json.cc +++ b/src/libexpr-tests/json.cc @@ -1,5 +1,5 @@ -#include "tests/libexpr.hh" -#include "value-to-json.hh" +#include "nix/tests/libexpr.hh" +#include "nix/value-to-json.hh" namespace nix { // Testing the conversion to JSON diff --git a/src/libexpr-tests/main.cc b/src/libexpr-tests/main.cc index e3412d9ef9a..719b5a727b1 100644 --- a/src/libexpr-tests/main.cc +++ b/src/libexpr-tests/main.cc @@ -1,7 +1,7 @@ #include #include -#include "globals.hh" -#include "logging.hh" +#include "nix/globals.hh" +#include "nix/logging.hh" using namespace nix; diff --git a/src/libexpr-tests/meson.build b/src/libexpr-tests/meson.build index 667a0d7b7a8..3917aa777e7 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', '-include', 'config-util.h', '-include', 'config-store.h', '-include', 'config-expr.h', diff --git a/src/libexpr-tests/nix_api_expr.cc b/src/libexpr-tests/nix_api_expr.cc index 633224ae6d2..903c7a23971 100644 --- a/src/libexpr-tests/nix_api_expr.cc +++ b/src/libexpr-tests/nix_api_expr.cc @@ -5,9 +5,9 @@ #include "nix_api_expr.h" #include "nix_api_value.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" -#include "file-system.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" +#include "nix/file-system.hh" #include #include diff --git a/src/libexpr-tests/nix_api_external.cc b/src/libexpr-tests/nix_api_external.cc index 81ff285a4ab..f3f4771c733 100644 --- a/src/libexpr-tests/nix_api_external.cc +++ b/src/libexpr-tests/nix_api_external.cc @@ -7,8 +7,8 @@ #include "nix_api_value.h" #include "nix_api_external.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" #include diff --git a/src/libexpr-tests/nix_api_value.cc b/src/libexpr-tests/nix_api_value.cc index 7fc8b4f641f..0f86ba6502a 100644 --- a/src/libexpr-tests/nix_api_value.cc +++ b/src/libexpr-tests/nix_api_value.cc @@ -6,10 +6,10 @@ #include "nix_api_value.h" #include "nix_api_expr_internal.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" -#include "gmock/gmock.h" +#include #include #include #include diff --git a/src/libexpr-tests/primops.cc b/src/libexpr-tests/primops.cc index 2bf72647737..4114f08f6f9 100644 --- a/src/libexpr-tests/primops.cc +++ b/src/libexpr-tests/primops.cc @@ -1,10 +1,10 @@ #include #include -#include "eval-settings.hh" -#include "memory-source-accessor.hh" +#include "nix/eval-settings.hh" +#include "nix/memory-source-accessor.hh" -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" namespace nix { class CaptureLogger : public Logger diff --git a/src/libexpr-tests/search-path.cc b/src/libexpr-tests/search-path.cc index 0806793557d..72f2335971f 100644 --- a/src/libexpr-tests/search-path.cc +++ b/src/libexpr-tests/search-path.cc @@ -1,7 +1,7 @@ #include #include -#include "search-path.hh" +#include "nix/search-path.hh" namespace nix { diff --git a/src/libexpr-tests/trivial.cc b/src/libexpr-tests/trivial.cc index d77b4d53b47..4ddd24d12f3 100644 --- a/src/libexpr-tests/trivial.cc +++ b/src/libexpr-tests/trivial.cc @@ -1,4 +1,4 @@ -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" namespace nix { // Testing of trivial expressions diff --git a/src/libexpr-tests/value/context.cc b/src/libexpr-tests/value/context.cc index 761286dbdcc..2f2ff7492c1 100644 --- a/src/libexpr-tests/value/context.cc +++ b/src/libexpr-tests/value/context.cc @@ -2,9 +2,9 @@ #include #include -#include "tests/path.hh" -#include "tests/libexpr.hh" -#include "tests/value/context.hh" +#include "nix/tests/path.hh" +#include "nix/tests/libexpr.hh" +#include "nix/tests/value/context.hh" namespace nix { diff --git a/src/libexpr-tests/value/print.cc b/src/libexpr-tests/value/print.cc index 43b54503546..8590f9aac68 100644 --- a/src/libexpr-tests/value/print.cc +++ b/src/libexpr-tests/value/print.cc @@ -1,7 +1,7 @@ -#include "tests/libexpr.hh" +#include "nix/tests/libexpr.hh" -#include "value.hh" -#include "print.hh" +#include "nix/value.hh" +#include "nix/print.hh" namespace nix { diff --git a/src/libexpr-tests/value/value.cc b/src/libexpr-tests/value/value.cc index 5762d5891f8..9f91f8ff5ae 100644 --- a/src/libexpr-tests/value/value.cc +++ b/src/libexpr-tests/value/value.cc @@ -1,6 +1,6 @@ -#include "value.hh" +#include "nix/value.hh" -#include "tests/libstore.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc index 822ec7620c2..8dde6479066 100644 --- a/src/libexpr/attr-path.cc +++ b/src/libexpr/attr-path.cc @@ -1,5 +1,5 @@ -#include "attr-path.hh" -#include "eval-inline.hh" +#include "nix/attr-path.hh" +#include "nix/eval-inline.hh" namespace nix { diff --git a/src/libexpr/attr-set.cc b/src/libexpr/attr-set.cc index 866ef817aa4..c6fc9f32a50 100644 --- a/src/libexpr/attr-set.cc +++ b/src/libexpr/attr-set.cc @@ -1,5 +1,5 @@ -#include "attr-set.hh" -#include "eval-inline.hh" +#include "nix/attr-set.hh" +#include "nix/eval-inline.hh" #include diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc index ea3319f9939..f35c332c986 100644 --- a/src/libexpr/eval-cache.cc +++ b/src/libexpr/eval-cache.cc @@ -1,11 +1,11 @@ -#include "users.hh" -#include "eval-cache.hh" -#include "sqlite.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "store-api.hh" +#include "nix/users.hh" +#include "nix/eval-cache.hh" +#include "nix/sqlite.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/store-api.hh" // Need specialization involving `SymbolStr` just in this one module. -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix::eval_cache { diff --git a/src/libexpr/eval-error.cc b/src/libexpr/eval-error.cc index cdb0b477242..00e49244f3a 100644 --- a/src/libexpr/eval-error.cc +++ b/src/libexpr/eval-error.cc @@ -1,6 +1,6 @@ -#include "eval-error.hh" -#include "eval.hh" -#include "value.hh" +#include "nix/eval-error.hh" +#include "nix/eval.hh" +#include "nix/value.hh" namespace nix { diff --git a/src/libexpr/eval-gc.cc b/src/libexpr/eval-gc.cc index 07ce05a2c73..defa4e9d28e 100644 --- a/src/libexpr/eval-gc.cc +++ b/src/libexpr/eval-gc.cc @@ -1,9 +1,9 @@ -#include "error.hh" -#include "environment-variables.hh" -#include "eval-settings.hh" -#include "config-global.hh" -#include "serialise.hh" -#include "eval-gc.hh" +#include "nix/error.hh" +#include "nix/environment-variables.hh" +#include "nix/eval-settings.hh" +#include "nix/config-global.hh" +#include "nix/serialise.hh" +#include "nix/eval-gc.hh" #if HAVE_BOEHMGC diff --git a/src/libexpr/eval-settings.cc b/src/libexpr/eval-settings.cc index ade0abf9af6..b903ee549ed 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 6a45f24b82a..8ae3b83f585 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1,24 +1,25 @@ -#include "eval.hh" -#include "eval-settings.hh" -#include "primops.hh" -#include "print-options.hh" -#include "exit.hh" -#include "types.hh" -#include "util.hh" -#include "store-api.hh" -#include "derivations.hh" -#include "downstream-placeholder.hh" -#include "eval-inline.hh" -#include "filetransfer.hh" -#include "function-trace.hh" -#include "profiles.hh" -#include "print.hh" -#include "filtering-source-accessor.hh" -#include "memory-source-accessor.hh" -#include "gc-small-vector.hh" -#include "url.hh" -#include "fetch-to-store.hh" -#include "tarball.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/primops.hh" +#include "nix/print-options.hh" +#include "nix/exit.hh" +#include "nix/types.hh" +#include "nix/util.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/eval-inline.hh" +#include "nix/filetransfer.hh" +#include "nix/function-trace.hh" +#include "nix/profiles.hh" +#include "nix/print.hh" +#include "nix/filtering-source-accessor.hh" +#include "nix/memory-source-accessor.hh" +#include "nix/gc-small-vector.hh" +#include "nix/url.hh" +#include "nix/fetch-to-store.hh" +#include "nix/tarball.hh" + #include "parser-tab.hh" #include @@ -38,7 +39,7 @@ # include #endif -#include "strings-inline.hh" +#include "nix/strings-inline.hh" using json = nlohmann::json; diff --git a/src/libexpr/function-trace.cc b/src/libexpr/function-trace.cc index c6057b3842f..9c6e54e4b51 100644 --- a/src/libexpr/function-trace.cc +++ b/src/libexpr/function-trace.cc @@ -1,5 +1,5 @@ -#include "function-trace.hh" -#include "logging.hh" +#include "nix/function-trace.hh" +#include "nix/logging.hh" namespace nix { diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index 1ac13fcd2b1..61b44aa1768 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -1,8 +1,8 @@ -#include "get-drvs.hh" -#include "eval-inline.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "path-with-outputs.hh" +#include "nix/get-drvs.hh" +#include "nix/eval-inline.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/path-with-outputs.hh" #include #include diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc index 17cab7ad5da..d5da3f2b119 100644 --- a/src/libexpr/json-to-value.cc +++ b/src/libexpr/json-to-value.cc @@ -1,6 +1,6 @@ -#include "json-to-value.hh" -#include "value.hh" -#include "eval.hh" +#include "nix/json-to-value.hh" +#include "nix/value.hh" +#include "nix/eval.hh" #include #include diff --git a/src/libexpr/lexer-helpers.cc b/src/libexpr/lexer-helpers.cc index d9eeb73e269..9eb4502fc97 100644 --- a/src/libexpr/lexer-helpers.cc +++ b/src/libexpr/lexer-helpers.cc @@ -1,7 +1,8 @@ #include "lexer-tab.hh" -#include "lexer-helpers.hh" #include "parser-tab.hh" +#include "nix/lexer-helpers.hh" + void nix::lexer::internal::initLoc(YYLTYPE * loc) { loc->beginOffset = loc->endOffset = 0; diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index 067f86e0161..c8a5ec9fdd0 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -16,7 +16,7 @@ %top { #include "parser-tab.hh" // YYSTYPE -#include "parser-state.hh" +#include "nix/parser-state.hh" } %{ @@ -24,9 +24,9 @@ #pragma clang diagnostic ignored "-Wunneeded-internal-declaration" #endif -#include "nixexpr.hh" +#include "nix/nixexpr.hh" #include "parser-tab.hh" -#include "lexer-helpers.hh" +#include "nix/lexer-helpers.hh" namespace nix { struct LexerState; diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build index 987300d58c1..0061e9ef0e3 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/config-fetchers.h', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -154,38 +149,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', - 'pos-idx.hh', - 'pos-table.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('nix') subdir('primops') diff --git a/src/libexpr/attr-path.hh b/src/libexpr/nix/attr-path.hh similarity index 95% rename from src/libexpr/attr-path.hh rename to src/libexpr/nix/attr-path.hh index eb00ffb93e4..06d00efc268 100644 --- a/src/libexpr/attr-path.hh +++ b/src/libexpr/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/nix/attr-set.hh similarity index 98% rename from src/libexpr/attr-set.hh rename to src/libexpr/nix/attr-set.hh index 4df9a1acdc9..93360e4e3df 100644 --- a/src/libexpr/attr-set.hh +++ b/src/libexpr/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/nix/eval-cache.hh similarity index 97% rename from src/libexpr/eval-cache.hh rename to src/libexpr/nix/eval-cache.hh index b1911e3a4f7..899ae715b88 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/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/nix/eval-error.hh similarity index 98% rename from src/libexpr/eval-error.hh rename to src/libexpr/nix/eval-error.hh index ed004eb53a0..3dee88fa4da 100644 --- a/src/libexpr/eval-error.hh +++ b/src/libexpr/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/nix/eval-gc.hh similarity index 100% rename from src/libexpr/eval-gc.hh rename to src/libexpr/nix/eval-gc.hh diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/nix/eval-inline.hh similarity index 97% rename from src/libexpr/eval-inline.hh rename to src/libexpr/nix/eval-inline.hh index 631c0f39610..d7abf84223f 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/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/nix/eval-settings.hh similarity index 99% rename from src/libexpr/eval-settings.hh rename to src/libexpr/nix/eval-settings.hh index fe947aefd3f..f3fa04fb443 100644 --- a/src/libexpr/eval-settings.hh +++ b/src/libexpr/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/nix/eval.hh similarity index 98% rename from src/libexpr/eval.hh rename to src/libexpr/nix/eval.hh index b11e40c30ca..60d1e2c4c11 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/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 @@ -929,4 +929,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/nix/function-trace.hh similarity index 88% rename from src/libexpr/function-trace.hh rename to src/libexpr/nix/function-trace.hh index 91439b0aad2..59743fe79e9 100644 --- a/src/libexpr/function-trace.hh +++ b/src/libexpr/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/nix/gc-small-vector.hh similarity index 96% rename from src/libexpr/gc-small-vector.hh rename to src/libexpr/nix/gc-small-vector.hh index 8330dd2dca1..2becffe7ca1 100644 --- a/src/libexpr/gc-small-vector.hh +++ b/src/libexpr/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/nix/get-drvs.hh similarity index 98% rename from src/libexpr/get-drvs.hh rename to src/libexpr/nix/get-drvs.hh index e4e277af8cc..aeb70c79e2b 100644 --- a/src/libexpr/get-drvs.hh +++ b/src/libexpr/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/nix/json-to-value.hh similarity index 89% rename from src/libexpr/json-to-value.hh rename to src/libexpr/nix/json-to-value.hh index 3c8fa5cc00a..a2e0d303d13 100644 --- a/src/libexpr/json-to-value.hh +++ b/src/libexpr/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/nix/lexer-helpers.hh similarity index 100% rename from src/libexpr/lexer-helpers.hh rename to src/libexpr/nix/lexer-helpers.hh diff --git a/src/libexpr/nix/meson.build b/src/libexpr/nix/meson.build new file mode 100644 index 00000000000..ece56f80ae8 --- /dev/null +++ b/src/libexpr/nix/meson.build @@ -0,0 +1,39 @@ +# 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', + 'pos-idx.hh', + 'pos-table.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/nix/nixexpr.hh similarity index 99% rename from src/libexpr/nixexpr.hh rename to src/libexpr/nix/nixexpr.hh index a7ad580d2df..175ff0a3233 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/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/nix/parser-state.hh similarity index 99% rename from src/libexpr/parser-state.hh rename to src/libexpr/nix/parser-state.hh index 21a880e8eb7..aa3c2455dd1 100644 --- a/src/libexpr/parser-state.hh +++ b/src/libexpr/nix/parser-state.hh @@ -3,7 +3,7 @@ #include -#include "eval.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/pos-idx.hh b/src/libexpr/nix/pos-idx.hh similarity index 100% rename from src/libexpr/pos-idx.hh rename to src/libexpr/nix/pos-idx.hh diff --git a/src/libexpr/pos-table.hh b/src/libexpr/nix/pos-table.hh similarity index 96% rename from src/libexpr/pos-table.hh rename to src/libexpr/nix/pos-table.hh index ba2b91cf35e..497c9c35d4a 100644 --- a/src/libexpr/pos-table.hh +++ b/src/libexpr/nix/pos-table.hh @@ -3,9 +3,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/libexpr/primops.hh b/src/libexpr/nix/primops.hh similarity index 98% rename from src/libexpr/primops.hh rename to src/libexpr/nix/primops.hh index 9f76975db8d..75c6f0d4668 100644 --- a/src/libexpr/primops.hh +++ b/src/libexpr/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/nix/print-ambiguous.hh similarity index 95% rename from src/libexpr/print-ambiguous.hh rename to src/libexpr/nix/print-ambiguous.hh index 50c260a9b84..06f4e805c9d 100644 --- a/src/libexpr/print-ambiguous.hh +++ b/src/libexpr/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/nix/print-options.hh similarity index 100% rename from src/libexpr/print-options.hh rename to src/libexpr/nix/print-options.hh diff --git a/src/libexpr/print.hh b/src/libexpr/nix/print.hh similarity index 97% rename from src/libexpr/print.hh rename to src/libexpr/nix/print.hh index 7ddda81b88f..09405e8f00b 100644 --- a/src/libexpr/print.hh +++ b/src/libexpr/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/nix/repl-exit-status.hh similarity index 100% rename from src/libexpr/repl-exit-status.hh rename to src/libexpr/nix/repl-exit-status.hh diff --git a/src/libexpr/search-path.hh b/src/libexpr/nix/search-path.hh similarity index 98% rename from src/libexpr/search-path.hh rename to src/libexpr/nix/search-path.hh index acd84363853..22a97b5f362 100644 --- a/src/libexpr/search-path.hh +++ b/src/libexpr/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/nix/symbol-table.hh similarity index 97% rename from src/libexpr/symbol-table.hh rename to src/libexpr/nix/symbol-table.hh index be12f6248dc..b55674b1239 100644 --- a/src/libexpr/symbol-table.hh +++ b/src/libexpr/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/nix/value-to-json.hh similarity index 90% rename from src/libexpr/value-to-json.hh rename to src/libexpr/nix/value-to-json.hh index 867c4e3a849..9875c83c6bb 100644 --- a/src/libexpr/value-to-json.hh +++ b/src/libexpr/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/nix/value-to-xml.hh similarity index 82% rename from src/libexpr/value-to-xml.hh rename to src/libexpr/nix/value-to-xml.hh index 6d702c0f236..3e9dce4d69b 100644 --- a/src/libexpr/value-to-xml.hh +++ b/src/libexpr/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/nix/value.hh similarity index 98% rename from src/libexpr/value.hh rename to src/libexpr/nix/value.hh index 8925693e3d0..45155b3d446 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/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/nix/value/context.hh similarity index 95% rename from src/libexpr/value/context.hh rename to src/libexpr/nix/value/context.hh index d6791c6e49c..f996cce42e1 100644 --- a/src/libexpr/value/context.hh +++ b/src/libexpr/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/nixexpr.cc b/src/libexpr/nixexpr.cc index 063ff07537b..7250e18d953 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/parser.y b/src/libexpr/parser.y index bde72140114..c90bafa059a 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 @@ -514,7 +514,7 @@ formal %% -#include "eval.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index 3d602ae2dcd..5aae69f9da5 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -1,5 +1,5 @@ -#include "store-api.hh" -#include "eval.hh" +#include "nix/store-api.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 7c9ce71045d..4de55e97ee0 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1,19 +1,19 @@ -#include "derivations.hh" -#include "downstream-placeholder.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "eval-settings.hh" -#include "gc-small-vector.hh" -#include "json-to-value.hh" -#include "names.hh" -#include "path-references.hh" -#include "store-api.hh" -#include "util.hh" -#include "processes.hh" -#include "value-to-json.hh" -#include "value-to-xml.hh" -#include "primops.hh" -#include "fetch-to-store.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/eval-inline.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/gc-small-vector.hh" +#include "nix/json-to-value.hh" +#include "nix/names.hh" +#include "nix/path-references.hh" +#include "nix/store-api.hh" +#include "nix/util.hh" +#include "nix/processes.hh" +#include "nix/value-to-json.hh" +#include "nix/value-to-xml.hh" +#include "nix/primops.hh" +#include "nix/fetch-to-store.hh" #include #include diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc index ede7d97ba34..832d17cbb90 100644 --- a/src/libexpr/primops/context.cc +++ b/src/libexpr/primops/context.cc @@ -1,7 +1,7 @@ -#include "primops.hh" -#include "eval-inline.hh" -#include "derivations.hh" -#include "store-api.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libexpr/primops/fetchClosure.cc b/src/libexpr/primops/fetchClosure.cc index 04b8d059599..fc48c54eea3 100644 --- a/src/libexpr/primops/fetchClosure.cc +++ b/src/libexpr/primops/fetchClosure.cc @@ -1,8 +1,8 @@ -#include "primops.hh" -#include "store-api.hh" -#include "realisation.hh" -#include "make-content-addressed.hh" -#include "url.hh" +#include "nix/primops.hh" +#include "nix/store-api.hh" +#include "nix/realisation.hh" +#include "nix/make-content-addressed.hh" +#include "nix/url.hh" namespace nix { diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc index 64e3abf2db4..59698552e8a 100644 --- a/src/libexpr/primops/fetchMercurial.cc +++ b/src/libexpr/primops/fetchMercurial.cc @@ -1,10 +1,10 @@ -#include "primops.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "url.hh" -#include "url-parts.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" namespace nix { diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index bd013eab294..b14d5411315 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -1,15 +1,15 @@ -#include "attrs.hh" -#include "primops.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "filetransfer.hh" -#include "registry.hh" -#include "tarball.hh" -#include "url.hh" -#include "value-to-json.hh" -#include "fetch-to-store.hh" +#include "nix/attrs.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/filetransfer.hh" +#include "nix/registry.hh" +#include "nix/tarball.hh" +#include "nix/url.hh" +#include "nix/value-to-json.hh" +#include "nix/fetch-to-store.hh" #include diff --git a/src/libexpr/primops/fromTOML.cc b/src/libexpr/primops/fromTOML.cc index 40442505407..05fe2e7bdaa 100644 --- a/src/libexpr/primops/fromTOML.cc +++ b/src/libexpr/primops/fromTOML.cc @@ -1,5 +1,5 @@ -#include "primops.hh" -#include "eval-inline.hh" +#include "nix/primops.hh" +#include "nix/eval-inline.hh" #include diff --git a/src/libexpr/print-ambiguous.cc b/src/libexpr/print-ambiguous.cc index a40c98643e3..b275e1e5c4b 100644 --- a/src/libexpr/print-ambiguous.cc +++ b/src/libexpr/print-ambiguous.cc @@ -1,7 +1,7 @@ -#include "print-ambiguous.hh" -#include "print.hh" -#include "signals.hh" -#include "eval.hh" +#include "nix/print-ambiguous.hh" +#include "nix/print.hh" +#include "nix/signals.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index d62aaf25f78..39f97e68b76 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -2,13 +2,13 @@ #include #include -#include "print.hh" -#include "ansicolor.hh" -#include "signals.hh" -#include "store-api.hh" -#include "terminal.hh" -#include "english.hh" -#include "eval.hh" +#include "nix/print.hh" +#include "nix/ansicolor.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/terminal.hh" +#include "nix/english.hh" +#include "nix/eval.hh" namespace nix { diff --git a/src/libexpr/search-path.cc b/src/libexpr/search-path.cc index 657744e745c..8c33430f1bb 100644 --- a/src/libexpr/search-path.cc +++ b/src/libexpr/search-path.cc @@ -1,4 +1,4 @@ -#include "search-path.hh" +#include "nix/search-path.hh" namespace nix { diff --git a/src/libexpr/value-to-json.cc b/src/libexpr/value-to-json.cc index 5aa4fe4fdca..846776aed15 100644 --- a/src/libexpr/value-to-json.cc +++ b/src/libexpr/value-to-json.cc @@ -1,7 +1,7 @@ -#include "value-to-json.hh" -#include "eval-inline.hh" -#include "store-api.hh" -#include "signals.hh" +#include "nix/value-to-json.hh" +#include "nix/eval-inline.hh" +#include "nix/store-api.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libexpr/value-to-xml.cc b/src/libexpr/value-to-xml.cc index 9734ebec498..e4df226a433 100644 --- a/src/libexpr/value-to-xml.cc +++ b/src/libexpr/value-to-xml.cc @@ -1,7 +1,7 @@ -#include "value-to-xml.hh" -#include "xml-writer.hh" -#include "eval-inline.hh" -#include "signals.hh" +#include "nix/value-to-xml.hh" +#include "nix/xml-writer.hh" +#include "nix/eval-inline.hh" +#include "nix/signals.hh" #include diff --git a/src/libexpr/value/context.cc b/src/libexpr/value/context.cc index 6d9633268df..2052e193aab 100644 --- a/src/libexpr/value/context.cc +++ b/src/libexpr/value/context.cc @@ -1,5 +1,5 @@ -#include "util.hh" -#include "value/context.hh" +#include "nix/util.hh" +#include "nix/value/context.hh" #include diff --git a/src/libfetchers-tests/git-utils.cc b/src/libfetchers-tests/git-utils.cc index 51622a95507..6df10316683 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 11a65a66ad3..5c64700b55c 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/config-fetchers.h', language : 'cpp', ) diff --git a/src/libfetchers-tests/public-key.cc b/src/libfetchers-tests/public-key.cc index 80796bd0fc9..98965cf79f9 100644 --- a/src/libfetchers-tests/public-key.cc +++ b/src/libfetchers-tests/public-key.cc @@ -1,8 +1,8 @@ #include -#include "fetchers.hh" -#include "json-utils.hh" +#include "nix/fetchers.hh" +#include "nix/json-utils.hh" #include -#include "tests/characterization.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libfetchers/attrs.cc b/src/libfetchers/attrs.cc index 25d04cdc950..68e5e932b13 100644 --- a/src/libfetchers/attrs.cc +++ b/src/libfetchers/attrs.cc @@ -1,5 +1,5 @@ -#include "attrs.hh" -#include "fetchers.hh" +#include "nix/attrs.hh" +#include "nix/fetchers.hh" #include diff --git a/src/libfetchers/cache.cc b/src/libfetchers/cache.cc index 6c2241f3af7..089c8d6f3fb 100644 --- a/src/libfetchers/cache.cc +++ b/src/libfetchers/cache.cc @@ -1,8 +1,8 @@ -#include "cache.hh" -#include "users.hh" -#include "sqlite.hh" -#include "sync.hh" -#include "store-api.hh" +#include "nix/cache.hh" +#include "nix/users.hh" +#include "nix/sqlite.hh" +#include "nix/sync.hh" +#include "nix/store-api.hh" #include diff --git a/src/libfetchers/fetch-settings.cc b/src/libfetchers/fetch-settings.cc index c7ed4c7af08..bdd09553865 100644 --- a/src/libfetchers/fetch-settings.cc +++ b/src/libfetchers/fetch-settings.cc @@ -1,4 +1,4 @@ -#include "fetch-settings.hh" +#include "nix/fetch-settings.hh" namespace nix::fetchers { diff --git a/src/libfetchers/fetch-to-store.cc b/src/libfetchers/fetch-to-store.cc index fe347a59d5b..2be08feaf49 100644 --- a/src/libfetchers/fetch-to-store.cc +++ b/src/libfetchers/fetch-to-store.cc @@ -1,6 +1,6 @@ -#include "fetch-to-store.hh" -#include "fetchers.hh" -#include "cache.hh" +#include "nix/fetch-to-store.hh" +#include "nix/fetchers.hh" +#include "nix/cache.hh" namespace nix { diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc index abf021554e7..068a6722f83 100644 --- a/src/libfetchers/fetchers.cc +++ b/src/libfetchers/fetchers.cc @@ -1,10 +1,10 @@ -#include "fetchers.hh" -#include "store-api.hh" -#include "source-path.hh" -#include "fetch-to-store.hh" -#include "json-utils.hh" -#include "store-path-accessor.hh" -#include "fetch-settings.hh" +#include "nix/fetchers.hh" +#include "nix/store-api.hh" +#include "nix/source-path.hh" +#include "nix/fetch-to-store.hh" +#include "nix/json-utils.hh" +#include "nix/store-path-accessor.hh" +#include "nix/fetch-settings.hh" #include diff --git a/src/libfetchers/filtering-source-accessor.cc b/src/libfetchers/filtering-source-accessor.cc index d4557b6d4dd..1a9c8ae6bde 100644 --- a/src/libfetchers/filtering-source-accessor.cc +++ b/src/libfetchers/filtering-source-accessor.cc @@ -1,4 +1,4 @@ -#include "filtering-source-accessor.hh" +#include "nix/filtering-source-accessor.hh" namespace nix { diff --git a/src/libfetchers/git-lfs-fetch.cc b/src/libfetchers/git-lfs-fetch.cc index bd6c0143548..9f48d1e981f 100644 --- a/src/libfetchers/git-lfs-fetch.cc +++ b/src/libfetchers/git-lfs-fetch.cc @@ -1,10 +1,10 @@ -#include "git-lfs-fetch.hh" -#include "git-utils.hh" -#include "filetransfer.hh" -#include "processes.hh" -#include "url.hh" -#include "users.hh" -#include "hash.hh" +#include "nix/git-lfs-fetch.hh" +#include "nix/git-utils.hh" +#include "nix/filetransfer.hh" +#include "nix/processes.hh" +#include "nix/url.hh" +#include "nix/users.hh" +#include "nix/hash.hh" #include #include diff --git a/src/libfetchers/git-utils.cc b/src/libfetchers/git-utils.cc index a2761a543ee..ad8a6e89cd2 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 8d4d9abcc66..1e7a1a59b54 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 ec469df7cd3..0be940790eb 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/indirect.cc b/src/libfetchers/indirect.cc index 0e1b86711f0..7e5eb0be348 100644 --- a/src/libfetchers/indirect.cc +++ b/src/libfetchers/indirect.cc @@ -1,6 +1,6 @@ -#include "fetchers.hh" -#include "url-parts.hh" -#include "path.hh" +#include "nix/fetchers.hh" +#include "nix/url-parts.hh" +#include "nix/path.hh" namespace nix::fetchers { diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc index 61cbca202c3..73e677f447b 100644 --- a/src/libfetchers/mercurial.cc +++ b/src/libfetchers/mercurial.cc @@ -1,13 +1,13 @@ -#include "fetchers.hh" -#include "processes.hh" -#include "users.hh" -#include "cache.hh" -#include "globals.hh" -#include "tarfile.hh" -#include "store-api.hh" -#include "url-parts.hh" -#include "store-path-accessor.hh" -#include "fetch-settings.hh" +#include "nix/fetchers.hh" +#include "nix/processes.hh" +#include "nix/users.hh" +#include "nix/cache.hh" +#include "nix/globals.hh" +#include "nix/tarfile.hh" +#include "nix/store-api.hh" +#include "nix/url-parts.hh" +#include "nix/store-path-accessor.hh" +#include "nix/fetch-settings.hh" #include diff --git a/src/libfetchers/meson.build b/src/libfetchers/meson.build index 725254b56ce..317d21aa44b 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/config-fetchers.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('nix') this_library = library( 'nixfetchers', diff --git a/src/libfetchers/attrs.hh b/src/libfetchers/nix/attrs.hh similarity index 96% rename from src/libfetchers/attrs.hh rename to src/libfetchers/nix/attrs.hh index 97a74bce013..f1fdee35f05 100644 --- a/src/libfetchers/attrs.hh +++ b/src/libfetchers/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/nix/cache.hh similarity index 97% rename from src/libfetchers/cache.hh rename to src/libfetchers/nix/cache.hh index 4d834fe0ca3..5924017858d 100644 --- a/src/libfetchers/cache.hh +++ b/src/libfetchers/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/nix/fetch-settings.hh similarity index 98% rename from src/libfetchers/fetch-settings.hh rename to src/libfetchers/nix/fetch-settings.hh index 2ad8aa32756..965c0b5c1d0 100644 --- a/src/libfetchers/fetch-settings.hh +++ b/src/libfetchers/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/nix/fetch-to-store.hh similarity index 71% rename from src/libfetchers/fetch-to-store.hh rename to src/libfetchers/nix/fetch-to-store.hh index c762629f3cb..7ef809c1cdf 100644 --- a/src/libfetchers/fetch-to-store.hh +++ b/src/libfetchers/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/nix/fetchers.hh similarity index 97% rename from src/libfetchers/fetchers.hh rename to src/libfetchers/nix/fetchers.hh index 37de1f507d9..2b7fdf309b8 100644 --- a/src/libfetchers/fetchers.hh +++ b/src/libfetchers/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/nix/filtering-source-accessor.hh similarity index 98% rename from src/libfetchers/filtering-source-accessor.hh rename to src/libfetchers/nix/filtering-source-accessor.hh index 1f8d84e531e..04855c070fd 100644 --- a/src/libfetchers/filtering-source-accessor.hh +++ b/src/libfetchers/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/nix/git-lfs-fetch.hh similarity index 92% rename from src/libfetchers/git-lfs-fetch.hh rename to src/libfetchers/nix/git-lfs-fetch.hh index 36df9196207..cd7c86a828f 100644 --- a/src/libfetchers/git-lfs-fetch.hh +++ b/src/libfetchers/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/nix/git-utils.hh similarity index 98% rename from src/libfetchers/git-utils.hh rename to src/libfetchers/nix/git-utils.hh index c683bd05805..65c86a7c4d0 100644 --- a/src/libfetchers/git-utils.hh +++ b/src/libfetchers/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/nix/meson.build b/src/libfetchers/nix/meson.build new file mode 100644 index 00000000000..eb02be43cc1 --- /dev/null +++ b/src/libfetchers/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/nix/registry.hh similarity index 96% rename from src/libfetchers/registry.hh rename to src/libfetchers/nix/registry.hh index 8f47e15905e..7c091ea12c9 100644 --- a/src/libfetchers/registry.hh +++ b/src/libfetchers/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/nix/store-path-accessor.hh similarity index 87% rename from src/libfetchers/store-path-accessor.hh rename to src/libfetchers/nix/store-path-accessor.hh index 989cf3fa29c..8e65fda1160 100644 --- a/src/libfetchers/store-path-accessor.hh +++ b/src/libfetchers/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/nix/tarball.hh similarity index 90% rename from src/libfetchers/tarball.hh rename to src/libfetchers/nix/tarball.hh index 2042041d5ad..63a21712496 100644 --- a/src/libfetchers/tarball.hh +++ b/src/libfetchers/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/path.cc b/src/libfetchers/path.cc index 9d1cce0f398..b16ab76318f 100644 --- a/src/libfetchers/path.cc +++ b/src/libfetchers/path.cc @@ -1,7 +1,7 @@ -#include "fetchers.hh" -#include "store-api.hh" -#include "archive.hh" -#include "store-path-accessor.hh" +#include "nix/fetchers.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/store-path-accessor.hh" namespace nix::fetchers { diff --git a/src/libfetchers/registry.cc b/src/libfetchers/registry.cc index c18e12d2339..ec470159bc0 100644 --- a/src/libfetchers/registry.cc +++ b/src/libfetchers/registry.cc @@ -1,10 +1,10 @@ -#include "fetch-settings.hh" -#include "registry.hh" -#include "tarball.hh" -#include "users.hh" -#include "globals.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/fetch-settings.hh" +#include "nix/registry.hh" +#include "nix/tarball.hh" +#include "nix/users.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" #include diff --git a/src/libfetchers/store-path-accessor.cc b/src/libfetchers/store-path-accessor.cc index 528bf2a4f51..997582b577c 100644 --- a/src/libfetchers/store-path-accessor.cc +++ b/src/libfetchers/store-path-accessor.cc @@ -1,5 +1,5 @@ -#include "store-path-accessor.hh" -#include "store-api.hh" +#include "nix/store-path-accessor.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index 699612e250c..01bff82f720 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -1,14 +1,14 @@ -#include "tarball.hh" -#include "fetchers.hh" -#include "cache.hh" -#include "filetransfer.hh" -#include "store-api.hh" -#include "archive.hh" -#include "tarfile.hh" -#include "types.hh" -#include "store-path-accessor.hh" -#include "store-api.hh" -#include "git-utils.hh" +#include "nix/tarball.hh" +#include "nix/fetchers.hh" +#include "nix/cache.hh" +#include "nix/filetransfer.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/tarfile.hh" +#include "nix/types.hh" +#include "nix/store-path-accessor.hh" +#include "nix/store-api.hh" +#include "nix/git-utils.hh" namespace nix::fetchers { diff --git a/src/libflake-c/meson.build b/src/libflake-c/meson.build index 85d20644d59..b4f3134da62 100644 --- a/src/libflake-c/meson.build +++ b/src/libflake-c/meson.build @@ -42,11 +42,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', # From C libraries, for our public, installed headers too '-include', 'config-util.h', diff --git a/src/libflake-c/nix_api_flake.cc b/src/libflake-c/nix_api_flake.cc index 17cf6572da2..c1562e44e7e 100644 --- a/src/libflake-c/nix_api_flake.cc +++ b/src/libflake-c/nix_api_flake.cc @@ -2,7 +2,7 @@ #include "nix_api_flake_internal.hh" #include "nix_api_util_internal.h" -#include "flake/flake.hh" +#include "nix/flake/flake.hh" nix_flake_settings * nix_flake_settings_new(nix_c_context * context) { diff --git a/src/libflake-c/nix_api_flake_internal.hh b/src/libflake-c/nix_api_flake_internal.hh index 4c154a34229..4565b4f5dca 100644 --- a/src/libflake-c/nix_api_flake_internal.hh +++ b/src/libflake-c/nix_api_flake_internal.hh @@ -1,7 +1,7 @@ #pragma once -#include "ref.hh" -#include "flake/settings.hh" +#include "nix/ref.hh" +#include "nix/flake/settings.hh" struct nix_flake_settings { diff --git a/src/libflake-tests/flakeref.cc b/src/libflake-tests/flakeref.cc index 2b1f5124b52..f378ba6d6e8 100644 --- a/src/libflake-tests/flakeref.cc +++ b/src/libflake-tests/flakeref.cc @@ -1,7 +1,7 @@ #include -#include "fetch-settings.hh" -#include "flake/flakeref.hh" +#include "nix/fetch-settings.hh" +#include "nix/flake/flakeref.hh" namespace nix { diff --git a/src/libflake-tests/meson.build b/src/libflake-tests/meson.build index 1c8765f21d6..4012582f2ba 100644 --- a/src/libflake-tests/meson.build +++ b/src/libflake-tests/meson.build @@ -35,9 +35,9 @@ deps_private += gtest add_project_arguments( # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', language : 'cpp', ) diff --git a/src/libflake-tests/nix_api_flake.cc b/src/libflake-tests/nix_api_flake.cc index 21109d181a4..004c635a086 100644 --- a/src/libflake-tests/nix_api_flake.cc +++ b/src/libflake-tests/nix_api_flake.cc @@ -6,8 +6,8 @@ #include "nix_api_value.h" #include "nix_api_flake.h" -#include "tests/nix_api_expr.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_expr.hh" +#include "nix/tests/string_callback.hh" #include #include diff --git a/src/libflake-tests/url-name.cc b/src/libflake-tests/url-name.cc index 15bc6b11165..c795850f97b 100644 --- a/src/libflake-tests/url-name.cc +++ b/src/libflake-tests/url-name.cc @@ -1,4 +1,4 @@ -#include "flake/url-name.hh" +#include "nix/flake/url-name.hh" #include namespace nix { diff --git a/src/libflake/flake/config.cc b/src/libflake/flake/config.cc index 4879de46330..a0ddf0387f5 100644 --- a/src/libflake/flake/config.cc +++ b/src/libflake/flake/config.cc @@ -1,7 +1,7 @@ -#include "users.hh" -#include "config-global.hh" -#include "flake/settings.hh" -#include "flake.hh" +#include "nix/users.hh" +#include "nix/config-global.hh" +#include "nix/flake/settings.hh" +#include "nix/flake/flake.hh" #include diff --git a/src/libflake/flake/flake.cc b/src/libflake/flake/flake.cc index e573c55c45d..c2d2e78e6eb 100644 --- a/src/libflake/flake/flake.cc +++ b/src/libflake/flake/flake.cc @@ -1,18 +1,18 @@ -#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 diff --git a/src/libflake/flake/flakeref.cc b/src/libflake/flake/flakeref.cc index 4fc720eb5a3..340fe4dc73c 100644 --- a/src/libflake/flake/flakeref.cc +++ b/src/libflake/flake/flakeref.cc @@ -1,8 +1,8 @@ -#include "flakeref.hh" -#include "store-api.hh" -#include "url.hh" -#include "url-parts.hh" -#include "fetchers.hh" +#include "nix/flake/flakeref.hh" +#include "nix/store-api.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" +#include "nix/fetchers.hh" namespace nix { diff --git a/src/libflake/flake/lockfile.cc b/src/libflake/flake/lockfile.cc index b0971a6969a..08a3843668a 100644 --- a/src/libflake/flake/lockfile.cc +++ b/src/libflake/flake/lockfile.cc @@ -1,10 +1,10 @@ #include -#include "fetch-settings.hh" -#include "flake/settings.hh" -#include "lockfile.hh" -#include "store-api.hh" -#include "strings.hh" +#include "nix/fetch-settings.hh" +#include "nix/flake/settings.hh" +#include "nix/flake/lockfile.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libflake/flake/settings.cc b/src/libflake/flake/settings.cc index 6a0294e6229..4e12b2ed5cf 100644 --- a/src/libflake/flake/settings.cc +++ b/src/libflake/flake/settings.cc @@ -1,4 +1,4 @@ -#include "flake/settings.hh" +#include "nix/flake/settings.hh" namespace nix::flake { diff --git a/src/libflake/flake/url-name.cc b/src/libflake/flake/url-name.cc index d62b345522a..3e3311cf740 100644 --- a/src/libflake/flake/url-name.cc +++ b/src/libflake/flake/url-name.cc @@ -1,4 +1,4 @@ -#include "url-name.hh" +#include "nix/flake/url-name.hh" #include #include diff --git a/src/libflake/meson.build b/src/libflake/meson.build index b757d0d7633..6c8e8115655 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/config-fetchers.h', + '-include', 'nix/config-expr.hh', language : 'cpp', ) @@ -48,15 +48,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('nix') this_library = library( 'nixflake', diff --git a/src/libflake/flake/flake.hh b/src/libflake/nix/flake/flake.hh similarity index 98% rename from src/libflake/flake/flake.hh rename to src/libflake/nix/flake/flake.hh index d8cd9aac0ef..320e0521087 100644 --- a/src/libflake/flake/flake.hh +++ b/src/libflake/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/nix/flake/flakeref.hh similarity index 97% rename from src/libflake/flake/flakeref.hh rename to src/libflake/nix/flake/flakeref.hh index d3c15018e24..93ebaa497bf 100644 --- a/src/libflake/flake/flakeref.hh +++ b/src/libflake/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/nix/flake/lockfile.hh similarity index 98% rename from src/libflake/flake/lockfile.hh rename to src/libflake/nix/flake/lockfile.hh index cbc6d01ebce..97bd7a49538 100644 --- a/src/libflake/flake/lockfile.hh +++ b/src/libflake/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/nix/flake/settings.hh similarity index 93% rename from src/libflake/flake/settings.hh rename to src/libflake/nix/flake/settings.hh index 991eaca1f63..5420bcaac63 100644 --- a/src/libflake/flake/settings.hh +++ b/src/libflake/nix/flake/settings.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "types.hh" -#include "config.hh" -#include "util.hh" +#include "nix/types.hh" +#include "nix/config.hh" +#include "nix/util.hh" #include #include diff --git a/src/libflake/flake/url-name.hh b/src/libflake/nix/flake/url-name.hh similarity index 85% rename from src/libflake/flake/url-name.hh rename to src/libflake/nix/flake/url-name.hh index 6f32754d268..4577e8f38d6 100644 --- a/src/libflake/flake/url-name.hh +++ b/src/libflake/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/nix/meson.build b/src/libflake/nix/meson.build new file mode 100644 index 00000000000..023bd64bdbc --- /dev/null +++ b/src/libflake/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/libmain-c/meson.build b/src/libmain-c/meson.build index d875d2c3f55..8081843e002 100644 --- a/src/libmain-c/meson.build +++ b/src/libmain-c/meson.build @@ -40,9 +40,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-main.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-main.hh', # From C libraries, for our public, installed headers too '-include', 'config-util.h', diff --git a/src/libmain-c/nix_api_main.cc b/src/libmain-c/nix_api_main.cc index 692d53f47e0..61dbceff8c4 100644 --- a/src/libmain-c/nix_api_main.cc +++ b/src/libmain-c/nix_api_main.cc @@ -3,7 +3,7 @@ #include "nix_api_util.h" #include "nix_api_util_internal.h" -#include "plugin.hh" +#include "nix/plugin.hh" nix_err nix_init_plugins(nix_c_context * context) { diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc index 13d358623cc..8d531bbcbd7 100644 --- a/src/libmain/common-args.cc +++ b/src/libmain/common-args.cc @@ -1,11 +1,11 @@ -#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/loggers.cc b/src/libmain/loggers.cc index 836ea3dc878..b2ebb232eb1 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 00f945f494b..8c5ae23e237 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 = [config_h] + files( - 'common-args.hh', - 'loggers.hh', - 'plugin.hh', - 'progress-bar.hh', - 'shared.hh', -) +subdir('nix') this_library = library( 'nixmain', diff --git a/src/libmain/common-args.hh b/src/libmain/nix/common-args.hh similarity index 96% rename from src/libmain/common-args.hh rename to src/libmain/nix/common-args.hh index c35406c3bcc..5622115b84f 100644 --- a/src/libmain/common-args.hh +++ b/src/libmain/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/nix/loggers.hh similarity index 91% rename from src/libmain/loggers.hh rename to src/libmain/nix/loggers.hh index e5721420cb6..64e89990185 100644 --- a/src/libmain/loggers.hh +++ b/src/libmain/nix/loggers.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libmain/nix/meson.build b/src/libmain/nix/meson.build new file mode 100644 index 00000000000..8584b9042ad --- /dev/null +++ b/src/libmain/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/nix/plugin.hh similarity index 100% rename from src/libmain/plugin.hh rename to src/libmain/nix/plugin.hh diff --git a/src/libmain/progress-bar.hh b/src/libmain/nix/progress-bar.hh similarity index 84% rename from src/libmain/progress-bar.hh rename to src/libmain/nix/progress-bar.hh index 83209e8637c..2f9e4ce2618 100644 --- a/src/libmain/progress-bar.hh +++ b/src/libmain/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/nix/shared.hh similarity index 94% rename from src/libmain/shared.hh rename to src/libmain/nix/shared.hh index a6a18ceb068..8144ad84528 100644 --- a/src/libmain/shared.hh +++ b/src/libmain/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/plugin.cc b/src/libmain/plugin.cc index ccfd7f9003a..db1067c1a10 100644 --- a/src/libmain/plugin.cc +++ b/src/libmain/plugin.cc @@ -4,8 +4,8 @@ #include -#include "config-global.hh" -#include "signals.hh" +#include "nix/config-global.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index 17109b57e23..cd0fecceb91 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 30e76c349ca..43391b96839 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -1,11 +1,11 @@ -#include "globals.hh" -#include "current-process.hh" -#include "shared.hh" -#include "store-api.hh" -#include "gc-store.hh" -#include "loggers.hh" -#include "progress-bar.hh" -#include "signals.hh" +#include "nix/globals.hh" +#include "nix/current-process.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/gc-store.hh" +#include "nix/loggers.hh" +#include "nix/progress-bar.hh" +#include "nix/signals.hh" #include #include @@ -22,8 +22,8 @@ #include -#include "exit.hh" -#include "strings.hh" +#include "nix/exit.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libmain/unix/stack.cc b/src/libmain/unix/stack.cc index 10f71c1dcad..b4ec5967e15 100644 --- a/src/libmain/unix/stack.cc +++ b/src/libmain/unix/stack.cc @@ -1,5 +1,5 @@ -#include "error.hh" -#include "shared.hh" +#include "nix/error.hh" +#include "nix/shared.hh" #include #include diff --git a/src/libstore-c/meson.build b/src/libstore-c/meson.build index 17d18609f09..c8b67fc485a 100644 --- a/src/libstore-c/meson.build +++ b/src/libstore-c/meson.build @@ -38,8 +38,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', # From C libraries, for our public, installed headers too '-include', 'config-util.h', diff --git a/src/libstore-c/nix_api_store.cc b/src/libstore-c/nix_api_store.cc index bc306e0d0ad..ab0af1f5219 100644 --- a/src/libstore-c/nix_api_store.cc +++ b/src/libstore-c/nix_api_store.cc @@ -3,11 +3,11 @@ #include "nix_api_util.h" #include "nix_api_util_internal.h" -#include "path.hh" -#include "store-api.hh" -#include "build-result.hh" +#include "nix/path.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" -#include "globals.hh" +#include "nix/globals.hh" nix_err nix_libstore_init(nix_c_context * context) { diff --git a/src/libstore-c/nix_api_store_internal.h b/src/libstore-c/nix_api_store_internal.h index 13db0c07cf8..e32cdfcca96 100644 --- a/src/libstore-c/nix_api_store_internal.h +++ b/src/libstore-c/nix_api_store_internal.h @@ -1,6 +1,6 @@ #ifndef NIX_API_STORE_INTERNAL_H #define NIX_API_STORE_INTERNAL_H -#include "store-api.hh" +#include "nix/store-api.hh" struct Store { diff --git a/src/libstore-test-support/tests/derived-path.cc b/src/libstore-test-support/derived-path.cc similarity index 97% rename from src/libstore-test-support/tests/derived-path.cc rename to src/libstore-test-support/derived-path.cc index 078615bbd01..959a7c7d351 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/meson.build b/src/libstore-test-support/meson.build index 59d649889e2..8d9758d4c75 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('nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libstore-test-support/nix/meson.build b/src/libstore-test-support/nix/meson.build new file mode 100644 index 00000000000..ed3e4f2ff90 --- /dev/null +++ b/src/libstore-test-support/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/nix/tests/derived-path.hh similarity index 86% rename from src/libstore-test-support/tests/derived-path.hh rename to src/libstore-test-support/nix/tests/derived-path.hh index 98d61f2283d..57cad487c3a 100644 --- a/src/libstore-test-support/tests/derived-path.hh +++ b/src/libstore-test-support/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/nix/tests/libstore.hh similarity index 94% rename from src/libstore-test-support/tests/libstore.hh rename to src/libstore-test-support/nix/tests/libstore.hh index 699ba957ec8..02e818f9768 100644 --- a/src/libstore-test-support/tests/libstore.hh +++ b/src/libstore-test-support/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/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/nix/tests/nix_api_store.hh index b7d5c2c33f7..f418b563d76 100644 --- a/src/libstore-test-support/tests/nix_api_store.hh +++ b/src/libstore-test-support/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/nix/tests/outputs-spec.hh similarity index 76% rename from src/libstore-test-support/tests/outputs-spec.hh rename to src/libstore-test-support/nix/tests/outputs-spec.hh index f5bf9042d20..14a74d2e4ad 100644 --- a/src/libstore-test-support/tests/outputs-spec.hh +++ b/src/libstore-test-support/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/nix/tests/path.hh similarity index 94% rename from src/libstore-test-support/tests/path.hh rename to src/libstore-test-support/nix/tests/path.hh index 4751b3373a3..eebcda28e9a 100644 --- a/src/libstore-test-support/tests/path.hh +++ b/src/libstore-test-support/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/nix/tests/protocol.hh similarity index 96% rename from src/libstore-test-support/tests/protocol.hh rename to src/libstore-test-support/nix/tests/protocol.hh index 3f6799d1ccb..6c7d69adb9e 100644 --- a/src/libstore-test-support/tests/protocol.hh +++ b/src/libstore-test-support/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/tests/outputs-spec.cc b/src/libstore-test-support/outputs-spec.cc similarity index 93% rename from src/libstore-test-support/tests/outputs-spec.cc rename to src/libstore-test-support/outputs-spec.cc index e9d6022037b..a20f8730a7d 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/tests/path.cc b/src/libstore-test-support/path.cc similarity index 93% rename from src/libstore-test-support/tests/path.cc rename to src/libstore-test-support/path.cc index 8ddda80277c..945230187c2 100644 --- a/src/libstore-test-support/tests/path.cc +++ b/src/libstore-test-support/path.cc @@ -3,11 +3,11 @@ #include -#include "path-regex.hh" -#include "store-api.hh" +#include "nix/path-regex.hh" +#include "nix/store-api.hh" -#include "tests/hash.hh" -#include "tests/path.hh" +#include "nix/tests/hash.hh" +#include "nix/tests/path.hh" namespace nix { diff --git a/src/libstore-tests/common-protocol.cc b/src/libstore-tests/common-protocol.cc index c8f6dd002d5..39293b0c0c6 100644 --- a/src/libstore-tests/common-protocol.cc +++ b/src/libstore-tests/common-protocol.cc @@ -3,11 +3,11 @@ #include #include -#include "common-protocol.hh" -#include "common-protocol-impl.hh" -#include "build-result.hh" -#include "tests/protocol.hh" -#include "tests/characterization.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/tests/protocol.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/content-address.cc b/src/libstore-tests/content-address.cc index 72eb84fec11..428ebcd7679 100644 --- a/src/libstore-tests/content-address.cc +++ b/src/libstore-tests/content-address.cc @@ -1,6 +1,6 @@ #include -#include "content-address.hh" +#include "nix/content-address.hh" namespace nix { diff --git a/src/libstore-tests/derivation-advanced-attrs.cc b/src/libstore-tests/derivation-advanced-attrs.cc index 107cf13e38d..d8f9642ab16 100644 --- a/src/libstore-tests/derivation-advanced-attrs.cc +++ b/src/libstore-tests/derivation-advanced-attrs.cc @@ -1,16 +1,16 @@ #include #include -#include "experimental-features.hh" -#include "derivations.hh" -#include "derivations.hh" -#include "derivation-options.hh" -#include "parsed-derivations.hh" -#include "types.hh" -#include "json-utils.hh" - -#include "tests/libstore.hh" -#include "tests/characterization.hh" +#include "nix/experimental-features.hh" +#include "nix/derivations.hh" +#include "nix/derivations.hh" +#include "nix/derivation-options.hh" +#include "nix/parsed-derivations.hh" +#include "nix/types.hh" +#include "nix/json-utils.hh" + +#include "nix/tests/libstore.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/derivation.cc b/src/libstore-tests/derivation.cc index 14652921abc..5ef1c0094d3 100644 --- a/src/libstore-tests/derivation.cc +++ b/src/libstore-tests/derivation.cc @@ -1,11 +1,11 @@ #include #include -#include "experimental-features.hh" -#include "derivations.hh" +#include "nix/experimental-features.hh" +#include "nix/derivations.hh" -#include "tests/libstore.hh" -#include "tests/characterization.hh" +#include "nix/tests/libstore.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/derived-path.cc b/src/libstore-tests/derived-path.cc index c62d79a78ca..2329e81a10e 100644 --- a/src/libstore-tests/derived-path.cc +++ b/src/libstore-tests/derived-path.cc @@ -3,8 +3,8 @@ #include #include -#include "tests/derived-path.hh" -#include "tests/libstore.hh" +#include "nix/tests/derived-path.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/downstream-placeholder.cc b/src/libstore-tests/downstream-placeholder.cc index fd29530acfc..76c6410ad60 100644 --- a/src/libstore-tests/downstream-placeholder.cc +++ b/src/libstore-tests/downstream-placeholder.cc @@ -1,6 +1,6 @@ #include -#include "downstream-placeholder.hh" +#include "nix/downstream-placeholder.hh" namespace nix { diff --git a/src/libstore-tests/http-binary-cache-store.cc b/src/libstore-tests/http-binary-cache-store.cc index 1e415f6251a..bc4e5293662 100644 --- a/src/libstore-tests/http-binary-cache-store.cc +++ b/src/libstore-tests/http-binary-cache-store.cc @@ -1,6 +1,6 @@ #include -#include "http-binary-cache-store.hh" +#include "nix/http-binary-cache-store.hh" namespace nix { diff --git a/src/libstore-tests/legacy-ssh-store.cc b/src/libstore-tests/legacy-ssh-store.cc index eb31a240804..5a23cf5b28a 100644 --- a/src/libstore-tests/legacy-ssh-store.cc +++ b/src/libstore-tests/legacy-ssh-store.cc @@ -1,6 +1,6 @@ #include -#include "legacy-ssh-store.hh" +#include "nix/legacy-ssh-store.hh" namespace nix { diff --git a/src/libstore-tests/local-binary-cache-store.cc b/src/libstore-tests/local-binary-cache-store.cc index 2e840228dad..8adc22202ae 100644 --- a/src/libstore-tests/local-binary-cache-store.cc +++ b/src/libstore-tests/local-binary-cache-store.cc @@ -1,6 +1,6 @@ #include -#include "local-binary-cache-store.hh" +#include "nix/local-binary-cache-store.hh" namespace nix { diff --git a/src/libstore-tests/local-overlay-store.cc b/src/libstore-tests/local-overlay-store.cc index b34ca92375e..8e9d25bc320 100644 --- a/src/libstore-tests/local-overlay-store.cc +++ b/src/libstore-tests/local-overlay-store.cc @@ -3,7 +3,7 @@ #if 0 # include -# include "local-overlay-store.hh" +# include "nix/local-overlay-store.hh" namespace nix { diff --git a/src/libstore-tests/local-store.cc b/src/libstore-tests/local-store.cc index abc3ea7963f..8977234a398 100644 --- a/src/libstore-tests/local-store.cc +++ b/src/libstore-tests/local-store.cc @@ -3,13 +3,13 @@ #if 0 # include -# include "local-store.hh" +# include "nix/local-store.hh" // Needed for template specialisations. This is not good! When we // overhaul how store configs work, this should be fixed. -# include "args.hh" -# include "config-impl.hh" -# include "abstract-setting-to-json.hh" +# include "nix/args.hh" +# include "nix/config-impl.hh" +# include "nix/abstract-setting-to-json.hh" namespace nix { diff --git a/src/libstore-tests/machines.cc b/src/libstore-tests/machines.cc index 2d66e953408..219494f16a8 100644 --- a/src/libstore-tests/machines.cc +++ b/src/libstore-tests/machines.cc @@ -1,8 +1,8 @@ -#include "machines.hh" -#include "file-system.hh" -#include "util.hh" +#include "nix/machines.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" -#include "tests/characterization.hh" +#include "nix/tests/characterization.hh" #include #include diff --git a/src/libstore-tests/meson.build b/src/libstore-tests/meson.build index 3ba0795e9fa..6c3e2c5b2bc 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', '-include', 'config-util.h', '-include', 'config-store.h', language : 'cpp', diff --git a/src/libstore-tests/nar-info-disk-cache.cc b/src/libstore-tests/nar-info-disk-cache.cc index b4bdb832957..b15ee351a54 100644 --- a/src/libstore-tests/nar-info-disk-cache.cc +++ b/src/libstore-tests/nar-info-disk-cache.cc @@ -1,8 +1,8 @@ -#include "nar-info-disk-cache.hh" +#include "nix/nar-info-disk-cache.hh" #include #include -#include "sqlite.hh" +#include "nix/sqlite.hh" #include diff --git a/src/libstore-tests/nar-info.cc b/src/libstore-tests/nar-info.cc index 0d155743d91..54468091422 100644 --- a/src/libstore-tests/nar-info.cc +++ b/src/libstore-tests/nar-info.cc @@ -1,11 +1,11 @@ #include #include -#include "path-info.hh" -#include "nar-info.hh" +#include "nix/path-info.hh" +#include "nix/nar-info.hh" -#include "tests/characterization.hh" -#include "tests/libstore.hh" +#include "nix/tests/characterization.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/nix_api_store.cc b/src/libstore-tests/nix_api_store.cc index a8b7b8e5fc8..b7d9860fb44 100644 --- a/src/libstore-tests/nix_api_store.cc +++ b/src/libstore-tests/nix_api_store.cc @@ -3,8 +3,8 @@ #include "nix_api_store.h" #include "nix_api_store_internal.h" -#include "tests/nix_api_store.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_store.hh" +#include "nix/tests/string_callback.hh" namespace nixC { diff --git a/src/libstore-tests/outputs-spec.cc b/src/libstore-tests/outputs-spec.cc index 63cde681bbf..007e5a9353b 100644 --- a/src/libstore-tests/outputs-spec.cc +++ b/src/libstore-tests/outputs-spec.cc @@ -1,4 +1,4 @@ -#include "tests/outputs-spec.hh" +#include "nix/tests/outputs-spec.hh" #include #include diff --git a/src/libstore-tests/path-info.cc b/src/libstore-tests/path-info.cc index d6c4c2a7f7e..df3b60f1309 100644 --- a/src/libstore-tests/path-info.cc +++ b/src/libstore-tests/path-info.cc @@ -1,10 +1,10 @@ #include #include -#include "path-info.hh" +#include "nix/path-info.hh" -#include "tests/characterization.hh" -#include "tests/libstore.hh" +#include "nix/tests/characterization.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/path.cc b/src/libstore-tests/path.cc index c4c055abf0c..bcfce2c9f47 100644 --- a/src/libstore-tests/path.cc +++ b/src/libstore-tests/path.cc @@ -4,12 +4,12 @@ #include #include -#include "path-regex.hh" -#include "store-api.hh" +#include "nix/path-regex.hh" +#include "nix/store-api.hh" -#include "tests/hash.hh" -#include "tests/libstore.hh" -#include "tests/path.hh" +#include "nix/tests/hash.hh" +#include "nix/tests/libstore.hh" +#include "nix/tests/path.hh" namespace nix { diff --git a/src/libstore-tests/references.cc b/src/libstore-tests/references.cc index d91d1cedd65..da4b7af3943 100644 --- a/src/libstore-tests/references.cc +++ b/src/libstore-tests/references.cc @@ -1,4 +1,4 @@ -#include "references.hh" +#include "nix/references.hh" #include diff --git a/src/libstore-tests/s3-binary-cache-store.cc b/src/libstore-tests/s3-binary-cache-store.cc index 7aa5f2f2c06..99db360ce6a 100644 --- a/src/libstore-tests/s3-binary-cache-store.cc +++ b/src/libstore-tests/s3-binary-cache-store.cc @@ -2,7 +2,7 @@ # include -# include "s3-binary-cache-store.hh" +# include "nix/s3-binary-cache-store.hh" namespace nix { diff --git a/src/libstore-tests/serve-protocol.cc b/src/libstore-tests/serve-protocol.cc index 3dbbf38799a..dd53b80d6ca 100644 --- a/src/libstore-tests/serve-protocol.cc +++ b/src/libstore-tests/serve-protocol.cc @@ -4,13 +4,13 @@ #include #include -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" -#include "serve-protocol-connection.hh" -#include "build-result.hh" -#include "file-descriptor.hh" -#include "tests/protocol.hh" -#include "tests/characterization.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/build-result.hh" +#include "nix/file-descriptor.hh" +#include "nix/tests/protocol.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore-tests/ssh-store.cc b/src/libstore-tests/ssh-store.cc index b853a5f1fb9..1c54a229eeb 100644 --- a/src/libstore-tests/ssh-store.cc +++ b/src/libstore-tests/ssh-store.cc @@ -3,7 +3,7 @@ #if 0 # include -# include "ssh-store.hh" +# include "nix/ssh-store.hh" namespace nix { diff --git a/src/libstore-tests/store-reference.cc b/src/libstore-tests/store-reference.cc index d4c42f0fda1..f8e533fa088 100644 --- a/src/libstore-tests/store-reference.cc +++ b/src/libstore-tests/store-reference.cc @@ -1,11 +1,11 @@ #include #include -#include "file-system.hh" -#include "store-reference.hh" +#include "nix/file-system.hh" +#include "nix/store-reference.hh" -#include "tests/characterization.hh" -#include "tests/libstore.hh" +#include "nix/tests/characterization.hh" +#include "nix/tests/libstore.hh" namespace nix { diff --git a/src/libstore-tests/uds-remote-store.cc b/src/libstore-tests/uds-remote-store.cc index 5ccb208714f..7157bfbfdbe 100644 --- a/src/libstore-tests/uds-remote-store.cc +++ b/src/libstore-tests/uds-remote-store.cc @@ -3,7 +3,7 @@ #if 0 # include -# include "uds-remote-store.hh" +# include "nix/uds-remote-store.hh" namespace nix { diff --git a/src/libstore-tests/worker-protocol.cc b/src/libstore-tests/worker-protocol.cc index 99b042d5ba4..0a417ed3e54 100644 --- a/src/libstore-tests/worker-protocol.cc +++ b/src/libstore-tests/worker-protocol.cc @@ -4,13 +4,13 @@ #include #include -#include "worker-protocol.hh" -#include "worker-protocol-connection.hh" -#include "worker-protocol-impl.hh" -#include "derived-path.hh" -#include "build-result.hh" -#include "tests/protocol.hh" -#include "tests/characterization.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/derived-path.hh" +#include "nix/build-result.hh" +#include "nix/tests/protocol.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 896779f85fc..48c449e797f 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -1,18 +1,18 @@ -#include "archive.hh" -#include "binary-cache-store.hh" -#include "compression.hh" -#include "derivations.hh" -#include "source-accessor.hh" -#include "globals.hh" -#include "nar-info.hh" -#include "sync.hh" -#include "remote-fs-accessor.hh" -#include "nar-info-disk-cache.hh" -#include "nar-accessor.hh" -#include "thread-pool.hh" -#include "callback.hh" -#include "signals.hh" -#include "archive.hh" +#include "nix/archive.hh" +#include "nix/binary-cache-store.hh" +#include "nix/compression.hh" +#include "nix/derivations.hh" +#include "nix/source-accessor.hh" +#include "nix/globals.hh" +#include "nix/nar-info.hh" +#include "nix/sync.hh" +#include "nix/remote-fs-accessor.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/nar-accessor.hh" +#include "nix/thread-pool.hh" +#include "nix/callback.hh" +#include "nix/signals.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libstore/build-result.cc b/src/libstore/build-result.cc index 96cbfd62fff..72ad11faea5 100644 --- a/src/libstore/build-result.cc +++ b/src/libstore/build-result.cc @@ -1,4 +1,4 @@ -#include "build-result.hh" +#include "nix/build-result.hh" namespace nix { diff --git a/src/libstore/build/derivation-creation-and-realisation-goal.cc b/src/libstore/build/derivation-creation-and-realisation-goal.cc index c33b7571f04..d81eb9ff584 100644 --- a/src/libstore/build/derivation-creation-and-realisation-goal.cc +++ b/src/libstore/build/derivation-creation-and-realisation-goal.cc @@ -1,5 +1,5 @@ -#include "derivation-creation-and-realisation-goal.hh" -#include "worker.hh" +#include "nix/build/derivation-creation-and-realisation-goal.hh" +#include "nix/build/worker.hh" namespace nix { diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 41762cde1b0..167bcac6f74 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 f069c0d9404..18853e5310d 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 a473daff914..11c6ea8232d 100644 --- a/src/libstore/build/entry-points.cc +++ b/src/libstore/build/entry-points.cc @@ -1,11 +1,11 @@ -#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-creation-and-realisation-goal.hh" -# include "derivation-goal.hh" +# include "nix/build/derivation-creation-and-realisation-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 c381e5b581f..9f29a1d738f 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/meson.build b/src/libstore/build/meson.build new file mode 100644 index 00000000000..871f46f2ec5 --- /dev/null +++ b/src/libstore/build/meson.build @@ -0,0 +1,9 @@ +sources += files( + 'derivation-goal.cc', + 'derivation-creation-and-realisation-goal.cc', + 'drv-output-substitution-goal.cc', + 'entry-points.cc', + 'goal.cc', + 'substitution-goal.cc', + 'worker.cc', +) diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index 983c86601d8..6794fe73fb3 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 b765fc2a002..7dce0871f4a 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -1,15 +1,15 @@ -#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 "derivation-creation-and-realisation-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" +#include "nix/build/derivation-creation-and-realisation-goal.hh" #ifndef _WIN32 // TODO Enable building on Windows -# include "local-derivation-goal.hh" -# include "hook-instance.hh" +# include "nix/build/local-derivation-goal.hh" +# include "nix/build/hook-instance.hh" #endif -#include "signals.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libstore/builtins/buildenv.cc b/src/libstore/builtins/buildenv.cc index 0f7bcd99b1c..4145593cf3a 100644 --- a/src/libstore/builtins/buildenv.cc +++ b/src/libstore/builtins/buildenv.cc @@ -1,6 +1,6 @@ -#include "buildenv.hh" -#include "derivations.hh" -#include "signals.hh" +#include "nix/builtins/buildenv.hh" +#include "nix/derivations.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/builtins/fetchurl.cc b/src/libstore/builtins/fetchurl.cc index 90e58dfdb3d..28af8427c65 100644 --- a/src/libstore/builtins/fetchurl.cc +++ b/src/libstore/builtins/fetchurl.cc @@ -1,8 +1,8 @@ -#include "builtins.hh" -#include "filetransfer.hh" -#include "store-api.hh" -#include "archive.hh" -#include "compression.hh" +#include "nix/builtins.hh" +#include "nix/filetransfer.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/compression.hh" namespace nix { diff --git a/src/libstore/builtins/unpack-channel.cc b/src/libstore/builtins/unpack-channel.cc index a6369ee1c8c..b0cb0e28eae 100644 --- a/src/libstore/builtins/unpack-channel.cc +++ b/src/libstore/builtins/unpack-channel.cc @@ -1,5 +1,5 @@ -#include "builtins.hh" -#include "tarfile.hh" +#include "nix/builtins.hh" +#include "nix/tarfile.hh" namespace nix { diff --git a/src/libstore/common-protocol.cc b/src/libstore/common-protocol.cc index fc2b5ac6f3f..4845d587351 100644 --- a/src/libstore/common-protocol.cc +++ b/src/libstore/common-protocol.cc @@ -1,11 +1,11 @@ -#include "serialise.hh" -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "build-result.hh" -#include "common-protocol.hh" -#include "common-protocol-impl.hh" -#include "archive.hh" -#include "derivations.hh" +#include "nix/serialise.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include diff --git a/src/libstore/common-ssh-store-config.cc b/src/libstore/common-ssh-store-config.cc index 05332b9bb5c..d4123e326be 100644 --- a/src/libstore/common-ssh-store-config.cc +++ b/src/libstore/common-ssh-store-config.cc @@ -1,7 +1,7 @@ #include -#include "common-ssh-store-config.hh" -#include "ssh.hh" +#include "nix/common-ssh-store-config.hh" +#include "nix/ssh.hh" namespace nix { diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc index e1cdfece6e9..a3745b4ef31 100644 --- a/src/libstore/content-address.cc +++ b/src/libstore/content-address.cc @@ -1,6 +1,6 @@ -#include "args.hh" -#include "content-address.hh" -#include "split.hh" +#include "nix/args.hh" +#include "nix/content-address.hh" +#include "nix/split.hh" namespace nix { diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 60cb64b7b7c..bce285141e0 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -1,23 +1,23 @@ -#include "daemon.hh" -#include "signals.hh" -#include "worker-protocol.hh" -#include "worker-protocol-connection.hh" -#include "worker-protocol-impl.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" -#include "log-store.hh" -#include "indirect-root-store.hh" -#include "path-with-outputs.hh" -#include "finally.hh" -#include "archive.hh" -#include "derivations.hh" -#include "args.hh" -#include "git.hh" +#include "nix/daemon.hh" +#include "nix/signals.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" +#include "nix/log-store.hh" +#include "nix/indirect-root-store.hh" +#include "nix/path-with-outputs.hh" +#include "nix/finally.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" +#include "nix/args.hh" +#include "nix/git.hh" #ifndef _WIN32 // TODO need graceful async exit support on Windows? -# include "monitor-fd.hh" +# include "nix/monitor-fd.hh" #endif #include diff --git a/src/libstore/derivation-options.cc b/src/libstore/derivation-options.cc index 1fc1718f7eb..8683fd8ada3 100644 --- a/src/libstore/derivation-options.cc +++ b/src/libstore/derivation-options.cc @@ -1,8 +1,8 @@ -#include "derivation-options.hh" -#include "json-utils.hh" -#include "parsed-derivations.hh" -#include "types.hh" -#include "util.hh" +#include "nix/derivation-options.hh" +#include "nix/json-utils.hh" +#include "nix/parsed-derivations.hh" +#include "nix/types.hh" +#include "nix/util.hh" #include #include #include diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index b54838a0aa9..4c027d64b75 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 0095a9d7814..4864c1dbf81 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 { @@ -52,7 +52,7 @@ typename DerivedPathMap::ChildNode * DerivedPathMap::findSlot(const Single // instantiations -#include "derivation-creation-and-realisation-goal.hh" +#include "nix/build/derivation-creation-and-realisation-goal.hh" namespace nix { template<> diff --git a/src/libstore/derived-path.cc b/src/libstore/derived-path.cc index 1eef881de0c..94f8d93f7d0 100644 --- a/src/libstore/derived-path.cc +++ b/src/libstore/derived-path.cc @@ -1,7 +1,7 @@ -#include "derived-path.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "comparator.hh" +#include "nix/derived-path.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/comparator.hh" #include diff --git a/src/libstore/downstream-placeholder.cc b/src/libstore/downstream-placeholder.cc index 91d47f946c1..52c46ddee60 100644 --- a/src/libstore/downstream-placeholder.cc +++ b/src/libstore/downstream-placeholder.cc @@ -1,5 +1,5 @@ -#include "downstream-placeholder.hh" -#include "derivations.hh" +#include "nix/downstream-placeholder.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/dummy-store.cc b/src/libstore/dummy-store.cc index c1e871e9384..b922b30a641 100644 --- a/src/libstore/dummy-store.cc +++ b/src/libstore/dummy-store.cc @@ -1,5 +1,5 @@ -#include "store-api.hh" -#include "callback.hh" +#include "nix/store-api.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/export-import.cc b/src/libstore/export-import.cc index 1c62cdfad64..efec2a40996 100644 --- a/src/libstore/export-import.cc +++ b/src/libstore/export-import.cc @@ -1,8 +1,8 @@ -#include "serialise.hh" -#include "store-api.hh" -#include "archive.hh" -#include "common-protocol.hh" -#include "common-protocol-impl.hh" +#include "nix/serialise.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/common-protocol.hh" +#include "nix/common-protocol-impl.hh" #include diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index f2430631d18..6c2ae02c77d 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 ac354f3faf7..81294a5b9df 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -1,14 +1,14 @@ -#include "derivations.hh" -#include "globals.hh" -#include "local-store.hh" -#include "finally.hh" -#include "unix-domain-socket.hh" -#include "signals.hh" -#include "posix-fs-canonicalise.hh" +#include "nix/derivations.hh" +#include "nix/globals.hh" +#include "nix/local-store.hh" +#include "nix/finally.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/signals.hh" +#include "nix/posix-fs-canonicalise.hh" #if !defined(__linux__) // For shelling out to lsof -# include "processes.hh" +# include "nix/processes.hh" #endif #include diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index d7c000dfab7..4f8c53ca848 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -1,11 +1,11 @@ -#include "globals.hh" -#include "config-global.hh" -#include "current-process.hh" -#include "archive.hh" -#include "args.hh" -#include "abstract-setting-to-json.hh" -#include "compute-levels.hh" -#include "signals.hh" +#include "nix/globals.hh" +#include "nix/config-global.hh" +#include "nix/current-process.hh" +#include "nix/archive.hh" +#include "nix/args.hh" +#include "nix/abstract-setting-to-json.hh" +#include "nix/compute-levels.hh" +#include "nix/signals.hh" #include #include @@ -26,16 +26,16 @@ #endif #if __APPLE__ -# include "processes.hh" +# include "nix/processes.hh" #endif -#include "config-impl.hh" +#include "nix/config-impl.hh" #ifdef __APPLE__ #include #endif -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index f32616f94a6..a8d77f753ea 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -1,8 +1,8 @@ -#include "http-binary-cache-store.hh" -#include "filetransfer.hh" -#include "globals.hh" -#include "nar-info-disk-cache.hh" -#include "callback.hh" +#include "nix/http-binary-cache-store.hh" +#include "nix/filetransfer.hh" +#include "nix/globals.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/indirect-root-store.cc b/src/libstore/indirect-root-store.cc index 844d0d6edad..1b51cbe153a 100644 --- a/src/libstore/indirect-root-store.cc +++ b/src/libstore/indirect-root-store.cc @@ -1,4 +1,4 @@ -#include "indirect-root-store.hh" +#include "nix/indirect-root-store.hh" namespace nix { diff --git a/src/libstore/keys.cc b/src/libstore/keys.cc index 668725fc7e8..1b2a612a2be 100644 --- a/src/libstore/keys.cc +++ b/src/libstore/keys.cc @@ -1,6 +1,6 @@ -#include "file-system.hh" -#include "globals.hh" -#include "keys.hh" +#include "nix/file-system.hh" +#include "nix/globals.hh" +#include "nix/keys.hh" namespace nix { diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index 480f4105939..bc2794499de 100644 --- a/src/libstore/legacy-ssh-store.cc +++ b/src/libstore/legacy-ssh-store.cc @@ -1,17 +1,17 @@ -#include "legacy-ssh-store.hh" -#include "common-ssh-store-config.hh" -#include "archive.hh" -#include "pool.hh" -#include "remote-store.hh" -#include "serve-protocol.hh" -#include "serve-protocol-connection.hh" -#include "serve-protocol-impl.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "path-with-outputs.hh" -#include "ssh.hh" -#include "derivations.hh" -#include "callback.hh" +#include "nix/legacy-ssh-store.hh" +#include "nix/common-ssh-store-config.hh" +#include "nix/archive.hh" +#include "nix/pool.hh" +#include "nix/remote-store.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/store-api.hh" +#include "nix/path-with-outputs.hh" +#include "nix/ssh.hh" +#include "nix/derivations.hh" +#include "nix/callback.hh" namespace nix { diff --git a/src/libstore/linux/meson.build b/src/libstore/linux/meson.build index 0c494b5d62e..b6f1345ec1d 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('nix') diff --git a/src/libstore/linux/fchmodat2-compat.hh b/src/libstore/linux/nix/fchmodat2-compat.hh similarity index 100% rename from src/libstore/linux/fchmodat2-compat.hh rename to src/libstore/linux/nix/fchmodat2-compat.hh diff --git a/src/libstore/linux/nix/meson.build b/src/libstore/linux/nix/meson.build new file mode 100644 index 00000000000..f37370c6fb7 --- /dev/null +++ b/src/libstore/linux/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/nix/personality.hh similarity index 100% rename from src/libstore/linux/personality.hh rename to src/libstore/linux/nix/personality.hh diff --git a/src/libstore/linux/personality.cc b/src/libstore/linux/personality.cc index 255d174a6cc..bbff765ded7 100644 --- a/src/libstore/linux/personality.cc +++ b/src/libstore/linux/personality.cc @@ -1,5 +1,5 @@ -#include "personality.hh" -#include "globals.hh" +#include "nix/personality.hh" +#include "nix/globals.hh" #include #include diff --git a/src/libstore/local-binary-cache-store.cc b/src/libstore/local-binary-cache-store.cc index dcc6affe4a1..90a770ab0c1 100644 --- a/src/libstore/local-binary-cache-store.cc +++ b/src/libstore/local-binary-cache-store.cc @@ -1,7 +1,7 @@ -#include "local-binary-cache-store.hh" -#include "globals.hh" -#include "nar-info-disk-cache.hh" -#include "signals.hh" +#include "nix/local-binary-cache-store.hh" +#include "nix/globals.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/signals.hh" #include diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index 5449b20eb3b..2798899faaa 100644 --- a/src/libstore/local-fs-store.cc +++ b/src/libstore/local-fs-store.cc @@ -1,10 +1,10 @@ -#include "archive.hh" -#include "posix-source-accessor.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "globals.hh" -#include "compression.hh" -#include "derivations.hh" +#include "nix/archive.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/globals.hh" +#include "nix/compression.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/local-overlay-store.cc b/src/libstore/local-overlay-store.cc index 56ff6bef3e5..c2cc329b4d2 100644 --- a/src/libstore/local-overlay-store.cc +++ b/src/libstore/local-overlay-store.cc @@ -1,8 +1,8 @@ -#include "local-overlay-store.hh" -#include "callback.hh" -#include "realisation.hh" -#include "processes.hh" -#include "url.hh" +#include "nix/local-overlay-store.hh" +#include "nix/callback.hh" +#include "nix/realisation.hh" +#include "nix/processes.hh" +#include "nix/url.hh" #include namespace nix { diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 67d5a1dcb7d..9782c1c3257 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1,22 +1,22 @@ -#include "local-store.hh" -#include "globals.hh" -#include "git.hh" -#include "archive.hh" -#include "pathlocks.hh" -#include "worker-protocol.hh" -#include "derivations.hh" -#include "realisation.hh" -#include "nar-info.hh" -#include "references.hh" -#include "callback.hh" -#include "topo-sort.hh" -#include "finally.hh" -#include "compression.hh" -#include "signals.hh" -#include "posix-fs-canonicalise.hh" -#include "posix-source-accessor.hh" -#include "keys.hh" -#include "users.hh" +#include "nix/local-store.hh" +#include "nix/globals.hh" +#include "nix/git.hh" +#include "nix/archive.hh" +#include "nix/pathlocks.hh" +#include "nix/worker-protocol.hh" +#include "nix/derivations.hh" +#include "nix/realisation.hh" +#include "nix/nar-info.hh" +#include "nix/references.hh" +#include "nix/callback.hh" +#include "nix/topo-sort.hh" +#include "nix/finally.hh" +#include "nix/compression.hh" +#include "nix/signals.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/keys.hh" +#include "nix/users.hh" #include #include @@ -52,7 +52,7 @@ #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/log-store.cc b/src/libstore/log-store.cc index 8a26832ab28..b2c2ff16a9d 100644 --- a/src/libstore/log-store.cc +++ b/src/libstore/log-store.cc @@ -1,4 +1,4 @@ -#include "log-store.hh" +#include "nix/log-store.hh" namespace nix { diff --git a/src/libstore/machines.cc b/src/libstore/machines.cc index eb729b697f1..7710ae99b75 100644 --- a/src/libstore/machines.cc +++ b/src/libstore/machines.cc @@ -1,6 +1,6 @@ -#include "machines.hh" -#include "globals.hh" -#include "store-api.hh" +#include "nix/machines.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" #include diff --git a/src/libstore/make-content-addressed.cc b/src/libstore/make-content-addressed.cc index a3130d7cc02..c7d44b1a935 100644 --- a/src/libstore/make-content-addressed.cc +++ b/src/libstore/make-content-addressed.cc @@ -1,5 +1,5 @@ -#include "make-content-addressed.hh" -#include "references.hh" +#include "nix/make-content-addressed.hh" +#include "nix/references.hh" namespace nix { diff --git a/src/libstore/meson.build b/src/libstore/meson.build index 899ba33fe59..61bd1efffd8 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -164,16 +164,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', ) @@ -182,13 +177,6 @@ subdir('nix-meson-build-support/common') sources = files( 'binary-cache-store.cc', 'build-result.cc', - 'build/derivation-goal.cc', - 'build/derivation-creation-and-realisation-goal.cc', - 'build/drv-output-substitution-goal.cc', - 'build/entry-points.cc', - 'build/goal.cc', - 'build/substitution-goal.cc', - 'build/worker.cc', 'builtins/buildenv.cc', 'builtins/fetchurl.cc', 'builtins/unpack-channel.cc', @@ -248,82 +236,9 @@ sources = files( 'worker-protocol.cc', ) -include_dirs = [ - include_directories('.'), - include_directories('build'), -] +subdir('build') -headers = [config_h] + files( - 'binary-cache-store.hh', - 'build-result.hh', - 'build/derivation-goal.hh', - 'build/derivation-creation-and-realisation-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', - '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('nix') if host_machine.system() == 'linux' subdir('linux') diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 9d3b243266e..ef08f4af7b4 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -1,17 +1,17 @@ #include -#include "derivations.hh" -#include "parsed-derivations.hh" -#include "derivation-options.hh" -#include "globals.hh" -#include "store-api.hh" -#include "thread-pool.hh" -#include "realisation.hh" -#include "topo-sort.hh" -#include "callback.hh" -#include "closure.hh" -#include "filetransfer.hh" -#include "strings.hh" +#include "nix/derivations.hh" +#include "nix/parsed-derivations.hh" +#include "nix/derivation-options.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/thread-pool.hh" +#include "nix/realisation.hh" +#include "nix/topo-sort.hh" +#include "nix/callback.hh" +#include "nix/closure.hh" +#include "nix/filetransfer.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/names.cc b/src/libstore/names.cc index c0e1b1022ac..2842bf3fb83 100644 --- a/src/libstore/names.cc +++ b/src/libstore/names.cc @@ -1,5 +1,5 @@ -#include "names.hh" -#include "util.hh" +#include "nix/names.hh" +#include "nix/util.hh" #include diff --git a/src/libstore/nar-accessor.cc b/src/libstore/nar-accessor.cc index c4e0b137b13..7fe2e7ecbff 100644 --- a/src/libstore/nar-accessor.cc +++ b/src/libstore/nar-accessor.cc @@ -1,5 +1,5 @@ -#include "nar-accessor.hh" -#include "archive.hh" +#include "nix/nar-accessor.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libstore/nar-info-disk-cache.cc b/src/libstore/nar-info-disk-cache.cc index 80e8d34149d..acb7bd3bfbc 100644 --- a/src/libstore/nar-info-disk-cache.cc +++ b/src/libstore/nar-info-disk-cache.cc @@ -1,13 +1,13 @@ -#include "nar-info-disk-cache.hh" -#include "users.hh" -#include "sync.hh" -#include "sqlite.hh" -#include "globals.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/users.hh" +#include "nix/sync.hh" +#include "nix/sqlite.hh" +#include "nix/globals.hh" #include #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc index 27fcc286411..176332a4ada 100644 --- a/src/libstore/nar-info.cc +++ b/src/libstore/nar-info.cc @@ -1,8 +1,8 @@ -#include "globals.hh" -#include "nar-info.hh" -#include "store-api.hh" -#include "strings.hh" -#include "json-utils.hh" +#include "nix/globals.hh" +#include "nix/nar-info.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" +#include "nix/json-utils.hh" namespace nix { diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/nix/binary-cache-store.hh similarity index 97% rename from src/libstore/binary-cache-store.hh rename to src/libstore/nix/binary-cache-store.hh index 6bd7fd14ac9..ec012cda8d7 100644 --- a/src/libstore/binary-cache-store.hh +++ b/src/libstore/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/nix/build-result.hh similarity index 98% rename from src/libstore/build-result.hh rename to src/libstore/nix/build-result.hh index 8c66cfeb353..20d72634660 100644 --- a/src/libstore/build-result.hh +++ b/src/libstore/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-creation-and-realisation-goal.hh b/src/libstore/nix/build/derivation-creation-and-realisation-goal.hh similarity index 95% rename from src/libstore/build/derivation-creation-and-realisation-goal.hh rename to src/libstore/nix/build/derivation-creation-and-realisation-goal.hh index 40fe4005333..a13088e3ad6 100644 --- a/src/libstore/build/derivation-creation-and-realisation-goal.hh +++ b/src/libstore/nix/build/derivation-creation-and-realisation-goal.hh @@ -1,9 +1,9 @@ #pragma once -#include "parsed-derivations.hh" -#include "store-api.hh" -#include "pathlocks.hh" -#include "goal.hh" +#include "nix/parsed-derivations.hh" +#include "nix/store-api.hh" +#include "nix/pathlocks.hh" +#include "nix/build/goal.hh" namespace nix { diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/nix/build/derivation-goal.hh similarity index 97% rename from src/libstore/build/derivation-goal.hh rename to src/libstore/nix/build/derivation-goal.hh index 3ff34509a4e..3bb5e25e26e 100644 --- a/src/libstore/build/derivation-goal.hh +++ b/src/libstore/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/nix/build/drv-output-substitution-goal.hh similarity index 89% rename from src/libstore/build/drv-output-substitution-goal.hh rename to src/libstore/nix/build/drv-output-substitution-goal.hh index 8c60d01987a..94db4fbbc5c 100644 --- a/src/libstore/build/drv-output-substitution-goal.hh +++ b/src/libstore/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/nix/build/goal.hh similarity index 99% rename from src/libstore/build/goal.hh rename to src/libstore/nix/build/goal.hh index 2db1098b736..06374a6caba 100644 --- a/src/libstore/build/goal.hh +++ b/src/libstore/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/nix/build/substitution-goal.hh similarity index 94% rename from src/libstore/build/substitution-goal.hh rename to src/libstore/nix/build/substitution-goal.hh index f2cf797e5d2..c8139025c8d 100644 --- a/src/libstore/build/substitution-goal.hh +++ b/src/libstore/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/nix/build/worker.hh similarity index 98% rename from src/libstore/build/worker.hh rename to src/libstore/nix/build/worker.hh index efd518f9995..842761650ac 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/nix/build/worker.hh @@ -1,12 +1,12 @@ #pragma once ///@file -#include "types.hh" -#include "store-api.hh" -#include "derived-path-map.hh" -#include "goal.hh" -#include "realisation.hh" -#include "muxable-pipe.hh" +#include "nix/types.hh" +#include "nix/store-api.hh" +#include "nix/derived-path-map.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/nix/builtins.hh similarity index 92% rename from src/libstore/builtins.hh rename to src/libstore/nix/builtins.hh index 091946e013a..5943ae5073b 100644 --- a/src/libstore/builtins.hh +++ b/src/libstore/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/nix/builtins/buildenv.hh similarity index 97% rename from src/libstore/builtins/buildenv.hh rename to src/libstore/nix/builtins/buildenv.hh index 8e112e176e2..00fc3bf902a 100644 --- a/src/libstore/builtins/buildenv.hh +++ b/src/libstore/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/nix/common-protocol-impl.hh similarity index 93% rename from src/libstore/common-protocol-impl.hh rename to src/libstore/nix/common-protocol-impl.hh index 360882c0289..71d5fc015c0 100644 --- a/src/libstore/common-protocol-impl.hh +++ b/src/libstore/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/nix/common-protocol.hh similarity index 99% rename from src/libstore/common-protocol.hh rename to src/libstore/nix/common-protocol.hh index a878e84c9d8..260f192568a 100644 --- a/src/libstore/common-protocol.hh +++ b/src/libstore/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/nix/common-ssh-store-config.hh similarity index 98% rename from src/libstore/common-ssh-store-config.hh rename to src/libstore/nix/common-ssh-store-config.hh index 5deb6f4c9e9..54aa8cb5e39 100644 --- a/src/libstore/common-ssh-store-config.hh +++ b/src/libstore/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/nix/content-address.hh similarity index 98% rename from src/libstore/content-address.hh rename to src/libstore/nix/content-address.hh index 2b5d1296a27..6a2cbb1efe5 100644 --- a/src/libstore/content-address.hh +++ b/src/libstore/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/nix/daemon.hh similarity index 82% rename from src/libstore/daemon.hh rename to src/libstore/nix/daemon.hh index a8ce32d8deb..38df5796733 100644 --- a/src/libstore/daemon.hh +++ b/src/libstore/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/nix/derivation-options.hh similarity index 98% rename from src/libstore/derivation-options.hh rename to src/libstore/nix/derivation-options.hh index 6e4ea5cd9fd..459b7de78cc 100644 --- a/src/libstore/derivation-options.hh +++ b/src/libstore/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/nix/derivations.hh similarity index 98% rename from src/libstore/derivations.hh rename to src/libstore/nix/derivations.hh index 5b2101ed53c..997cead4f90 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/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/nix/derived-path-map.hh similarity index 98% rename from src/libstore/derived-path-map.hh rename to src/libstore/nix/derived-path-map.hh index 61e0b5463e1..106367ffbcc 100644 --- a/src/libstore/derived-path-map.hh +++ b/src/libstore/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/nix/derived-path.hh similarity index 98% rename from src/libstore/derived-path.hh rename to src/libstore/nix/derived-path.hh index 4ba3fb37d4c..719ae035097 100644 --- a/src/libstore/derived-path.hh +++ b/src/libstore/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/nix/downstream-placeholder.hh similarity index 97% rename from src/libstore/downstream-placeholder.hh rename to src/libstore/nix/downstream-placeholder.hh index c911ecea2ed..eb6662d3b09 100644 --- a/src/libstore/downstream-placeholder.hh +++ b/src/libstore/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/nix/filetransfer.hh similarity index 97% rename from src/libstore/filetransfer.hh rename to src/libstore/nix/filetransfer.hh index 0ecc7f37663..31ad1aabdb6 100644 --- a/src/libstore/filetransfer.hh +++ b/src/libstore/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/nix/gc-store.hh similarity index 99% rename from src/libstore/gc-store.hh rename to src/libstore/nix/gc-store.hh index 020f770b07a..f5f6855409a 100644 --- a/src/libstore/gc-store.hh +++ b/src/libstore/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/nix/globals.hh similarity index 99% rename from src/libstore/globals.hh rename to src/libstore/nix/globals.hh index f62644ff125..67b6d297070 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/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/nix/http-binary-cache-store.hh similarity index 94% rename from src/libstore/http-binary-cache-store.hh rename to src/libstore/nix/http-binary-cache-store.hh index d2fc43210a2..9dadda4d3d8 100644 --- a/src/libstore/http-binary-cache-store.hh +++ b/src/libstore/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/nix/indirect-root-store.hh similarity index 98% rename from src/libstore/indirect-root-store.hh rename to src/libstore/nix/indirect-root-store.hh index b74ebc1eed4..de4de138b95 100644 --- a/src/libstore/indirect-root-store.hh +++ b/src/libstore/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/nix/keys.hh similarity index 66% rename from src/libstore/keys.hh rename to src/libstore/nix/keys.hh index 3da19493fbb..ae0fa8d0217 100644 --- a/src/libstore/keys.hh +++ b/src/libstore/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/nix/legacy-ssh-store.hh similarity index 97% rename from src/libstore/legacy-ssh-store.hh rename to src/libstore/nix/legacy-ssh-store.hh index 92aa4ae56d1..9c4a9230da1 100644 --- a/src/libstore/legacy-ssh-store.hh +++ b/src/libstore/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/nix/length-prefixed-protocol-helper.hh similarity index 99% rename from src/libstore/length-prefixed-protocol-helper.hh rename to src/libstore/nix/length-prefixed-protocol-helper.hh index 7e977bbf1a2..ad7b32793e4 100644 --- a/src/libstore/length-prefixed-protocol-helper.hh +++ b/src/libstore/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/nix/local-binary-cache-store.hh similarity index 92% rename from src/libstore/local-binary-cache-store.hh rename to src/libstore/nix/local-binary-cache-store.hh index 997e8ecbb51..acff6621d6d 100644 --- a/src/libstore/local-binary-cache-store.hh +++ b/src/libstore/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/nix/local-fs-store.hh similarity index 96% rename from src/libstore/local-fs-store.hh rename to src/libstore/nix/local-fs-store.hh index 9bb569f0b25..2a5f6e3e7cd 100644 --- a/src/libstore/local-fs-store.hh +++ b/src/libstore/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/nix/local-overlay-store.hh similarity index 99% rename from src/libstore/local-overlay-store.hh rename to src/libstore/nix/local-overlay-store.hh index 63628abed50..1cee3cc9f9f 100644 --- a/src/libstore/local-overlay-store.hh +++ b/src/libstore/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/nix/local-store.hh similarity index 98% rename from src/libstore/local-store.hh rename to src/libstore/nix/local-store.hh index 83154d65193..2e1fcdfcff2 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/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/nix/log-store.hh similarity index 95% rename from src/libstore/log-store.hh rename to src/libstore/nix/log-store.hh index a84f7dbeb25..5cd8a9f885c 100644 --- a/src/libstore/log-store.hh +++ b/src/libstore/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/nix/machines.hh similarity index 97% rename from src/libstore/machines.hh rename to src/libstore/nix/machines.hh index b70ab907806..6cd1853a5d5 100644 --- a/src/libstore/machines.hh +++ b/src/libstore/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/nix/make-content-addressed.hh similarity index 94% rename from src/libstore/make-content-addressed.hh rename to src/libstore/nix/make-content-addressed.hh index 60bb2b477db..75fe4462f4f 100644 --- a/src/libstore/make-content-addressed.hh +++ b/src/libstore/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/nix/meson.build b/src/libstore/nix/meson.build new file mode 100644 index 00000000000..20e4a915a3a --- /dev/null +++ b/src/libstore/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-creation-and-realisation-goal.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', + '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/nix/names.hh similarity index 96% rename from src/libstore/names.hh rename to src/libstore/nix/names.hh index a6909d54593..f11c22b1c9b 100644 --- a/src/libstore/names.hh +++ b/src/libstore/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/nix/nar-accessor.hh similarity index 96% rename from src/libstore/nar-accessor.hh rename to src/libstore/nix/nar-accessor.hh index 0043897c658..b64330547be 100644 --- a/src/libstore/nar-accessor.hh +++ b/src/libstore/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/nix/nar-info-disk-cache.hh similarity index 94% rename from src/libstore/nar-info-disk-cache.hh rename to src/libstore/nix/nar-info-disk-cache.hh index bbd1d05d5c5..3a301f7e858 100644 --- a/src/libstore/nar-info-disk-cache.hh +++ b/src/libstore/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/nix/nar-info.hh similarity index 93% rename from src/libstore/nar-info.hh rename to src/libstore/nix/nar-info.hh index 561c9a86364..117be878f29 100644 --- a/src/libstore/nar-info.hh +++ b/src/libstore/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/nix/outputs-spec.hh similarity index 98% rename from src/libstore/outputs-spec.hh rename to src/libstore/nix/outputs-spec.hh index 30d15311d0a..324d3a33461 100644 --- a/src/libstore/outputs-spec.hh +++ b/src/libstore/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/nix/parsed-derivations.hh similarity index 95% rename from src/libstore/parsed-derivations.hh rename to src/libstore/nix/parsed-derivations.hh index 51992fa84cd..34e254e0d05 100644 --- a/src/libstore/parsed-derivations.hh +++ b/src/libstore/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/nix/path-info.hh similarity index 98% rename from src/libstore/path-info.hh rename to src/libstore/nix/path-info.hh index 9a4c466a898..45c411ddd81 100644 --- a/src/libstore/path-info.hh +++ b/src/libstore/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/nix/path-references.hh similarity index 91% rename from src/libstore/path-references.hh rename to src/libstore/nix/path-references.hh index 0553003f83a..0b5e427646b 100644 --- a/src/libstore/path-references.hh +++ b/src/libstore/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/nix/path-regex.hh similarity index 100% rename from src/libstore/path-regex.hh rename to src/libstore/nix/path-regex.hh diff --git a/src/libstore/path-with-outputs.hh b/src/libstore/nix/path-with-outputs.hh similarity index 95% rename from src/libstore/path-with-outputs.hh rename to src/libstore/nix/path-with-outputs.hh index 5f76a583a9a..e2ff303f274 100644 --- a/src/libstore/path-with-outputs.hh +++ b/src/libstore/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/nix/path.hh similarity index 98% rename from src/libstore/path.hh rename to src/libstore/nix/path.hh index 90226236258..56cd5aeb724 100644 --- a/src/libstore/path.hh +++ b/src/libstore/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/nix/pathlocks.hh similarity index 97% rename from src/libstore/pathlocks.hh rename to src/libstore/nix/pathlocks.hh index 42a84a1a37b..68f5a026238 100644 --- a/src/libstore/pathlocks.hh +++ b/src/libstore/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/nix/posix-fs-canonicalise.hh similarity index 96% rename from src/libstore/posix-fs-canonicalise.hh rename to src/libstore/nix/posix-fs-canonicalise.hh index 45a4f3f2069..1309db098e9 100644 --- a/src/libstore/posix-fs-canonicalise.hh +++ b/src/libstore/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/nix/profiles.hh similarity index 99% rename from src/libstore/profiles.hh rename to src/libstore/nix/profiles.hh index 33fcf04b3a8..85f45cb73d4 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/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/nix/realisation.hh similarity index 96% rename from src/libstore/realisation.hh rename to src/libstore/nix/realisation.hh index ddb4af770a2..2d868980c63 100644 --- a/src/libstore/realisation.hh +++ b/src/libstore/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/nix/remote-fs-accessor.hh similarity index 91% rename from src/libstore/remote-fs-accessor.hh rename to src/libstore/nix/remote-fs-accessor.hh index d09762a53c4..5abb195ee00 100644 --- a/src/libstore/remote-fs-accessor.hh +++ b/src/libstore/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/nix/remote-store-connection.hh similarity index 91% rename from src/libstore/remote-store-connection.hh rename to src/libstore/nix/remote-store-connection.hh index f8549d0b245..5b11a04f770 100644 --- a/src/libstore/remote-store-connection.hh +++ b/src/libstore/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/nix/remote-store.hh similarity index 98% rename from src/libstore/remote-store.hh rename to src/libstore/nix/remote-store.hh index ea6cd471eb5..ebc9b2a814e 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/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/s3-binary-cache-store.hh b/src/libstore/nix/s3-binary-cache-store.hh similarity index 98% rename from src/libstore/s3-binary-cache-store.hh rename to src/libstore/nix/s3-binary-cache-store.hh index 7d303a115f4..a0ca22bbbe5 100644 --- a/src/libstore/s3-binary-cache-store.hh +++ b/src/libstore/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/nix/s3.hh similarity index 97% rename from src/libstore/s3.hh rename to src/libstore/nix/s3.hh index 18de115aeb1..367c41d3682 100644 --- a/src/libstore/s3.hh +++ b/src/libstore/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/nix/serve-protocol-connection.hh similarity index 98% rename from src/libstore/serve-protocol-connection.hh rename to src/libstore/nix/serve-protocol-connection.hh index 73bf714439e..f1a9e1edee4 100644 --- a/src/libstore/serve-protocol-connection.hh +++ b/src/libstore/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/nix/serve-protocol-impl.hh similarity index 95% rename from src/libstore/serve-protocol-impl.hh rename to src/libstore/nix/serve-protocol-impl.hh index 099eade648e..2621d3b428e 100644 --- a/src/libstore/serve-protocol-impl.hh +++ b/src/libstore/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/nix/serve-protocol.hh similarity index 99% rename from src/libstore/serve-protocol.hh rename to src/libstore/nix/serve-protocol.hh index 8c112bb74c7..a8587f6183a 100644 --- a/src/libstore/serve-protocol.hh +++ b/src/libstore/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/nix/sqlite.hh similarity index 99% rename from src/libstore/sqlite.hh rename to src/libstore/nix/sqlite.hh index 037380b7109..4143fa8a4e4 100644 --- a/src/libstore/sqlite.hh +++ b/src/libstore/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/nix/ssh-store.hh similarity index 91% rename from src/libstore/ssh-store.hh rename to src/libstore/nix/ssh-store.hh index 29a2a8b2c2d..34ec4f79eca 100644 --- a/src/libstore/ssh-store.hh +++ b/src/libstore/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/nix/ssh.hh similarity index 95% rename from src/libstore/ssh.hh rename to src/libstore/nix/ssh.hh index eb05df01174..fa046d6de19 100644 --- a/src/libstore/ssh.hh +++ b/src/libstore/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/nix/store-api.hh similarity index 98% rename from src/libstore/store-api.hh rename to src/libstore/nix/store-api.hh index 2eba88ea046..8e297dab2f9 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/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/nix/store-cast.hh similarity index 94% rename from src/libstore/store-cast.hh rename to src/libstore/nix/store-cast.hh index 2473e72c5c4..4e6691016fb 100644 --- a/src/libstore/store-cast.hh +++ b/src/libstore/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/nix/store-dir-config.hh similarity index 95% rename from src/libstore/store-dir-config.hh rename to src/libstore/nix/store-dir-config.hh index fd4332b918f..66e084a2494 100644 --- a/src/libstore/store-dir-config.hh +++ b/src/libstore/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/nix/store-reference.hh similarity index 98% rename from src/libstore/store-reference.hh rename to src/libstore/nix/store-reference.hh index 7100a1db095..922640fe002 100644 --- a/src/libstore/store-reference.hh +++ b/src/libstore/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/nix/uds-remote-store.hh similarity index 95% rename from src/libstore/uds-remote-store.hh rename to src/libstore/nix/uds-remote-store.hh index a8e57166416..0a2e3fe9f57 100644 --- a/src/libstore/uds-remote-store.hh +++ b/src/libstore/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/nix/worker-protocol-connection.hh similarity index 98% rename from src/libstore/worker-protocol-connection.hh rename to src/libstore/nix/worker-protocol-connection.hh index c2f446db1d9..a1a4668f254 100644 --- a/src/libstore/worker-protocol-connection.hh +++ b/src/libstore/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/nix/worker-protocol-impl.hh similarity index 95% rename from src/libstore/worker-protocol-impl.hh rename to src/libstore/nix/worker-protocol-impl.hh index 87398df90c9..902d21542b6 100644 --- a/src/libstore/worker-protocol-impl.hh +++ b/src/libstore/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/nix/worker-protocol.hh similarity index 99% rename from src/libstore/worker-protocol.hh rename to src/libstore/nix/worker-protocol.hh index c356fa1bf37..175ddf01f68 100644 --- a/src/libstore/worker-protocol.hh +++ b/src/libstore/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/optimise-store.cc b/src/libstore/optimise-store.cc index aeff24c642a..c2cda58e7cc 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -1,8 +1,8 @@ -#include "local-store.hh" -#include "globals.hh" -#include "signals.hh" -#include "posix-fs-canonicalise.hh" -#include "posix-source-accessor.hh" +#include "nix/local-store.hh" +#include "nix/globals.hh" +#include "nix/signals.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/posix-source-accessor.hh" #include #include diff --git a/src/libstore/outputs-spec.cc b/src/libstore/outputs-spec.cc index b623a975cc4..7d56a7afdbe 100644 --- a/src/libstore/outputs-spec.cc +++ b/src/libstore/outputs-spec.cc @@ -1,11 +1,11 @@ #include #include -#include "util.hh" -#include "regex-combinators.hh" -#include "outputs-spec.hh" -#include "path-regex.hh" -#include "strings-inline.hh" +#include "nix/util.hh" +#include "nix/regex-combinators.hh" +#include "nix/outputs-spec.hh" +#include "nix/path-regex.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libstore/parsed-derivations.cc b/src/libstore/parsed-derivations.cc index b26c36efe6f..0e8f9ba9518 100644 --- a/src/libstore/parsed-derivations.cc +++ b/src/libstore/parsed-derivations.cc @@ -1,4 +1,4 @@ -#include "parsed-derivations.hh" +#include "nix/parsed-derivations.hh" #include #include diff --git a/src/libstore/path-info.cc b/src/libstore/path-info.cc index 6e87e60f446..574ada7ac28 100644 --- a/src/libstore/path-info.cc +++ b/src/libstore/path-info.cc @@ -1,10 +1,10 @@ #include -#include "path-info.hh" -#include "store-api.hh" -#include "json-utils.hh" -#include "comparator.hh" -#include "strings.hh" +#include "nix/path-info.hh" +#include "nix/store-api.hh" +#include "nix/json-utils.hh" +#include "nix/comparator.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/path-references.cc b/src/libstore/path-references.cc index 15f52ec9dea..a5aa8f48f59 100644 --- a/src/libstore/path-references.cc +++ b/src/libstore/path-references.cc @@ -1,6 +1,6 @@ -#include "path-references.hh" -#include "hash.hh" -#include "archive.hh" +#include "nix/path-references.hh" +#include "nix/hash.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libstore/path-with-outputs.cc b/src/libstore/path-with-outputs.cc index e526b1ff6c7..87f7c6a726c 100644 --- a/src/libstore/path-with-outputs.cc +++ b/src/libstore/path-with-outputs.cc @@ -1,8 +1,8 @@ #include -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "strings.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libstore/path.cc b/src/libstore/path.cc index 3e9d054778c..d1eb02e709a 100644 --- a/src/libstore/path.cc +++ b/src/libstore/path.cc @@ -1,4 +1,4 @@ -#include "store-dir-config.hh" +#include "nix/store-dir-config.hh" namespace nix { diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc index c855e797fdc..36bee67416e 100644 --- a/src/libstore/pathlocks.cc +++ b/src/libstore/pathlocks.cc @@ -1,7 +1,7 @@ -#include "pathlocks.hh" -#include "util.hh" -#include "sync.hh" -#include "signals.hh" +#include "nix/pathlocks.hh" +#include "nix/util.hh" +#include "nix/sync.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/posix-fs-canonicalise.cc b/src/libstore/posix-fs-canonicalise.cc index 46a78cc86aa..5fddae42fcf 100644 --- a/src/libstore/posix-fs-canonicalise.cc +++ b/src/libstore/posix-fs-canonicalise.cc @@ -2,12 +2,12 @@ # include #endif -#include "posix-fs-canonicalise.hh" -#include "file-system.hh" -#include "signals.hh" -#include "util.hh" -#include "globals.hh" -#include "store-api.hh" +#include "nix/posix-fs-canonicalise.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/util.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index 46efedfe327..19358f1360e 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -1,8 +1,8 @@ -#include "profiles.hh" -#include "signals.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "users.hh" +#include "nix/profiles.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/users.hh" #include #include diff --git a/src/libstore/realisation.cc b/src/libstore/realisation.cc index 86bfdd1a8bf..63b156b30a2 100644 --- a/src/libstore/realisation.cc +++ b/src/libstore/realisation.cc @@ -1,7 +1,7 @@ -#include "realisation.hh" -#include "store-api.hh" -#include "closure.hh" -#include "signature/local-keys.hh" +#include "nix/realisation.hh" +#include "nix/store-api.hh" +#include "nix/closure.hh" +#include "nix/signature/local-keys.hh" #include namespace nix { diff --git a/src/libstore/remote-fs-accessor.cc b/src/libstore/remote-fs-accessor.cc index 7e360b5fef1..2b3f0675d04 100644 --- a/src/libstore/remote-fs-accessor.cc +++ b/src/libstore/remote-fs-accessor.cc @@ -1,6 +1,6 @@ #include -#include "remote-fs-accessor.hh" -#include "nar-accessor.hh" +#include "nix/remote-fs-accessor.hh" +#include "nix/nar-accessor.hh" #include #include diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 533ea557d25..bae03e5d049 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/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index cfa713b00c2..69ebad75b63 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -2,14 +2,14 @@ #include -#include "s3.hh" -#include "s3-binary-cache-store.hh" -#include "nar-info.hh" -#include "nar-info-disk-cache.hh" -#include "globals.hh" -#include "compression.hh" -#include "filetransfer.hh" -#include "signals.hh" +#include "nix/s3.hh" +#include "nix/s3-binary-cache-store.hh" +#include "nix/nar-info.hh" +#include "nix/nar-info-disk-cache.hh" +#include "nix/globals.hh" +#include "nix/compression.hh" +#include "nix/filetransfer.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/serve-protocol-connection.cc b/src/libstore/serve-protocol-connection.cc index 07379999b4b..577297af820 100644 --- a/src/libstore/serve-protocol-connection.cc +++ b/src/libstore/serve-protocol-connection.cc @@ -1,7 +1,7 @@ -#include "serve-protocol-connection.hh" -#include "serve-protocol-impl.hh" -#include "build-result.hh" -#include "derivations.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/serve-protocol.cc b/src/libstore/serve-protocol.cc index 08bfad9e405..0e2a3bc9d13 100644 --- a/src/libstore/serve-protocol.cc +++ b/src/libstore/serve-protocol.cc @@ -1,11 +1,11 @@ -#include "serialise.hh" -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "build-result.hh" -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" -#include "archive.hh" -#include "path-info.hh" +#include "nix/serialise.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/path-info.hh" #include diff --git a/src/libstore/sqlite.cc b/src/libstore/sqlite.cc index f02e472fd5f..1f9622255d5 100644 --- a/src/libstore/sqlite.cc +++ b/src/libstore/sqlite.cc @@ -1,8 +1,8 @@ -#include "sqlite.hh" -#include "globals.hh" -#include "util.hh" -#include "url.hh" -#include "signals.hh" +#include "nix/sqlite.hh" +#include "nix/globals.hh" +#include "nix/util.hh" +#include "nix/url.hh" +#include "nix/signals.hh" #include diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc index 954a9746774..dc889cb3901 100644 --- a/src/libstore/ssh-store.cc +++ b/src/libstore/ssh-store.cc @@ -1,12 +1,12 @@ -#include "ssh-store.hh" -#include "local-fs-store.hh" -#include "remote-store-connection.hh" -#include "source-accessor.hh" -#include "archive.hh" -#include "worker-protocol.hh" -#include "worker-protocol-impl.hh" -#include "pool.hh" -#include "ssh.hh" +#include "nix/ssh-store.hh" +#include "nix/local-fs-store.hh" +#include "nix/remote-store-connection.hh" +#include "nix/source-accessor.hh" +#include "nix/archive.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/pool.hh" +#include "nix/ssh.hh" namespace nix { diff --git a/src/libstore/ssh.cc b/src/libstore/ssh.cc index f47cfbbec2c..553d2610ee1 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 236622eae37..243adb20c92 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; @@ -1276,8 +1276,8 @@ Derivation Store::readInvalidDerivation(const StorePath & drvPath) } -#include "local-store.hh" -#include "uds-remote-store.hh" +#include "nix/local-store.hh" +#include "nix/uds-remote-store.hh" namespace nix { diff --git a/src/libstore/store-reference.cc b/src/libstore/store-reference.cc index b4968dfadbd..610e70f9902 100644 --- a/src/libstore/store-reference.cc +++ b/src/libstore/store-reference.cc @@ -1,10 +1,10 @@ #include -#include "error.hh" -#include "url.hh" -#include "store-reference.hh" -#include "file-system.hh" -#include "util.hh" +#include "nix/error.hh" +#include "nix/url.hh" +#include "nix/store-reference.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libstore/uds-remote-store.cc b/src/libstore/uds-remote-store.cc index 3c445eb1318..b41eae39c8e 100644 --- a/src/libstore/uds-remote-store.cc +++ b/src/libstore/uds-remote-store.cc @@ -1,6 +1,6 @@ -#include "uds-remote-store.hh" -#include "unix-domain-socket.hh" -#include "worker-protocol.hh" +#include "nix/uds-remote-store.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/worker-protocol.hh" #include #include diff --git a/src/libstore/unix/build/child.cc b/src/libstore/unix/build/child.cc index aa31c3caf24..c19d1e64618 100644 --- a/src/libstore/unix/build/child.cc +++ b/src/libstore/unix/build/child.cc @@ -1,6 +1,6 @@ -#include "child.hh" -#include "current-process.hh" -#include "logging.hh" +#include "nix/build/child.hh" +#include "nix/current-process.hh" +#include "nix/logging.hh" #include #include diff --git a/src/libstore/unix/build/hook-instance.cc b/src/libstore/unix/build/hook-instance.cc index 79eb25a91be..5407bef14c3 100644 --- a/src/libstore/unix/build/hook-instance.cc +++ b/src/libstore/unix/build/hook-instance.cc @@ -1,10 +1,10 @@ -#include "globals.hh" -#include "config-global.hh" -#include "hook-instance.hh" -#include "file-system.hh" -#include "child.hh" -#include "strings.hh" -#include "executable-path.hh" +#include "nix/globals.hh" +#include "nix/config-global.hh" +#include "nix/build/hook-instance.hh" +#include "nix/file-system.hh" +#include "nix/build/child.hh" +#include "nix/strings.hh" +#include "nix/executable-path.hh" namespace nix { diff --git a/src/libstore/unix/build/local-derivation-goal.cc b/src/libstore/unix/build/local-derivation-goal.cc index 61a36dd51c3..ef70a9be655 100644 --- a/src/libstore/unix/build/local-derivation-goal.cc +++ b/src/libstore/unix/build/local-derivation-goal.cc @@ -1,24 +1,24 @@ -#include "local-derivation-goal.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 "nix/build/local-derivation-goal.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 #include @@ -37,7 +37,7 @@ /* Includes required for chroot support. */ #if __linux__ -# include "fchmodat2-compat.hh" +# include "nix/fchmodat2-compat.hh" # include # include # include @@ -46,13 +46,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__ @@ -68,8 +68,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/meson.build b/src/libstore/unix/meson.build index d9d19013107..6b266a588e5 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('nix') diff --git a/src/libstore/unix/build/child.hh b/src/libstore/unix/nix/build/child.hh similarity index 100% rename from src/libstore/unix/build/child.hh rename to src/libstore/unix/nix/build/child.hh diff --git a/src/libstore/unix/build/hook-instance.hh b/src/libstore/unix/nix/build/hook-instance.hh similarity index 85% rename from src/libstore/unix/build/hook-instance.hh rename to src/libstore/unix/nix/build/hook-instance.hh index 61cf534f4e9..b82a5118370 100644 --- a/src/libstore/unix/build/hook-instance.hh +++ b/src/libstore/unix/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/nix/build/local-derivation-goal.hh similarity index 98% rename from src/libstore/unix/build/local-derivation-goal.hh rename to src/libstore/unix/nix/build/local-derivation-goal.hh index c7a129f9042..1a14211be3b 100644 --- a/src/libstore/unix/build/local-derivation-goal.hh +++ b/src/libstore/unix/nix/build/local-derivation-goal.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "derivation-goal.hh" -#include "local-store.hh" -#include "processes.hh" +#include "nix/build/derivation-goal.hh" +#include "nix/local-store.hh" +#include "nix/processes.hh" namespace nix { diff --git a/src/libstore/unix/nix/meson.build b/src/libstore/unix/nix/meson.build new file mode 100644 index 00000000000..b07787c0aac --- /dev/null +++ b/src/libstore/unix/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/nix/user-lock.hh similarity index 100% rename from src/libstore/unix/user-lock.hh rename to src/libstore/unix/nix/user-lock.hh diff --git a/src/libstore/unix/pathlocks.cc b/src/libstore/unix/pathlocks.cc index 1ec4579ec96..3cc24c85973 100644 --- a/src/libstore/unix/pathlocks.cc +++ b/src/libstore/unix/pathlocks.cc @@ -1,7 +1,7 @@ -#include "pathlocks.hh" -#include "util.hh" -#include "sync.hh" -#include "signals.hh" +#include "nix/pathlocks.hh" +#include "nix/util.hh" +#include "nix/sync.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libstore/unix/user-lock.cc b/src/libstore/unix/user-lock.cc index 29f4b2cb31c..4426f07689e 100644 --- a/src/libstore/unix/user-lock.cc +++ b/src/libstore/unix/user-lock.cc @@ -2,11 +2,11 @@ #include #include -#include "user-lock.hh" -#include "file-system.hh" -#include "globals.hh" -#include "pathlocks.hh" -#include "users.hh" +#include "nix/user-lock.hh" +#include "nix/file-system.hh" +#include "nix/globals.hh" +#include "nix/pathlocks.hh" +#include "nix/users.hh" namespace nix { diff --git a/src/libstore/windows/pathlocks.cc b/src/libstore/windows/pathlocks.cc index 29a98d8e231..0161a8c322e 100644 --- a/src/libstore/windows/pathlocks.cc +++ b/src/libstore/windows/pathlocks.cc @@ -1,13 +1,13 @@ -#include "logging.hh" -#include "pathlocks.hh" -#include "signals.hh" -#include "util.hh" +#include "nix/logging.hh" +#include "nix/pathlocks.hh" +#include "nix/signals.hh" +#include "nix/util.hh" #ifdef _WIN32 # include # include # include -# include "windows-error.hh" +# include "nix/windows-error.hh" namespace nix { diff --git a/src/libstore/worker-protocol-connection.cc b/src/libstore/worker-protocol-connection.cc index 6585df4be62..a30e808a7cd 100644 --- a/src/libstore/worker-protocol-connection.cc +++ b/src/libstore/worker-protocol-connection.cc @@ -1,7 +1,7 @@ -#include "worker-protocol-connection.hh" -#include "worker-protocol-impl.hh" -#include "build-result.hh" -#include "derivations.hh" +#include "nix/worker-protocol-connection.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/derivations.hh" namespace nix { diff --git a/src/libstore/worker-protocol.cc b/src/libstore/worker-protocol.cc index f06fb2893c7..e9972365205 100644 --- a/src/libstore/worker-protocol.cc +++ b/src/libstore/worker-protocol.cc @@ -1,11 +1,11 @@ -#include "serialise.hh" -#include "path-with-outputs.hh" -#include "store-api.hh" -#include "build-result.hh" -#include "worker-protocol.hh" -#include "worker-protocol-impl.hh" -#include "archive.hh" -#include "path-info.hh" +#include "nix/serialise.hh" +#include "nix/path-with-outputs.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" +#include "nix/worker-protocol.hh" +#include "nix/worker-protocol-impl.hh" +#include "nix/archive.hh" +#include "nix/path-info.hh" #include #include diff --git a/src/libutil-c/meson.build b/src/libutil-c/meson.build index ac129766580..c0167ff90fc 100644 --- a/src/libutil-c/meson.build +++ b/src/libutil-c/meson.build @@ -36,7 +36,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', # From C libraries, for our public, installed headers too '-include', 'config-util.h', diff --git a/src/libutil-c/nix_api_util.cc b/src/libutil-c/nix_api_util.cc index 992ea0a2ad0..55c210c55f2 100644 --- a/src/libutil-c/nix_api_util.cc +++ b/src/libutil-c/nix_api_util.cc @@ -1,8 +1,8 @@ #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 diff --git a/src/libutil-c/nix_api_util_internal.h b/src/libutil-c/nix_api_util_internal.h index 7fa4252acfd..362d8c59a02 100644 --- a/src/libutil-c/nix_api_util_internal.h +++ b/src/libutil-c/nix_api_util_internal.h @@ -4,7 +4,7 @@ #include #include -#include "error.hh" +#include "nix/error.hh" #include "nix_api_util.h" struct nix_c_context diff --git a/src/libutil-test-support/tests/hash.cc b/src/libutil-test-support/hash.cc similarity index 91% rename from src/libutil-test-support/tests/hash.cc rename to src/libutil-test-support/hash.cc index 51b9663b4c4..3614b42b3aa 100644 --- a/src/libutil-test-support/tests/hash.cc +++ b/src/libutil-test-support/hash.cc @@ -2,9 +2,9 @@ #include -#include "hash.hh" +#include "nix/hash.hh" -#include "tests/hash.hh" +#include "nix/tests/hash.hh" namespace rc { using namespace nix; diff --git a/src/libutil-test-support/meson.build b/src/libutil-test-support/meson.build index db944cf0619..fb0a0a73c19 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('nix') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') diff --git a/src/libutil-test-support/nix/meson.build b/src/libutil-test-support/nix/meson.build new file mode 100644 index 00000000000..6490d19ace4 --- /dev/null +++ b/src/libutil-test-support/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/nix/tests/characterization.hh similarity index 96% rename from src/libutil-test-support/tests/characterization.hh rename to src/libutil-test-support/nix/tests/characterization.hh index 5e790e75ba6..f9079363323 100644 --- a/src/libutil-test-support/tests/characterization.hh +++ b/src/libutil-test-support/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/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/nix/tests/gtest-with-params.hh diff --git a/src/libutil-test-support/tests/hash.hh b/src/libutil-test-support/nix/tests/hash.hh similarity index 88% rename from src/libutil-test-support/tests/hash.hh rename to src/libutil-test-support/nix/tests/hash.hh index 1f9fa59ae9b..b965ac1a24e 100644 --- a/src/libutil-test-support/tests/hash.hh +++ b/src/libutil-test-support/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/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/nix/tests/nix_api_util.hh diff --git a/src/libutil-test-support/tests/string_callback.hh b/src/libutil-test-support/nix/tests/string_callback.hh similarity index 100% rename from src/libutil-test-support/tests/string_callback.hh rename to src/libutil-test-support/nix/tests/string_callback.hh diff --git a/src/libutil-test-support/tests/tracing-file-system-object-sink.hh b/src/libutil-test-support/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/nix/tests/tracing-file-system-object-sink.hh index 895ac366405..f5d38d0f811 100644 --- a/src/libutil-test-support/tests/tracing-file-system-object-sink.hh +++ b/src/libutil-test-support/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/tests/string_callback.cc b/src/libutil-test-support/string_callback.cc similarity index 85% rename from src/libutil-test-support/tests/string_callback.cc rename to src/libutil-test-support/string_callback.cc index 7a13bd4ff9c..25781dc60ce 100644 --- a/src/libutil-test-support/tests/string_callback.cc +++ b/src/libutil-test-support/string_callback.cc @@ -1,4 +1,4 @@ -#include "string_callback.hh" +#include "nix/tests/string_callback.hh" namespace nix::testing { diff --git a/src/libutil-test-support/tests/tracing-file-system-object-sink.cc b/src/libutil-test-support/tracing-file-system-object-sink.cc similarity index 95% rename from src/libutil-test-support/tests/tracing-file-system-object-sink.cc rename to src/libutil-test-support/tracing-file-system-object-sink.cc index 122a09dcb32..52b081fb8fa 100644 --- a/src/libutil-test-support/tests/tracing-file-system-object-sink.cc +++ b/src/libutil-test-support/tracing-file-system-object-sink.cc @@ -1,5 +1,5 @@ #include -#include "tracing-file-system-object-sink.hh" +#include "nix/tracing-file-system-object-sink.hh" namespace nix::test { diff --git a/src/libutil-tests/args.cc b/src/libutil-tests/args.cc index 95022443006..abcc8564175 100644 --- a/src/libutil-tests/args.cc +++ b/src/libutil-tests/args.cc @@ -1,5 +1,5 @@ -#include "args.hh" -#include "fs-sink.hh" +#include "nix/args.hh" +#include "nix/fs-sink.hh" #include #include diff --git a/src/libutil-tests/canon-path.cc b/src/libutil-tests/canon-path.cc index 7f91308afe1..6ef6d3c994b 100644 --- a/src/libutil-tests/canon-path.cc +++ b/src/libutil-tests/canon-path.cc @@ -1,4 +1,4 @@ -#include "canon-path.hh" +#include "nix/canon-path.hh" #include diff --git a/src/libutil-tests/checked-arithmetic.cc b/src/libutil-tests/checked-arithmetic.cc index 75018660dc8..4d98344fb33 100644 --- a/src/libutil-tests/checked-arithmetic.cc +++ b/src/libutil-tests/checked-arithmetic.cc @@ -5,9 +5,9 @@ #include #include -#include +#include "nix/checked-arithmetic.hh" -#include "tests/gtest-with-params.hh" +#include "nix/tests/gtest-with-params.hh" namespace rc { using namespace nix; diff --git a/src/libutil-tests/chunked-vector.cc b/src/libutil-tests/chunked-vector.cc index 868d11f6f37..16dedc63f53 100644 --- a/src/libutil-tests/chunked-vector.cc +++ b/src/libutil-tests/chunked-vector.cc @@ -1,4 +1,4 @@ -#include "chunked-vector.hh" +#include "nix/chunked-vector.hh" #include diff --git a/src/libutil-tests/closure.cc b/src/libutil-tests/closure.cc index 7597e78073b..b6b777bcc43 100644 --- a/src/libutil-tests/closure.cc +++ b/src/libutil-tests/closure.cc @@ -1,4 +1,4 @@ -#include "closure.hh" +#include "nix/closure.hh" #include namespace nix { diff --git a/src/libutil-tests/compression.cc b/src/libutil-tests/compression.cc index bbbf3500fbf..7c7dfbd7bb4 100644 --- a/src/libutil-tests/compression.cc +++ b/src/libutil-tests/compression.cc @@ -1,4 +1,4 @@ -#include "compression.hh" +#include "nix/compression.hh" #include namespace nix { diff --git a/src/libutil-tests/config.cc b/src/libutil-tests/config.cc index 886e70da50d..aae410d2b5a 100644 --- a/src/libutil-tests/config.cc +++ b/src/libutil-tests/config.cc @@ -1,5 +1,5 @@ -#include "config.hh" -#include "args.hh" +#include "nix/config.hh" +#include "nix/args.hh" #include #include diff --git a/src/libutil-tests/executable-path.cc b/src/libutil-tests/executable-path.cc index 8d182357dab..041209882cc 100644 --- a/src/libutil-tests/executable-path.cc +++ b/src/libutil-tests/executable-path.cc @@ -1,6 +1,6 @@ #include -#include "executable-path.hh" +#include "nix/executable-path.hh" namespace nix { diff --git a/src/libutil-tests/file-content-address.cc b/src/libutil-tests/file-content-address.cc index 27d926a8736..686114a9fc1 100644 --- a/src/libutil-tests/file-content-address.cc +++ b/src/libutil-tests/file-content-address.cc @@ -1,6 +1,6 @@ #include -#include "file-content-address.hh" +#include "nix/file-content-address.hh" namespace nix { diff --git a/src/libutil-tests/file-system.cc b/src/libutil-tests/file-system.cc index 2c10d486986..71e671a698a 100644 --- a/src/libutil-tests/file-system.cc +++ b/src/libutil-tests/file-system.cc @@ -1,9 +1,9 @@ -#include "util.hh" -#include "types.hh" -#include "file-system.hh" -#include "processes.hh" -#include "terminal.hh" -#include "strings.hh" +#include "nix/util.hh" +#include "nix/types.hh" +#include "nix/file-system.hh" +#include "nix/processes.hh" +#include "nix/terminal.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libutil-tests/git.cc b/src/libutil-tests/git.cc index 048956a580a..b91d5019b53 100644 --- a/src/libutil-tests/git.cc +++ b/src/libutil-tests/git.cc @@ -1,9 +1,9 @@ #include -#include "git.hh" -#include "memory-source-accessor.hh" +#include "nix/git.hh" +#include "nix/memory-source-accessor.hh" -#include "tests/characterization.hh" +#include "nix/tests/characterization.hh" namespace nix { diff --git a/src/libutil-tests/hash.cc b/src/libutil-tests/hash.cc index 3a639aef92f..1ba69a57337 100644 --- a/src/libutil-tests/hash.cc +++ b/src/libutil-tests/hash.cc @@ -2,7 +2,7 @@ #include -#include "hash.hh" +#include "nix/hash.hh" namespace nix { diff --git a/src/libutil-tests/hilite.cc b/src/libutil-tests/hilite.cc index 5ef58188884..e571a9bf65f 100644 --- a/src/libutil-tests/hilite.cc +++ b/src/libutil-tests/hilite.cc @@ -1,4 +1,4 @@ -#include "hilite.hh" +#include "nix/hilite.hh" #include diff --git a/src/libutil-tests/json-utils.cc b/src/libutil-tests/json-utils.cc index 704a4acb05d..b8722bd304d 100644 --- a/src/libutil-tests/json-utils.cc +++ b/src/libutil-tests/json-utils.cc @@ -3,8 +3,8 @@ #include -#include "error.hh" -#include "json-utils.hh" +#include "nix/error.hh" +#include "nix/json-utils.hh" namespace nix { diff --git a/src/libutil-tests/logging.cc b/src/libutil-tests/logging.cc index 1d7304f0591..ca89ee02ff8 100644 --- a/src/libutil-tests/logging.cc +++ b/src/libutil-tests/logging.cc @@ -1,7 +1,7 @@ #if 0 -#include "logging.hh" -#include "nixexpr.hh" +#include "nix/logging.hh" +#include "nix/nixexpr.hh" #include #include diff --git a/src/libutil-tests/lru-cache.cc b/src/libutil-tests/lru-cache.cc index 091d3d5ede1..98763588af3 100644 --- a/src/libutil-tests/lru-cache.cc +++ b/src/libutil-tests/lru-cache.cc @@ -1,4 +1,4 @@ -#include "lru-cache.hh" +#include "nix/lru-cache.hh" #include namespace nix { diff --git a/src/libutil-tests/meson.build b/src/libutil-tests/meson.build index ad2c61711cd..945107f4276 100644 --- a/src/libutil-tests/meson.build +++ b/src/libutil-tests/meson.build @@ -35,7 +35,7 @@ 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', 'nix/config-util.hh', '-include', 'config-util.h', language : 'cpp', ) diff --git a/src/libutil-tests/nix_api_util.cc b/src/libutil-tests/nix_api_util.cc index 7b77bd87fac..f768de01120 100644 --- a/src/libutil-tests/nix_api_util.cc +++ b/src/libutil-tests/nix_api_util.cc @@ -1,9 +1,9 @@ -#include "config-global.hh" -#include "args.hh" +#include "nix/config-global.hh" +#include "nix/args.hh" #include "nix_api_util.h" #include "nix_api_util_internal.h" -#include "tests/nix_api_util.hh" -#include "tests/string_callback.hh" +#include "nix/tests/nix_api_util.hh" +#include "nix/tests/string_callback.hh" #include diff --git a/src/libutil-tests/pool.cc b/src/libutil-tests/pool.cc index 127e42dda2b..8402768d345 100644 --- a/src/libutil-tests/pool.cc +++ b/src/libutil-tests/pool.cc @@ -1,4 +1,4 @@ -#include "pool.hh" +#include "nix/pool.hh" #include namespace nix { diff --git a/src/libutil-tests/position.cc b/src/libutil-tests/position.cc index 484ecc2479b..0726b89c08d 100644 --- a/src/libutil-tests/position.cc +++ b/src/libutil-tests/position.cc @@ -1,6 +1,6 @@ #include -#include "position.hh" +#include "nix/position.hh" namespace nix { diff --git a/src/libutil-tests/processes.cc b/src/libutil-tests/processes.cc index 9033595e85c..5d1435e3a4a 100644 --- a/src/libutil-tests/processes.cc +++ b/src/libutil-tests/processes.cc @@ -1,4 +1,4 @@ -#include "processes.hh" +#include "nix/processes.hh" #include diff --git a/src/libutil-tests/references.cc b/src/libutil-tests/references.cc index c3efa6d5101..362629b553e 100644 --- a/src/libutil-tests/references.cc +++ b/src/libutil-tests/references.cc @@ -1,4 +1,4 @@ -#include "references.hh" +#include "nix/references.hh" #include namespace nix { diff --git a/src/libutil-tests/spawn.cc b/src/libutil-tests/spawn.cc index c617acae08e..502d4e90b32 100644 --- a/src/libutil-tests/spawn.cc +++ b/src/libutil-tests/spawn.cc @@ -1,6 +1,6 @@ #include -#include "processes.hh" +#include "nix/processes.hh" namespace nix { diff --git a/src/libutil-tests/strings.cc b/src/libutil-tests/strings.cc index 206890bcf19..87c8c0bf870 100644 --- a/src/libutil-tests/strings.cc +++ b/src/libutil-tests/strings.cc @@ -1,8 +1,8 @@ #include #include -#include "strings.hh" -#include "error.hh" +#include "nix/strings.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil-tests/suggestions.cc b/src/libutil-tests/suggestions.cc index 279994abc67..36d0b7169b8 100644 --- a/src/libutil-tests/suggestions.cc +++ b/src/libutil-tests/suggestions.cc @@ -1,4 +1,4 @@ -#include "suggestions.hh" +#include "nix/suggestions.hh" #include namespace nix { diff --git a/src/libutil-tests/terminal.cc b/src/libutil-tests/terminal.cc index f4fc6e770d2..3d3296cc3b9 100644 --- a/src/libutil-tests/terminal.cc +++ b/src/libutil-tests/terminal.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "types.hh" -#include "terminal.hh" -#include "strings.hh" +#include "nix/util.hh" +#include "nix/types.hh" +#include "nix/terminal.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libutil-tests/url.cc b/src/libutil-tests/url.cc index 7e1d2aa15ee..89a461c2cba 100644 --- a/src/libutil-tests/url.cc +++ b/src/libutil-tests/url.cc @@ -1,4 +1,4 @@ -#include "url.hh" +#include "nix/url.hh" #include namespace nix { diff --git a/src/libutil-tests/util.cc b/src/libutil-tests/util.cc index a3f7c720a5c..53b7cd208f4 100644 --- a/src/libutil-tests/util.cc +++ b/src/libutil-tests/util.cc @@ -1,8 +1,8 @@ -#include "util.hh" -#include "types.hh" -#include "file-system.hh" -#include "terminal.hh" -#include "strings.hh" +#include "nix/util.hh" +#include "nix/types.hh" +#include "nix/file-system.hh" +#include "nix/terminal.hh" +#include "nix/strings.hh" #include #include diff --git a/src/libutil-tests/xml-writer.cc b/src/libutil-tests/xml-writer.cc index adcde25c9f1..7fc1f3154a3 100644 --- a/src/libutil-tests/xml-writer.cc +++ b/src/libutil-tests/xml-writer.cc @@ -1,4 +1,4 @@ -#include "xml-writer.hh" +#include "nix/xml-writer.hh" #include #include diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index 20d8a1e09be..2c7c91dd05d 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -5,12 +5,12 @@ #include // for strcasecmp -#include "archive.hh" -#include "config-global.hh" -#include "posix-source-accessor.hh" -#include "source-path.hh" -#include "file-system.hh" -#include "signals.hh" +#include "nix/archive.hh" +#include "nix/config-global.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/source-path.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" namespace nix { diff --git a/src/libutil/args.cc b/src/libutil/args.cc index 05ecf724ef6..184318cc49f 100644 --- a/src/libutil/args.cc +++ b/src/libutil/args.cc @@ -1,10 +1,10 @@ -#include "args.hh" -#include "args/root.hh" -#include "hash.hh" -#include "environment-variables.hh" -#include "signals.hh" -#include "users.hh" -#include "json-utils.hh" +#include "nix/args.hh" +#include "nix/args/root.hh" +#include "nix/hash.hh" +#include "nix/environment-variables.hh" +#include "nix/signals.hh" +#include "nix/users.hh" +#include "nix/json-utils.hh" #include #include diff --git a/src/libutil/canon-path.cc b/src/libutil/canon-path.cc index 03db6378a82..c6f48ac32ee 100644 --- a/src/libutil/canon-path.cc +++ b/src/libutil/canon-path.cc @@ -1,7 +1,7 @@ -#include "canon-path.hh" -#include "util.hh" -#include "file-path-impl.hh" -#include "strings-inline.hh" +#include "nix/canon-path.hh" +#include "nix/util.hh" +#include "nix/file-path-impl.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc index d2702856591..788ad7109b2 100644 --- a/src/libutil/compression.cc +++ b/src/libutil/compression.cc @@ -1,8 +1,8 @@ -#include "compression.hh" -#include "signals.hh" -#include "tarfile.hh" -#include "finally.hh" -#include "logging.hh" +#include "nix/compression.hh" +#include "nix/signals.hh" +#include "nix/tarfile.hh" +#include "nix/finally.hh" +#include "nix/logging.hh" #include #include diff --git a/src/libutil/compute-levels.cc b/src/libutil/compute-levels.cc index 19eaedfa8d1..8cc3def188d 100644 --- a/src/libutil/compute-levels.cc +++ b/src/libutil/compute-levels.cc @@ -1,4 +1,4 @@ -#include "types.hh" +#include "nix/types.hh" #if HAVE_LIBCPUID #include diff --git a/src/libutil/config-global.cc b/src/libutil/config-global.cc index 3ed1dd1d31c..b325d09e7ba 100644 --- a/src/libutil/config-global.cc +++ b/src/libutil/config-global.cc @@ -1,4 +1,4 @@ -#include "config-global.hh" +#include "nix/config-global.hh" #include diff --git a/src/libutil/config.cc b/src/libutil/config.cc index ca8480304d2..b108dd58a44 100644 --- a/src/libutil/config.cc +++ b/src/libutil/config.cc @@ -1,16 +1,16 @@ -#include "config.hh" -#include "args.hh" -#include "abstract-setting-to-json.hh" -#include "environment-variables.hh" -#include "experimental-features.hh" -#include "util.hh" -#include "file-system.hh" +#include "nix/config.hh" +#include "nix/args.hh" +#include "nix/abstract-setting-to-json.hh" +#include "nix/environment-variables.hh" +#include "nix/experimental-features.hh" +#include "nix/util.hh" +#include "nix/file-system.hh" -#include "config-impl.hh" +#include "nix/config-impl.hh" #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/libutil/current-process.cc b/src/libutil/current-process.cc index 255ae2cf561..11655c55cd0 100644 --- a/src/libutil/current-process.cc +++ b/src/libutil/current-process.cc @@ -1,12 +1,12 @@ #include #include -#include "current-process.hh" -#include "util.hh" -#include "finally.hh" -#include "file-system.hh" -#include "processes.hh" -#include "signals.hh" +#include "nix/current-process.hh" +#include "nix/util.hh" +#include "nix/finally.hh" +#include "nix/file-system.hh" +#include "nix/processes.hh" +#include "nix/signals.hh" #include #ifdef __APPLE__ @@ -15,8 +15,8 @@ #if __linux__ # include -# include "cgroup.hh" -# include "namespaces.hh" +# include "nix/cgroup.hh" +# include "nix/namespaces.hh" #endif namespace nix { diff --git a/src/libutil/english.cc b/src/libutil/english.cc index 8c93c915662..9ccc7ed3b58 100644 --- a/src/libutil/english.cc +++ b/src/libutil/english.cc @@ -1,4 +1,4 @@ -#include "english.hh" +#include "nix/english.hh" namespace nix { diff --git a/src/libutil/environment-variables.cc b/src/libutil/environment-variables.cc index 5947cf742ac..f2948807a69 100644 --- a/src/libutil/environment-variables.cc +++ b/src/libutil/environment-variables.cc @@ -1,5 +1,5 @@ -#include "util.hh" -#include "environment-variables.hh" +#include "nix/util.hh" +#include "nix/environment-variables.hh" extern char ** environ __attribute__((weak)); diff --git a/src/libutil/error.cc b/src/libutil/error.cc index ccd008c7c33..bd0baaeff21 100644 --- a/src/libutil/error.cc +++ b/src/libutil/error.cc @@ -1,14 +1,14 @@ #include -#include "error.hh" -#include "environment-variables.hh" -#include "signals.hh" -#include "terminal.hh" -#include "position.hh" +#include "nix/error.hh" +#include "nix/environment-variables.hh" +#include "nix/signals.hh" +#include "nix/terminal.hh" +#include "nix/position.hh" #include #include -#include "serialise.hh" +#include "nix/serialise.hh" #include namespace nix { diff --git a/src/libutil/executable-path.cc b/src/libutil/executable-path.cc index 8d665c7df95..24e3484f2fd 100644 --- a/src/libutil/executable-path.cc +++ b/src/libutil/executable-path.cc @@ -1,8 +1,8 @@ -#include "environment-variables.hh" -#include "executable-path.hh" -#include "strings-inline.hh" -#include "util.hh" -#include "file-path-impl.hh" +#include "nix/environment-variables.hh" +#include "nix/executable-path.hh" +#include "nix/strings-inline.hh" +#include "nix/util.hh" +#include "nix/file-path-impl.hh" namespace nix { diff --git a/src/libutil/exit.cc b/src/libutil/exit.cc index 73cd8b04ee8..e177cfa31a7 100644 --- a/src/libutil/exit.cc +++ b/src/libutil/exit.cc @@ -1,4 +1,4 @@ -#include "exit.hh" +#include "nix/exit.hh" namespace nix { diff --git a/src/libutil/experimental-features.cc b/src/libutil/experimental-features.cc index 158e202d15c..c05c3e9ec35 100644 --- a/src/libutil/experimental-features.cc +++ b/src/libutil/experimental-features.cc @@ -1,8 +1,8 @@ -#include "experimental-features.hh" -#include "fmt.hh" -#include "util.hh" +#include "nix/experimental-features.hh" +#include "nix/fmt.hh" +#include "nix/util.hh" -#include "nlohmann/json.hpp" +#include namespace nix { diff --git a/src/libutil/file-content-address.cc b/src/libutil/file-content-address.cc index 69301d9c8f4..71eb34611ab 100644 --- a/src/libutil/file-content-address.cc +++ b/src/libutil/file-content-address.cc @@ -1,7 +1,7 @@ -#include "file-content-address.hh" -#include "archive.hh" -#include "git.hh" -#include "source-path.hh" +#include "nix/file-content-address.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libutil/file-descriptor.cc b/src/libutil/file-descriptor.cc index 707c0f8823b..2af1364b165 100644 --- a/src/libutil/file-descriptor.cc +++ b/src/libutil/file-descriptor.cc @@ -1,12 +1,12 @@ -#include "serialise.hh" -#include "util.hh" +#include "nix/serialise.hh" +#include "nix/util.hh" #include #include #ifdef _WIN32 # include # include -# include "windows-error.hh" +# include "nix/windows-error.hh" #endif namespace nix { diff --git a/src/libutil/file-system.cc b/src/libutil/file-system.cc index 6fe93b63a59..d93e8798e43 100644 --- a/src/libutil/file-system.cc +++ b/src/libutil/file-system.cc @@ -1,11 +1,11 @@ -#include "environment-variables.hh" -#include "file-system.hh" -#include "file-path.hh" -#include "file-path-impl.hh" -#include "signals.hh" -#include "finally.hh" -#include "serialise.hh" -#include "util.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" +#include "nix/file-path.hh" +#include "nix/file-path-impl.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/util.hh" #include #include @@ -25,7 +25,7 @@ # include #endif -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix { diff --git a/src/libutil/fs-sink.cc b/src/libutil/fs-sink.cc index fadba5972da..5e7c2e9fd73 100644 --- a/src/libutil/fs-sink.cc +++ b/src/libutil/fs-sink.cc @@ -1,13 +1,13 @@ #include -#include "error.hh" -#include "config-global.hh" -#include "fs-sink.hh" +#include "nix/error.hh" +#include "nix/config-global.hh" +#include "nix/fs-sink.hh" #if _WIN32 # include -# include "file-path.hh" -# include "windows-error.hh" +# include "nix/file-path.hh" +# include "nix/windows-error.hh" #endif namespace nix { diff --git a/src/libutil/git.cc b/src/libutil/git.cc index 3303dbc3241..696f86d0b68 100644 --- a/src/libutil/git.cc +++ b/src/libutil/git.cc @@ -5,12 +5,12 @@ #include #include // for strcasecmp -#include "signals.hh" -#include "config.hh" -#include "hash.hh" +#include "nix/signals.hh" +#include "nix/config.hh" +#include "nix/hash.hh" -#include "git.hh" -#include "serialise.hh" +#include "nix/git.hh" +#include "nix/serialise.hh" namespace nix::git { diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index 6a7a8b0920a..22eca6014e4 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -6,11 +6,11 @@ #include #include -#include "args.hh" -#include "hash.hh" -#include "archive.hh" -#include "config.hh" -#include "split.hh" +#include "nix/args.hh" +#include "nix/hash.hh" +#include "nix/archive.hh" +#include "nix/config.hh" +#include "nix/split.hh" #include #include diff --git a/src/libutil/hilite.cc b/src/libutil/hilite.cc index e5088230d7c..6d843e091bc 100644 --- a/src/libutil/hilite.cc +++ b/src/libutil/hilite.cc @@ -1,4 +1,4 @@ -#include "hilite.hh" +#include "nix/hilite.hh" namespace nix { diff --git a/src/libutil/json-utils.cc b/src/libutil/json-utils.cc index f67811e2162..aff8abb9ac0 100644 --- a/src/libutil/json-utils.cc +++ b/src/libutil/json-utils.cc @@ -1,6 +1,6 @@ -#include "json-utils.hh" -#include "error.hh" -#include "types.hh" +#include "nix/json-utils.hh" +#include "nix/error.hh" +#include "nix/types.hh" #include #include #include diff --git a/src/libutil/linux/cgroup.cc b/src/libutil/linux/cgroup.cc index ad3e8a0172f..7b3c3fa3b3b 100644 --- a/src/libutil/linux/cgroup.cc +++ b/src/libutil/linux/cgroup.cc @@ -1,8 +1,8 @@ -#include "cgroup.hh" -#include "signals.hh" -#include "util.hh" -#include "file-system.hh" -#include "finally.hh" +#include "nix/cgroup.hh" +#include "nix/signals.hh" +#include "nix/util.hh" +#include "nix/file-system.hh" +#include "nix/finally.hh" #include #include diff --git a/src/libutil/linux/meson.build b/src/libutil/linux/meson.build index a1ded76ca16..0c268e3c52e 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('nix') diff --git a/src/libutil/linux/namespaces.cc b/src/libutil/linux/namespaces.cc index c5e21dffcb3..a53734a2ff1 100644 --- a/src/libutil/linux/namespaces.cc +++ b/src/libutil/linux/namespaces.cc @@ -1,13 +1,13 @@ -#include "current-process.hh" -#include "util.hh" -#include "finally.hh" -#include "file-system.hh" -#include "processes.hh" -#include "signals.hh" +#include "nix/current-process.hh" +#include "nix/util.hh" +#include "nix/finally.hh" +#include "nix/file-system.hh" +#include "nix/processes.hh" +#include "nix/signals.hh" #include #include -#include "cgroup.hh" +#include "nix/cgroup.hh" #include diff --git a/src/libutil/linux/cgroup.hh b/src/libutil/linux/nix/cgroup.hh similarity index 97% rename from src/libutil/linux/cgroup.hh rename to src/libutil/linux/nix/cgroup.hh index 87d135ba629..91c7de9d173 100644 --- a/src/libutil/linux/cgroup.hh +++ b/src/libutil/linux/nix/cgroup.hh @@ -4,7 +4,7 @@ #include #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/linux/nix/meson.build b/src/libutil/linux/nix/meson.build new file mode 100644 index 00000000000..285c1489bd8 --- /dev/null +++ b/src/libutil/linux/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/nix/namespaces.hh similarity index 96% rename from src/libutil/linux/namespaces.hh rename to src/libutil/linux/nix/namespaces.hh index 208920b80b1..3eb5f6a14a8 100644 --- a/src/libutil/linux/namespaces.hh +++ b/src/libutil/linux/nix/namespaces.hh @@ -3,7 +3,7 @@ #include -#include "types.hh" +#include "nix/types.hh" namespace nix { diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index deeae120aad..297223e378b 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -1,11 +1,11 @@ -#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 "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 #include diff --git a/src/libutil/memory-source-accessor.cc b/src/libutil/memory-source-accessor.cc index c4eee1031cf..7c8414fb08c 100644 --- a/src/libutil/memory-source-accessor.cc +++ b/src/libutil/memory-source-accessor.cc @@ -1,4 +1,4 @@ -#include "memory-source-accessor.hh" +#include "nix/memory-source-accessor.hh" namespace nix { diff --git a/src/libutil/meson.build b/src/libutil/meson.build index df459f0e57f..a61d3e8f009 100644 --- a/src/libutil/meson.build +++ b/src/libutil/meson.build @@ -114,15 +114,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', ) @@ -175,89 +170,13 @@ sources = files( 'xml-writer.cc', ) -include_dirs = [include_directories('.')] +subdir('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', - 'position.hh', - 'posix-source-accessor.hh', - 'processes.hh', - 'ref.hh', - 'references.hh', - 'regex-combinators.hh', - 'repair-flag.hh', - 'serialise.hh', - 'signals.hh', - 'signature/local-keys.hh', - 'signature/signer.hh', - 'source-accessor.hh', - 'source-path.hh', - 'split.hh', - 'std-hash.hh', - 'strings.hh', - 'strings-inline.hh', - 'suggestions.hh', - 'sync.hh', - 'tarfile.hh', - 'terminal.hh', - 'thread-pool.hh', - 'topo-sort.hh', - 'types.hh', - 'unix-domain-socket.hh', - 'url-parts.hh', - 'url.hh', - 'users.hh', - 'util.hh', - 'variant-wrapper.hh', - 'xml-writer.hh', -) - if host_machine.system() == 'linux' subdir('linux') endif diff --git a/src/libutil/mounted-source-accessor.cc b/src/libutil/mounted-source-accessor.cc index 79223d15573..aa00cbd8e74 100644 --- a/src/libutil/mounted-source-accessor.cc +++ b/src/libutil/mounted-source-accessor.cc @@ -1,4 +1,4 @@ -#include "source-accessor.hh" +#include "nix/source-accessor.hh" namespace nix { diff --git a/src/libutil/abstract-setting-to-json.hh b/src/libutil/nix/abstract-setting-to-json.hh similarity index 87% rename from src/libutil/abstract-setting-to-json.hh rename to src/libutil/nix/abstract-setting-to-json.hh index eea687d8a4a..313b18fafb2 100644 --- a/src/libutil/abstract-setting-to-json.hh +++ b/src/libutil/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/nix/ansicolor.hh similarity index 100% rename from src/libutil/ansicolor.hh rename to src/libutil/nix/ansicolor.hh diff --git a/src/libutil/archive.hh b/src/libutil/nix/archive.hh similarity index 96% rename from src/libutil/archive.hh rename to src/libutil/nix/archive.hh index c38fa8a46bd..9131f49fa2b 100644 --- a/src/libutil/archive.hh +++ b/src/libutil/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/nix/args.hh similarity index 99% rename from src/libutil/args.hh rename to src/libutil/nix/args.hh index c30d6cef8d7..987d14f9e21 100644 --- a/src/libutil/args.hh +++ b/src/libutil/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/nix/args/root.hh similarity index 98% rename from src/libutil/args/root.hh rename to src/libutil/nix/args/root.hh index 34a43b53835..bb83b85a50c 100644 --- a/src/libutil/args/root.hh +++ b/src/libutil/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/nix/callback.hh similarity index 100% rename from src/libutil/callback.hh rename to src/libutil/nix/callback.hh diff --git a/src/libutil/canon-path.hh b/src/libutil/nix/canon-path.hh similarity index 100% rename from src/libutil/canon-path.hh rename to src/libutil/nix/canon-path.hh diff --git a/src/libutil/checked-arithmetic.hh b/src/libutil/nix/checked-arithmetic.hh similarity index 100% rename from src/libutil/checked-arithmetic.hh rename to src/libutil/nix/checked-arithmetic.hh diff --git a/src/libutil/chunked-vector.hh b/src/libutil/nix/chunked-vector.hh similarity index 98% rename from src/libutil/chunked-vector.hh rename to src/libutil/nix/chunked-vector.hh index 4709679a62a..34d5bbb1da5 100644 --- a/src/libutil/chunked-vector.hh +++ b/src/libutil/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/nix/closure.hh similarity index 98% rename from src/libutil/closure.hh rename to src/libutil/nix/closure.hh index 16e3b93e488..c8fc7c9a4d7 100644 --- a/src/libutil/closure.hh +++ b/src/libutil/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/nix/comparator.hh similarity index 100% rename from src/libutil/comparator.hh rename to src/libutil/nix/comparator.hh diff --git a/src/libutil/compression.hh b/src/libutil/nix/compression.hh similarity index 90% rename from src/libutil/compression.hh rename to src/libutil/nix/compression.hh index e0c531b1f38..25f479e48fb 100644 --- a/src/libutil/compression.hh +++ b/src/libutil/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/nix/compute-levels.hh similarity index 74% rename from src/libutil/compute-levels.hh rename to src/libutil/nix/compute-levels.hh index 093e7a915a4..d77eece931f 100644 --- a/src/libutil/compute-levels.hh +++ b/src/libutil/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/nix/config-global.hh similarity index 96% rename from src/libutil/config-global.hh rename to src/libutil/nix/config-global.hh index 2caf515240d..b0e8ad2ce6a 100644 --- a/src/libutil/config-global.hh +++ b/src/libutil/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/nix/config-impl.hh similarity index 98% rename from src/libutil/config-impl.hh rename to src/libutil/nix/config-impl.hh index 94c2cb2e4b8..b02e27f50f9 100644 --- a/src/libutil/config-impl.hh +++ b/src/libutil/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/nix/config.hh similarity index 99% rename from src/libutil/config.hh rename to src/libutil/nix/config.hh index 502d2823e94..f4135af64cc 100644 --- a/src/libutil/config.hh +++ b/src/libutil/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/nix/current-process.hh similarity index 97% rename from src/libutil/current-process.hh rename to src/libutil/nix/current-process.hh index 660dcfe0ba3..d98f4e75201 100644 --- a/src/libutil/current-process.hh +++ b/src/libutil/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/nix/english.hh similarity index 100% rename from src/libutil/english.hh rename to src/libutil/nix/english.hh diff --git a/src/libutil/environment-variables.hh b/src/libutil/nix/environment-variables.hh similarity index 96% rename from src/libutil/environment-variables.hh rename to src/libutil/nix/environment-variables.hh index 1a95f5c97e7..9a5f364a3f0 100644 --- a/src/libutil/environment-variables.hh +++ b/src/libutil/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/nix/error.hh similarity index 99% rename from src/libutil/error.hh rename to src/libutil/nix/error.hh index 58d9026222f..4a7b291e567 100644 --- a/src/libutil/error.hh +++ b/src/libutil/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/nix/exec.hh similarity index 91% rename from src/libutil/exec.hh rename to src/libutil/nix/exec.hh index cbbe80c4e9b..dc14691e27c 100644 --- a/src/libutil/exec.hh +++ b/src/libutil/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/nix/executable-path.hh similarity index 98% rename from src/libutil/executable-path.hh rename to src/libutil/nix/executable-path.hh index c5cfa1c3918..3af4a24cf17 100644 --- a/src/libutil/executable-path.hh +++ b/src/libutil/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/nix/exit.hh similarity index 100% rename from src/libutil/exit.hh rename to src/libutil/nix/exit.hh diff --git a/src/libutil/experimental-features.hh b/src/libutil/nix/experimental-features.hh similarity index 98% rename from src/libutil/experimental-features.hh rename to src/libutil/nix/experimental-features.hh index 1d02ba94d2c..946bb65b32f 100644 --- a/src/libutil/experimental-features.hh +++ b/src/libutil/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/nix/file-content-address.hh similarity index 99% rename from src/libutil/file-content-address.hh rename to src/libutil/nix/file-content-address.hh index 226068387d6..c56debd2b10 100644 --- a/src/libutil/file-content-address.hh +++ b/src/libutil/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/nix/file-descriptor.hh similarity index 98% rename from src/libutil/file-descriptor.hh rename to src/libutil/nix/file-descriptor.hh index fde36299975..785756a0f74 100644 --- a/src/libutil/file-descriptor.hh +++ b/src/libutil/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/nix/file-path-impl.hh similarity index 100% rename from src/libutil/file-path-impl.hh rename to src/libutil/nix/file-path-impl.hh diff --git a/src/libutil/file-path.hh b/src/libutil/nix/file-path.hh similarity index 94% rename from src/libutil/file-path.hh rename to src/libutil/nix/file-path.hh index 8e4a88b9d56..15bceac1311 100644 --- a/src/libutil/file-path.hh +++ b/src/libutil/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/nix/file-system.hh similarity index 98% rename from src/libutil/file-system.hh rename to src/libutil/nix/file-system.hh index 2049073391d..265d4c39852 100644 --- a/src/libutil/file-system.hh +++ b/src/libutil/nix/file-system.hh @@ -5,11 +5,11 @@ * Utiltities for working with the file sytem 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/nix/finally.hh similarity index 100% rename from src/libutil/finally.hh rename to src/libutil/nix/finally.hh diff --git a/src/libutil/fmt.hh b/src/libutil/nix/fmt.hh similarity index 99% rename from src/libutil/fmt.hh rename to src/libutil/nix/fmt.hh index 850b7162d87..45d9f43b7df 100644 --- a/src/libutil/fmt.hh +++ b/src/libutil/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/nix/fs-sink.hh similarity index 97% rename from src/libutil/fs-sink.hh rename to src/libutil/nix/fs-sink.hh index 5c5073731f6..30803e63ed2 100644 --- a/src/libutil/fs-sink.hh +++ b/src/libutil/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/nix/git.hh similarity index 97% rename from src/libutil/git.hh rename to src/libutil/nix/git.hh index 1a6a7c3331b..2dc1bb79686 100644 --- a/src/libutil/git.hh +++ b/src/libutil/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/nix/hash.hh similarity index 98% rename from src/libutil/hash.hh rename to src/libutil/nix/hash.hh index 13d526f42cf..3c9adebac1e 100644 --- a/src/libutil/hash.hh +++ b/src/libutil/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/nix/hilite.hh similarity index 100% rename from src/libutil/hilite.hh rename to src/libutil/nix/hilite.hh diff --git a/src/libutil/json-impls.hh b/src/libutil/nix/json-impls.hh similarity index 95% rename from src/libutil/json-impls.hh rename to src/libutil/nix/json-impls.hh index b26163a04ae..9dd344c508d 100644 --- a/src/libutil/json-impls.hh +++ b/src/libutil/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/nix/json-utils.hh similarity index 99% rename from src/libutil/json-utils.hh rename to src/libutil/nix/json-utils.hh index 1afc5d796f4..96ffcd3c018 100644 --- a/src/libutil/json-utils.hh +++ b/src/libutil/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/nix/logging.hh similarity index 98% rename from src/libutil/logging.hh rename to src/libutil/nix/logging.hh index 47428389454..94a0857a369 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/nix/logging.hh @@ -1,9 +1,9 @@ #pragma once ///@file -#include "error.hh" -#include "config.hh" -#include "file-descriptor.hh" +#include "nix/error.hh" +#include "nix/config.hh" +#include "nix/file-descriptor.hh" #include diff --git a/src/libutil/lru-cache.hh b/src/libutil/nix/lru-cache.hh similarity index 100% rename from src/libutil/lru-cache.hh rename to src/libutil/nix/lru-cache.hh diff --git a/src/libutil/memory-source-accessor.hh b/src/libutil/nix/memory-source-accessor.hh similarity index 97% rename from src/libutil/memory-source-accessor.hh rename to src/libutil/nix/memory-source-accessor.hh index 012a388c0e7..08ab3f2d496 100644 --- a/src/libutil/memory-source-accessor.hh +++ b/src/libutil/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/nix/meson.build b/src/libutil/nix/meson.build new file mode 100644 index 00000000000..e4a2d263a66 --- /dev/null +++ b/src/libutil/nix/meson.build @@ -0,0 +1,85 @@ +# 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', + '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/nix/muxable-pipe.hh similarity index 94% rename from src/libutil/muxable-pipe.hh rename to src/libutil/nix/muxable-pipe.hh index 53ac39170f1..e4d6a74a370 100644 --- a/src/libutil/muxable-pipe.hh +++ b/src/libutil/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/nix/os-string.hh similarity index 100% rename from src/libutil/os-string.hh rename to src/libutil/nix/os-string.hh diff --git a/src/libutil/pool.hh b/src/libutil/nix/pool.hh similarity index 99% rename from src/libutil/pool.hh rename to src/libutil/nix/pool.hh index b2ceb714342..65b789ba052 100644 --- a/src/libutil/pool.hh +++ b/src/libutil/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/position.hh b/src/libutil/nix/position.hh similarity index 99% rename from src/libutil/position.hh rename to src/libutil/nix/position.hh index 25217069c14..a7a76bae1c9 100644 --- a/src/libutil/position.hh +++ b/src/libutil/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/nix/posix-source-accessor.hh similarity index 98% rename from src/libutil/posix-source-accessor.hh rename to src/libutil/nix/posix-source-accessor.hh index 5d491e633ce..d81e9246c4d 100644 --- a/src/libutil/posix-source-accessor.hh +++ b/src/libutil/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/nix/processes.hh similarity index 95% rename from src/libutil/processes.hh rename to src/libutil/nix/processes.hh index bbbe7dcabd3..80ea14223a5 100644 --- a/src/libutil/processes.hh +++ b/src/libutil/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/nix/ref.hh similarity index 100% rename from src/libutil/ref.hh rename to src/libutil/nix/ref.hh diff --git a/src/libutil/references.hh b/src/libutil/nix/references.hh similarity index 97% rename from src/libutil/references.hh rename to src/libutil/nix/references.hh index 8bc9f7ec9d6..b608f701574 100644 --- a/src/libutil/references.hh +++ b/src/libutil/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/nix/regex-combinators.hh similarity index 100% rename from src/libutil/regex-combinators.hh rename to src/libutil/nix/regex-combinators.hh diff --git a/src/libutil/repair-flag.hh b/src/libutil/nix/repair-flag.hh similarity index 100% rename from src/libutil/repair-flag.hh rename to src/libutil/nix/repair-flag.hh diff --git a/src/libutil/serialise.hh b/src/libutil/nix/serialise.hh similarity index 99% rename from src/libutil/serialise.hh rename to src/libutil/nix/serialise.hh index 14721d0693e..ef49a43b65c 100644 --- a/src/libutil/serialise.hh +++ b/src/libutil/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/nix/signals.hh similarity index 90% rename from src/libutil/signals.hh rename to src/libutil/nix/signals.hh index 8bff345c357..b4953525e8d 100644 --- a/src/libutil/signals.hh +++ b/src/libutil/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/nix/signature/local-keys.hh similarity index 99% rename from src/libutil/signature/local-keys.hh rename to src/libutil/nix/signature/local-keys.hh index 9977f0dac6e..368976b111e 100644 --- a/src/libutil/signature/local-keys.hh +++ b/src/libutil/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/nix/signature/signer.hh similarity index 94% rename from src/libutil/signature/signer.hh rename to src/libutil/nix/signature/signer.hh index e50170fe29c..3eeb75608e1 100644 --- a/src/libutil/signature/signer.hh +++ b/src/libutil/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/nix/source-accessor.hh similarity index 98% rename from src/libutil/source-accessor.hh rename to src/libutil/nix/source-accessor.hh index 79ae092ac18..5efc177fca9 100644 --- a/src/libutil/source-accessor.hh +++ b/src/libutil/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/nix/source-path.hh similarity index 96% rename from src/libutil/source-path.hh rename to src/libutil/nix/source-path.hh index fc2288f747a..119a67016ee 100644 --- a/src/libutil/source-path.hh +++ b/src/libutil/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/nix/split.hh similarity index 97% rename from src/libutil/split.hh rename to src/libutil/nix/split.hh index 3b9b2b83b81..2d7c490b11a 100644 --- a/src/libutil/split.hh +++ b/src/libutil/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/nix/std-hash.hh similarity index 100% rename from src/libutil/std-hash.hh rename to src/libutil/nix/std-hash.hh diff --git a/src/libutil/strings-inline.hh b/src/libutil/nix/strings-inline.hh similarity index 99% rename from src/libutil/strings-inline.hh rename to src/libutil/nix/strings-inline.hh index 25b8e0ff67e..38cf285e08c 100644 --- a/src/libutil/strings-inline.hh +++ b/src/libutil/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/nix/strings.hh similarity index 100% rename from src/libutil/strings.hh rename to src/libutil/nix/strings.hh diff --git a/src/libutil/suggestions.hh b/src/libutil/nix/suggestions.hh similarity index 98% rename from src/libutil/suggestions.hh rename to src/libutil/nix/suggestions.hh index e39ab400c0d..5517c20a610 100644 --- a/src/libutil/suggestions.hh +++ b/src/libutil/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/nix/sync.hh similarity index 99% rename from src/libutil/sync.hh rename to src/libutil/nix/sync.hh index d340f3d9760..25c062ac848 100644 --- a/src/libutil/sync.hh +++ b/src/libutil/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/nix/tarfile.hh similarity index 96% rename from src/libutil/tarfile.hh rename to src/libutil/nix/tarfile.hh index 5e29c6bbac3..aea91f90eff 100644 --- a/src/libutil/tarfile.hh +++ b/src/libutil/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/nix/terminal.hh similarity index 100% rename from src/libutil/terminal.hh rename to src/libutil/nix/terminal.hh diff --git a/src/libutil/thread-pool.hh b/src/libutil/nix/thread-pool.hh similarity index 98% rename from src/libutil/thread-pool.hh rename to src/libutil/nix/thread-pool.hh index 4adc4865760..e3b2a29b96f 100644 --- a/src/libutil/thread-pool.hh +++ b/src/libutil/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/nix/topo-sort.hh similarity index 97% rename from src/libutil/topo-sort.hh rename to src/libutil/nix/topo-sort.hh index a52811fbf41..ed37ca01e8b 100644 --- a/src/libutil/topo-sort.hh +++ b/src/libutil/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/nix/types.hh similarity index 100% rename from src/libutil/types.hh rename to src/libutil/nix/types.hh diff --git a/src/libutil/unix-domain-socket.hh b/src/libutil/nix/unix-domain-socket.hh similarity index 95% rename from src/libutil/unix-domain-socket.hh rename to src/libutil/nix/unix-domain-socket.hh index ba2baeb1334..87508f9e4a6 100644 --- a/src/libutil/unix-domain-socket.hh +++ b/src/libutil/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/nix/url-parts.hh similarity index 100% rename from src/libutil/url-parts.hh rename to src/libutil/nix/url-parts.hh diff --git a/src/libutil/url.hh b/src/libutil/nix/url.hh similarity index 98% rename from src/libutil/url.hh rename to src/libutil/nix/url.hh index 2b12f5af2a0..071d5092fef 100644 --- a/src/libutil/url.hh +++ b/src/libutil/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/nix/users.hh similarity index 98% rename from src/libutil/users.hh rename to src/libutil/nix/users.hh index d22c3311d99..d48b8b9bf76 100644 --- a/src/libutil/users.hh +++ b/src/libutil/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/nix/util.hh similarity index 98% rename from src/libutil/util.hh rename to src/libutil/nix/util.hh index 0d55cf93bed..7ece2bd7b76 100644 --- a/src/libutil/util.hh +++ b/src/libutil/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/nix/variant-wrapper.hh similarity index 100% rename from src/libutil/variant-wrapper.hh rename to src/libutil/nix/variant-wrapper.hh diff --git a/src/libutil/xml-writer.hh b/src/libutil/nix/xml-writer.hh similarity index 100% rename from src/libutil/xml-writer.hh rename to src/libutil/nix/xml-writer.hh diff --git a/src/libutil/position.cc b/src/libutil/position.cc index 946f167b611..78d43bb1f86 100644 --- a/src/libutil/position.cc +++ b/src/libutil/position.cc @@ -1,4 +1,4 @@ -#include "position.hh" +#include "nix/position.hh" namespace nix { diff --git a/src/libutil/posix-source-accessor.cc b/src/libutil/posix-source-accessor.cc index 70ad6474fd6..5da9fa6237f 100644 --- a/src/libutil/posix-source-accessor.cc +++ b/src/libutil/posix-source-accessor.cc @@ -1,7 +1,7 @@ -#include "posix-source-accessor.hh" -#include "source-path.hh" -#include "signals.hh" -#include "sync.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/source-path.hh" +#include "nix/signals.hh" +#include "nix/sync.hh" #include diff --git a/src/libutil/references.cc b/src/libutil/references.cc index b30e62c7b2b..46c22c09cda 100644 --- a/src/libutil/references.cc +++ b/src/libutil/references.cc @@ -1,6 +1,6 @@ -#include "references.hh" -#include "hash.hh" -#include "archive.hh" +#include "nix/references.hh" +#include "nix/hash.hh" +#include "nix/archive.hh" #include #include diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc index d612c11b2d7..415ccf3a0d0 100644 --- a/src/libutil/serialise.cc +++ b/src/libutil/serialise.cc @@ -1,6 +1,6 @@ -#include "serialise.hh" -#include "signals.hh" -#include "util.hh" +#include "nix/serialise.hh" +#include "nix/signals.hh" +#include "nix/util.hh" #include #include @@ -11,7 +11,7 @@ #ifdef _WIN32 # include # include -# include "windows-error.hh" +# include "nix/windows-error.hh" #else # include #endif diff --git a/src/libutil/signature/local-keys.cc b/src/libutil/signature/local-keys.cc index 70bcb5f33c2..86d3dfe3c24 100644 --- a/src/libutil/signature/local-keys.cc +++ b/src/libutil/signature/local-keys.cc @@ -1,7 +1,7 @@ -#include "signature/local-keys.hh" +#include "nix/signature/local-keys.hh" -#include "file-system.hh" -#include "util.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" #include namespace nix { diff --git a/src/libutil/signature/signer.cc b/src/libutil/signature/signer.cc index 0d26867b54a..4a61b67ebb6 100644 --- a/src/libutil/signature/signer.cc +++ b/src/libutil/signature/signer.cc @@ -1,5 +1,5 @@ -#include "signature/signer.hh" -#include "error.hh" +#include "nix/signature/signer.hh" +#include "nix/error.hh" #include diff --git a/src/libutil/source-accessor.cc b/src/libutil/source-accessor.cc index 78f038cf377..738d7f2f195 100644 --- a/src/libutil/source-accessor.cc +++ b/src/libutil/source-accessor.cc @@ -1,5 +1,5 @@ -#include "source-accessor.hh" -#include "archive.hh" +#include "nix/source-accessor.hh" +#include "nix/archive.hh" namespace nix { diff --git a/src/libutil/source-path.cc b/src/libutil/source-path.cc index 759d3c35579..12150c22398 100644 --- a/src/libutil/source-path.cc +++ b/src/libutil/source-path.cc @@ -1,4 +1,4 @@ -#include "source-path.hh" +#include "nix/source-path.hh" namespace nix { diff --git a/src/libutil/strings.cc b/src/libutil/strings.cc index 402b7ae98a3..adf6d0bba27 100644 --- a/src/libutil/strings.cc +++ b/src/libutil/strings.cc @@ -2,9 +2,9 @@ #include #include -#include "strings-inline.hh" -#include "os-string.hh" -#include "error.hh" +#include "nix/strings-inline.hh" +#include "nix/os-string.hh" +#include "nix/error.hh" namespace nix { diff --git a/src/libutil/suggestions.cc b/src/libutil/suggestions.cc index 84c8e296f17..0f593ada0c7 100644 --- a/src/libutil/suggestions.cc +++ b/src/libutil/suggestions.cc @@ -1,6 +1,6 @@ -#include "suggestions.hh" -#include "ansicolor.hh" -#include "terminal.hh" +#include "nix/suggestions.hh" +#include "nix/ansicolor.hh" +#include "nix/terminal.hh" #include #include diff --git a/src/libutil/tarfile.cc b/src/libutil/tarfile.cc index e412930bb67..fd7413a40b7 100644 --- a/src/libutil/tarfile.cc +++ b/src/libutil/tarfile.cc @@ -1,10 +1,10 @@ #include #include -#include "finally.hh" -#include "serialise.hh" -#include "tarfile.hh" -#include "file-system.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/tarfile.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/terminal.cc b/src/libutil/terminal.cc index 8a8373f1bf9..233edabb48d 100644 --- a/src/libutil/terminal.cc +++ b/src/libutil/terminal.cc @@ -1,6 +1,6 @@ -#include "terminal.hh" -#include "environment-variables.hh" -#include "sync.hh" +#include "nix/terminal.hh" +#include "nix/environment-variables.hh" +#include "nix/sync.hh" #if _WIN32 # include diff --git a/src/libutil/thread-pool.cc b/src/libutil/thread-pool.cc index 0725c192685..6b7f2d01771 100644 --- a/src/libutil/thread-pool.cc +++ b/src/libutil/thread-pool.cc @@ -1,6 +1,6 @@ -#include "thread-pool.hh" -#include "signals.hh" -#include "util.hh" +#include "nix/thread-pool.hh" +#include "nix/signals.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/union-source-accessor.cc b/src/libutil/union-source-accessor.cc index eec0850c249..e24d6f2bd5b 100644 --- a/src/libutil/union-source-accessor.cc +++ b/src/libutil/union-source-accessor.cc @@ -1,4 +1,4 @@ -#include "source-accessor.hh" +#include "nix/source-accessor.hh" namespace nix { diff --git a/src/libutil/unix-domain-socket.cc b/src/libutil/unix-domain-socket.cc index 1707fdb75e1..831dd666c9f 100644 --- a/src/libutil/unix-domain-socket.cc +++ b/src/libutil/unix-domain-socket.cc @@ -1,6 +1,6 @@ -#include "file-system.hh" -#include "unix-domain-socket.hh" -#include "util.hh" +#include "nix/file-system.hh" +#include "nix/unix-domain-socket.hh" +#include "nix/util.hh" #ifdef _WIN32 # include @@ -8,7 +8,7 @@ #else # include # include -# include "processes.hh" +# include "nix/processes.hh" #endif #include diff --git a/src/libutil/unix/environment-variables.cc b/src/libutil/unix/environment-variables.cc index cd7c8f5e566..9814cbcc28f 100644 --- a/src/libutil/unix/environment-variables.cc +++ b/src/libutil/unix/environment-variables.cc @@ -1,6 +1,6 @@ #include -#include "environment-variables.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/libutil/unix/file-descriptor.cc b/src/libutil/unix/file-descriptor.cc index ac7c086af80..672324a70d8 100644 --- a/src/libutil/unix/file-descriptor.cc +++ b/src/libutil/unix/file-descriptor.cc @@ -1,7 +1,7 @@ -#include "file-system.hh" -#include "signals.hh" -#include "finally.hh" -#include "serialise.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" #include #include diff --git a/src/libutil/unix/file-path.cc b/src/libutil/unix/file-path.cc index cccee86a1d7..3dd61397225 100644 --- a/src/libutil/unix/file-path.cc +++ b/src/libutil/unix/file-path.cc @@ -3,8 +3,8 @@ #include #include -#include "file-path.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/unix/file-system.cc b/src/libutil/unix/file-system.cc index bbbbfa5597c..119e8a27727 100644 --- a/src/libutil/unix/file-system.cc +++ b/src/libutil/unix/file-system.cc @@ -1,4 +1,4 @@ -#include "file-system.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/unix/meson.build b/src/libutil/unix/meson.build index 1c5bf27fb14..5debe97b194 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('nix') diff --git a/src/libutil/unix/muxable-pipe.cc b/src/libutil/unix/muxable-pipe.cc index 0104663c3bf..e81f47bc09d 100644 --- a/src/libutil/unix/muxable-pipe.cc +++ b/src/libutil/unix/muxable-pipe.cc @@ -1,8 +1,8 @@ #include -#include "logging.hh" -#include "util.hh" -#include "muxable-pipe.hh" +#include "nix/logging.hh" +#include "nix/util.hh" +#include "nix/muxable-pipe.hh" namespace nix { diff --git a/src/libutil/unix/nix/meson.build b/src/libutil/unix/nix/meson.build new file mode 100644 index 00000000000..5f3095ab117 --- /dev/null +++ b/src/libutil/unix/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/nix/monitor-fd.hh similarity index 98% rename from src/libutil/unix/monitor-fd.hh rename to src/libutil/unix/nix/monitor-fd.hh index b6610feff98..77b3bcd961f 100644 --- a/src/libutil/unix/monitor-fd.hh +++ b/src/libutil/unix/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/nix/signals-impl.hh similarity index 95% rename from src/libutil/unix/signals-impl.hh rename to src/libutil/unix/nix/signals-impl.hh index 037416e7d6b..a63e0372599 100644 --- a/src/libutil/unix/signals-impl.hh +++ b/src/libutil/unix/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/os-string.cc b/src/libutil/unix/os-string.cc index 8378afde292..e97308a4a4c 100644 --- a/src/libutil/unix/os-string.cc +++ b/src/libutil/unix/os-string.cc @@ -3,8 +3,8 @@ #include #include -#include "file-path.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/unix/processes.cc b/src/libutil/unix/processes.cc index a9df1be603e..e55c2d6dd71 100644 --- a/src/libutil/unix/processes.cc +++ b/src/libutil/unix/processes.cc @@ -1,10 +1,10 @@ -#include "current-process.hh" -#include "environment-variables.hh" -#include "executable-path.hh" -#include "signals.hh" -#include "processes.hh" -#include "finally.hh" -#include "serialise.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" +#include "nix/executable-path.hh" +#include "nix/signals.hh" +#include "nix/processes.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" #include #include diff --git a/src/libutil/unix/signals.cc b/src/libutil/unix/signals.cc index d0608dace67..168b33bfb90 100644 --- a/src/libutil/unix/signals.cc +++ b/src/libutil/unix/signals.cc @@ -1,8 +1,8 @@ -#include "signals.hh" -#include "util.hh" -#include "error.hh" -#include "sync.hh" -#include "terminal.hh" +#include "nix/signals.hh" +#include "nix/util.hh" +#include "nix/error.hh" +#include "nix/sync.hh" +#include "nix/terminal.hh" #include diff --git a/src/libutil/unix/users.cc b/src/libutil/unix/users.cc index 107a6e04f98..1ba194d7185 100644 --- a/src/libutil/unix/users.cc +++ b/src/libutil/unix/users.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "users.hh" -#include "environment-variables.hh" -#include "file-system.hh" +#include "nix/util.hh" +#include "nix/users.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" #include #include diff --git a/src/libutil/url.cc b/src/libutil/url.cc index 8fb1eecfb6c..f042d3b0f59 100644 --- a/src/libutil/url.cc +++ b/src/libutil/url.cc @@ -1,8 +1,8 @@ -#include "url.hh" -#include "url-parts.hh" -#include "util.hh" -#include "split.hh" -#include "canon-path.hh" +#include "nix/url.hh" +#include "nix/url-parts.hh" +#include "nix/util.hh" +#include "nix/split.hh" +#include "nix/canon-path.hh" namespace nix { diff --git a/src/libutil/users.cc b/src/libutil/users.cc index b4bc67cbcf2..d4fb08ab569 100644 --- a/src/libutil/users.cc +++ b/src/libutil/users.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "users.hh" -#include "environment-variables.hh" -#include "file-system.hh" +#include "nix/util.hh" +#include "nix/users.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" namespace nix { diff --git a/src/libutil/util.cc b/src/libutil/util.cc index ed5c7e4f1ef..37f30d91f26 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1,7 +1,7 @@ -#include "util.hh" -#include "fmt.hh" -#include "file-path.hh" -#include "signals.hh" +#include "nix/util.hh" +#include "nix/fmt.hh" +#include "nix/file-path.hh" +#include "nix/signals.hh" #include #include diff --git a/src/libutil/windows/environment-variables.cc b/src/libutil/windows/environment-variables.cc index d1093597cfb..99095fa6ac3 100644 --- a/src/libutil/windows/environment-variables.cc +++ b/src/libutil/windows/environment-variables.cc @@ -1,7 +1,7 @@ -#include "environment-variables.hh" +#include "nix/environment-variables.hh" #ifdef _WIN32 -# include "processenv.h" +# include "nix/processenv.h" namespace nix { diff --git a/src/libutil/windows/file-descriptor.cc b/src/libutil/windows/file-descriptor.cc index e2a473a7cce..7f77cae89f6 100644 --- a/src/libutil/windows/file-descriptor.cc +++ b/src/libutil/windows/file-descriptor.cc @@ -1,9 +1,9 @@ -#include "file-system.hh" -#include "signals.hh" -#include "finally.hh" -#include "serialise.hh" -#include "windows-error.hh" -#include "file-path.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/windows-error.hh" +#include "nix/file-path.hh" #ifdef _WIN32 #include diff --git a/src/libutil/windows/file-path.cc b/src/libutil/windows/file-path.cc index 7405c426b62..5079bcbcd4e 100644 --- a/src/libutil/windows/file-path.cc +++ b/src/libutil/windows/file-path.cc @@ -3,9 +3,9 @@ #include #include -#include "file-path.hh" -#include "file-path-impl.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/file-path-impl.hh" +#include "nix/util.hh" namespace nix { diff --git a/src/libutil/windows/file-system.cc b/src/libutil/windows/file-system.cc index 7ed1c04a623..22f1f89abb2 100644 --- a/src/libutil/windows/file-system.cc +++ b/src/libutil/windows/file-system.cc @@ -1,4 +1,4 @@ -#include "file-system.hh" +#include "nix/file-system.hh" #ifdef _WIN32 namespace nix { diff --git a/src/libutil/windows/meson.build b/src/libutil/windows/meson.build index 1c645fe0573..776bf502d96 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('nix') diff --git a/src/libutil/windows/muxable-pipe.cc b/src/libutil/windows/muxable-pipe.cc index ac28821202c..d9a3e2ca536 100644 --- a/src/libutil/windows/muxable-pipe.cc +++ b/src/libutil/windows/muxable-pipe.cc @@ -1,10 +1,10 @@ #ifdef _WIN32 # include -# include "windows-error.hh" +# include "nix/windows-error.hh" -# include "logging.hh" -# include "util.hh" -# include "muxable-pipe.hh" +# include "nix/logging.hh" +# include "nix/util.hh" +# include "nix/muxable-pipe.hh" namespace nix { diff --git a/src/libutil/windows/nix/meson.build b/src/libutil/windows/nix/meson.build new file mode 100644 index 00000000000..898b7db8963 --- /dev/null +++ b/src/libutil/windows/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/nix/signals-impl.hh similarity index 95% rename from src/libutil/windows/signals-impl.hh rename to src/libutil/windows/nix/signals-impl.hh index 26d2600bf04..fcdf18276eb 100644 --- a/src/libutil/windows/signals-impl.hh +++ b/src/libutil/windows/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/nix/windows-async-pipe.hh similarity index 93% rename from src/libutil/windows/windows-async-pipe.hh rename to src/libutil/windows/nix/windows-async-pipe.hh index 53715e26010..55f6ea31d0a 100644 --- a/src/libutil/windows/windows-async-pipe.hh +++ b/src/libutil/windows/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/nix/windows-error.hh similarity index 97% rename from src/libutil/windows/windows-error.hh rename to src/libutil/windows/nix/windows-error.hh index 66c67b43a6c..c07d61609a1 100644 --- a/src/libutil/windows/windows-error.hh +++ b/src/libutil/windows/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/os-string.cc b/src/libutil/windows/os-string.cc index b09ef8b90d2..b9aff210bb0 100644 --- a/src/libutil/windows/os-string.cc +++ b/src/libutil/windows/os-string.cc @@ -3,9 +3,9 @@ #include #include -#include "file-path.hh" -#include "file-path-impl.hh" -#include "util.hh" +#include "nix/file-path.hh" +#include "nix/file-path-impl.hh" +#include "nix/util.hh" #ifdef _WIN32 diff --git a/src/libutil/windows/processes.cc b/src/libutil/windows/processes.cc index fd4d7c43a91..186a3458bac 100644 --- a/src/libutil/windows/processes.cc +++ b/src/libutil/windows/processes.cc @@ -1,16 +1,16 @@ -#include "current-process.hh" -#include "environment-variables.hh" -#include "error.hh" -#include "executable-path.hh" -#include "file-descriptor.hh" -#include "file-path.hh" -#include "signals.hh" -#include "processes.hh" -#include "finally.hh" -#include "serialise.hh" -#include "file-system.hh" -#include "util.hh" -#include "windows-error.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" +#include "nix/error.hh" +#include "nix/executable-path.hh" +#include "nix/file-descriptor.hh" +#include "nix/file-path.hh" +#include "nix/signals.hh" +#include "nix/processes.hh" +#include "nix/finally.hh" +#include "nix/serialise.hh" +#include "nix/file-system.hh" +#include "nix/util.hh" +#include "nix/windows-error.hh" #include #include diff --git a/src/libutil/windows/users.cc b/src/libutil/windows/users.cc index 438c4221cf3..1d49e667bab 100644 --- a/src/libutil/windows/users.cc +++ b/src/libutil/windows/users.cc @@ -1,8 +1,8 @@ -#include "util.hh" -#include "users.hh" -#include "environment-variables.hh" -#include "file-system.hh" -#include "windows-error.hh" +#include "nix/util.hh" +#include "nix/users.hh" +#include "nix/environment-variables.hh" +#include "nix/file-system.hh" +#include "nix/windows-error.hh" #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN diff --git a/src/libutil/windows/windows-async-pipe.cc b/src/libutil/windows/windows-async-pipe.cc index 4e139d5cfb9..77ccd9e3f3f 100644 --- a/src/libutil/windows/windows-async-pipe.cc +++ b/src/libutil/windows/windows-async-pipe.cc @@ -1,5 +1,5 @@ -#include "windows-async-pipe.hh" -#include "windows-error.hh" +#include "nix/windows-async-pipe.hh" +#include "nix/windows-error.hh" #ifdef _WIN32 diff --git a/src/libutil/windows/windows-error.cc b/src/libutil/windows/windows-error.cc index b92f9155f97..8c523e4033b 100644 --- a/src/libutil/windows/windows-error.cc +++ b/src/libutil/windows/windows-error.cc @@ -1,4 +1,4 @@ -#include "windows-error.hh" +#include "nix/windows-error.hh" #ifdef _WIN32 #include diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc index 7993bee9af0..78a40ef64b3 100644 --- a/src/libutil/xml-writer.cc +++ b/src/libutil/xml-writer.cc @@ -1,6 +1,6 @@ #include -#include "xml-writer.hh" +#include "nix/xml-writer.hh" namespace nix { diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index a5ae12a12d9..065a3b3e8c0 100644 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -9,25 +9,25 @@ #include -#include "current-process.hh" -#include "parsed-derivations.hh" -#include "derivation-options.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "globals.hh" -#include "realisation.hh" -#include "derivations.hh" -#include "shared.hh" -#include "path-with-outputs.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "get-drvs.hh" -#include "common-eval-args.hh" -#include "attr-path.hh" -#include "legacy.hh" -#include "users.hh" -#include "network-proxy.hh" -#include "compatibility-settings.hh" +#include "nix/current-process.hh" +#include "nix/parsed-derivations.hh" +#include "nix/derivation-options.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/globals.hh" +#include "nix/realisation.hh" +#include "nix/derivations.hh" +#include "nix/shared.hh" +#include "nix/path-with-outputs.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/get-drvs.hh" +#include "nix/common-eval-args.hh" +#include "nix/attr-path.hh" +#include "nix/legacy.hh" +#include "nix/users.hh" +#include "nix/network-proxy.hh" +#include "nix/compatibility-settings.hh" #include "man-pages.hh" using namespace nix; diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc index ee61db99488..33efb891858 100644 --- a/src/nix-channel/nix-channel.cc +++ b/src/nix-channel/nix-channel.cc @@ -1,12 +1,12 @@ -#include "profiles.hh" -#include "shared.hh" -#include "globals.hh" -#include "filetransfer.hh" -#include "store-api.hh" -#include "legacy.hh" -#include "eval-settings.hh" // for defexpr -#include "users.hh" -#include "tarball.hh" +#include "nix/profiles.hh" +#include "nix/shared.hh" +#include "nix/globals.hh" +#include "nix/filetransfer.hh" +#include "nix/store-api.hh" +#include "nix/legacy.hh" +#include "nix/eval-settings.hh" // for defexpr +#include "nix/users.hh" +#include "nix/tarball.hh" #include "self-exe.hh" #include "man-pages.hh" diff --git a/src/nix-collect-garbage/nix-collect-garbage.cc b/src/nix-collect-garbage/nix-collect-garbage.cc index a060a01fd15..c6f996f20fe 100644 --- a/src/nix-collect-garbage/nix-collect-garbage.cc +++ b/src/nix-collect-garbage/nix-collect-garbage.cc @@ -1,12 +1,12 @@ -#include "file-system.hh" -#include "signals.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" -#include "profiles.hh" -#include "shared.hh" -#include "globals.hh" -#include "legacy.hh" +#include "nix/file-system.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" +#include "nix/profiles.hh" +#include "nix/shared.hh" +#include "nix/globals.hh" +#include "nix/legacy.hh" #include "man-pages.hh" #include diff --git a/src/nix-copy-closure/nix-copy-closure.cc b/src/nix-copy-closure/nix-copy-closure.cc index 15bff0a0ad5..8094925dc58 100644 --- a/src/nix-copy-closure/nix-copy-closure.cc +++ b/src/nix-copy-closure/nix-copy-closure.cc @@ -1,7 +1,7 @@ -#include "shared.hh" -#include "realisation.hh" -#include "store-api.hh" -#include "legacy.hh" +#include "nix/shared.hh" +#include "nix/realisation.hh" +#include "nix/store-api.hh" +#include "nix/legacy.hh" #include "man-pages.hh" using namespace nix; diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index aa1edb4c8e3..c02c27d3678 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1,22 +1,22 @@ -#include "users.hh" -#include "attr-path.hh" -#include "common-eval-args.hh" -#include "derivations.hh" -#include "eval.hh" -#include "get-drvs.hh" -#include "globals.hh" -#include "names.hh" -#include "profiles.hh" -#include "path-with-outputs.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/users.hh" +#include "nix/attr-path.hh" +#include "nix/common-eval-args.hh" +#include "nix/derivations.hh" +#include "nix/eval.hh" +#include "nix/get-drvs.hh" +#include "nix/globals.hh" +#include "nix/names.hh" +#include "nix/profiles.hh" +#include "nix/path-with-outputs.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" #include "user-env.hh" -#include "value-to-json.hh" -#include "xml-writer.hh" -#include "legacy.hh" -#include "eval-settings.hh" // for defexpr -#include "terminal.hh" +#include "nix/value-to-json.hh" +#include "nix/xml-writer.hh" +#include "nix/legacy.hh" +#include "nix/eval-settings.hh" // for defexpr +#include "nix/terminal.hh" #include "man-pages.hh" #include diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc index ee62077c0a7..81abefc2fda 100644 --- a/src/nix-env/user-env.cc +++ b/src/nix-env/user-env.cc @@ -1,14 +1,14 @@ #include "user-env.hh" -#include "derivations.hh" -#include "store-api.hh" -#include "path-with-outputs.hh" -#include "local-fs-store.hh" -#include "globals.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "profiles.hh" -#include "print-ambiguous.hh" +#include "nix/derivations.hh" +#include "nix/store-api.hh" +#include "nix/path-with-outputs.hh" +#include "nix/local-fs-store.hh" +#include "nix/globals.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/profiles.hh" +#include "nix/print-ambiguous.hh" #include #include diff --git a/src/nix-env/user-env.hh b/src/nix-env/user-env.hh index 15da3fcb3f0..8ec124d07c6 100644 --- a/src/nix-env/user-env.hh +++ b/src/nix-env/user-env.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "get-drvs.hh" +#include "nix/get-drvs.hh" namespace nix { diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 0cf926369e5..d4765952ba8 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -1,17 +1,17 @@ -#include "globals.hh" -#include "print-ambiguous.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "get-drvs.hh" -#include "attr-path.hh" -#include "signals.hh" -#include "value-to-xml.hh" -#include "value-to-json.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "common-eval-args.hh" -#include "legacy.hh" +#include "nix/globals.hh" +#include "nix/print-ambiguous.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/get-drvs.hh" +#include "nix/attr-path.hh" +#include "nix/signals.hh" +#include "nix/value-to-xml.hh" +#include "nix/value-to-json.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/common-eval-args.hh" +#include "nix/legacy.hh" #include "man-pages.hh" #include diff --git a/src/nix-store/dotgraph.cc b/src/nix-store/dotgraph.cc index 2c530999b55..0cab4665601 100644 --- a/src/nix-store/dotgraph.cc +++ b/src/nix-store/dotgraph.cc @@ -1,5 +1,5 @@ #include "dotgraph.hh" -#include "store-api.hh" +#include "nix/store-api.hh" #include diff --git a/src/nix-store/dotgraph.hh b/src/nix-store/dotgraph.hh index 4fd9440803f..cb4041f8e34 100644 --- a/src/nix-store/dotgraph.hh +++ b/src/nix-store/dotgraph.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/nix-store/graphml.cc b/src/nix-store/graphml.cc index 3e789a2d8b3..1eb2ccdf68c 100644 --- a/src/nix-store/graphml.cc +++ b/src/nix-store/graphml.cc @@ -1,6 +1,6 @@ #include "graphml.hh" -#include "store-api.hh" -#include "derivations.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" #include diff --git a/src/nix-store/graphml.hh b/src/nix-store/graphml.hh index bd3a4a37c46..2989733d775 100644 --- a/src/nix-store/graphml.hh +++ b/src/nix-store/graphml.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index d182b1eee57..7bdf3b1a336 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -1,23 +1,23 @@ -#include "archive.hh" -#include "derivations.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include "dotgraph.hh" -#include "globals.hh" -#include "store-cast.hh" -#include "local-fs-store.hh" -#include "log-store.hh" -#include "serve-protocol.hh" -#include "serve-protocol-connection.hh" -#include "shared.hh" +#include "nix/globals.hh" +#include "nix/store-cast.hh" +#include "nix/local-fs-store.hh" +#include "nix/log-store.hh" +#include "nix/serve-protocol.hh" +#include "nix/serve-protocol-connection.hh" +#include "nix/shared.hh" #include "graphml.hh" -#include "legacy.hh" -#include "posix-source-accessor.hh" -#include "path-with-outputs.hh" +#include "nix/legacy.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/path-with-outputs.hh" #include "man-pages.hh" #ifndef _WIN32 // TODO implement on Windows or provide allowed-to-noop interface -# include "local-store.hh" -# include "monitor-fd.hh" -# include "posix-fs-canonicalise.hh" +# include "nix/local-store.hh" +# include "nix/monitor-fd.hh" +# include "nix/posix-fs-canonicalise.hh" #endif #include @@ -27,9 +27,9 @@ #include #include -#include "build-result.hh" -#include "exit.hh" -#include "serve-protocol-impl.hh" +#include "nix/build-result.hh" +#include "nix/exit.hh" +#include "nix/serve-protocol-impl.hh" namespace nix_store { diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc index 7f15de374eb..6c71dc69fb4 100644 --- a/src/nix/add-to-store.cc +++ b/src/nix/add-to-store.cc @@ -1,10 +1,10 @@ -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "archive.hh" -#include "git.hh" -#include "posix-source-accessor.hh" -#include "misc-store-flags.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/misc-store-flags.hh" using namespace nix; diff --git a/src/nix/app.cc b/src/nix/app.cc index 935ed18ecba..2b6c222697e 100644 --- a/src/nix/app.cc +++ b/src/nix/app.cc @@ -1,13 +1,13 @@ -#include "installables.hh" -#include "installable-derived-path.hh" -#include "installable-value.hh" -#include "store-api.hh" -#include "eval-inline.hh" -#include "eval-cache.hh" -#include "names.hh" -#include "command.hh" -#include "derivations.hh" -#include "downstream-placeholder.hh" +#include "nix/installables.hh" +#include "nix/installable-derived-path.hh" +#include "nix/installable-value.hh" +#include "nix/store-api.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-cache.hh" +#include "nix/names.hh" +#include "nix/command.hh" +#include "nix/derivations.hh" +#include "nix/downstream-placeholder.hh" namespace nix { diff --git a/src/nix/build.cc b/src/nix/build.cc index 3569b0cde2a..409e246b279 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -1,9 +1,9 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "progress-bar.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 "nix/progress-bar.hh" #include diff --git a/src/nix/bundle.cc b/src/nix/bundle.cc index 5b7862c4e0c..61338393933 100644 --- a/src/nix/bundle.cc +++ b/src/nix/bundle.cc @@ -1,10 +1,10 @@ -#include "installable-flake.hh" -#include "command-installable-value.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "eval-inline.hh" +#include "nix/installable-flake.hh" +#include "nix/command-installable-value.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/eval-inline.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/cat.cc b/src/nix/cat.cc index e0179c3486c..1a6c07338a7 100644 --- a/src/nix/cat.cc +++ b/src/nix/cat.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "store-api.hh" -#include "nar-accessor.hh" -#include "progress-bar.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/nar-accessor.hh" +#include "nix/progress-bar.hh" using namespace nix; diff --git a/src/nix/config-check.cc b/src/nix/config-check.cc index a72b0654232..bc23fd7be38 100644 --- a/src/nix/config-check.cc +++ b/src/nix/config-check.cc @@ -1,14 +1,14 @@ #include -#include "command.hh" -#include "exit.hh" -#include "logging.hh" -#include "serve-protocol.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" -#include "worker-protocol.hh" -#include "executable-path.hh" +#include "nix/command.hh" +#include "nix/exit.hh" +#include "nix/logging.hh" +#include "nix/serve-protocol.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" +#include "nix/worker-protocol.hh" +#include "nix/executable-path.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/config.cc b/src/nix/config.cc index 07f975a006a..5d9330f0339 100644 --- a/src/nix/config.cc +++ b/src/nix/config.cc @@ -1,8 +1,8 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "config-global.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/config-global.hh" #include diff --git a/src/nix/copy.cc b/src/nix/copy.cc index 399a6c0fd34..0ed99df53bc 100644 --- a/src/nix/copy.cc +++ b/src/nix/copy.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "local-fs-store.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/local-fs-store.hh" using namespace nix; diff --git a/src/nix/derivation-add.cc b/src/nix/derivation-add.cc index 4d91d453800..da52ac14c05 100644 --- a/src/nix/derivation-add.cc +++ b/src/nix/derivation-add.cc @@ -1,10 +1,10 @@ // FIXME: rename to 'nix plan add' or 'nix derivation add'? -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "archive.hh" -#include "derivations.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include using namespace nix; diff --git a/src/nix/derivation-show.cc b/src/nix/derivation-show.cc index 5a07f58e6dc..daabdb4d674 100644 --- a/src/nix/derivation-show.cc +++ b/src/nix/derivation-show.cc @@ -1,11 +1,11 @@ // FIXME: integrate this with `nix path-info`? // FIXME: rename to 'nix store derivation show'? -#include "command.hh" -#include "common-args.hh" -#include "store-api.hh" -#include "archive.hh" -#include "derivations.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" +#include "nix/derivations.hh" #include using namespace nix; diff --git a/src/nix/derivation.cc b/src/nix/derivation.cc index 59a78d37879..6e0d28d9abf 100644 --- a/src/nix/derivation.cc +++ b/src/nix/derivation.cc @@ -1,4 +1,4 @@ -#include "command.hh" +#include "nix/command.hh" using namespace nix; diff --git a/src/nix/develop.cc b/src/nix/develop.cc index deee89aa1aa..abc47c9983a 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -1,13 +1,13 @@ -#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 "progress-bar.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" +#include "nix/progress-bar.hh" #ifndef _WIN32 // TODO re-enable on Windows # include "run.hh" @@ -19,7 +19,7 @@ #include #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/diff-closures.cc b/src/nix/diff-closures.cc index 2bc7fe82b1b..042da8d3ada 100644 --- a/src/nix/diff-closures.cc +++ b/src/nix/diff-closures.cc @@ -1,12 +1,12 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "common-args.hh" -#include "names.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/common-args.hh" +#include "nix/names.hh" #include -#include "strings.hh" +#include "nix/strings.hh" namespace nix { diff --git a/src/nix/dump-path.cc b/src/nix/dump-path.cc index 98a059fa1bd..bf82de84679 100644 --- a/src/nix/dump-path.cc +++ b/src/nix/dump-path.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "store-api.hh" -#include "archive.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/archive.hh" using namespace nix; diff --git a/src/nix/edit.cc b/src/nix/edit.cc index 9cbab230b0f..396a4ade48e 100644 --- a/src/nix/edit.cc +++ b/src/nix/edit.cc @@ -1,10 +1,10 @@ -#include "current-process.hh" -#include "command-installable-value.hh" -#include "shared.hh" -#include "eval.hh" -#include "attr-path.hh" -#include "progress-bar.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/progress-bar.hh" +#include "nix/editor-for.hh" #include diff --git a/src/nix/env.cc b/src/nix/env.cc index 832320320ae..982120252fa 100644 --- a/src/nix/env.cc +++ b/src/nix/env.cc @@ -1,11 +1,11 @@ #include #include -#include "command.hh" -#include "eval.hh" +#include "nix/command.hh" +#include "nix/eval.hh" #include "run.hh" -#include "strings.hh" -#include "executable-path.hh" +#include "nix/strings.hh" +#include "nix/executable-path.hh" using namespace nix; diff --git a/src/nix/eval.cc b/src/nix/eval.cc index 7811b77edad..f53bec40292 100644 --- a/src/nix/eval.cc +++ b/src/nix/eval.cc @@ -1,11 +1,11 @@ -#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 "progress-bar.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 "nix/progress-bar.hh" #include diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 4615dabaade..d3e8de7f7e8 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -1,30 +1,30 @@ -#include "command.hh" -#include "installable-flake.hh" -#include "common-args.hh" -#include "shared.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "flake/flake.hh" -#include "get-drvs.hh" -#include "signals.hh" -#include "store-api.hh" -#include "derivations.hh" -#include "outputs-spec.hh" -#include "attr-path.hh" -#include "fetchers.hh" -#include "registry.hh" -#include "eval-cache.hh" -#include "markdown.hh" -#include "users.hh" -#include "fetch-to-store.hh" -#include "local-fs-store.hh" +#include "nix/command.hh" +#include "nix/installable-flake.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/flake/flake.hh" +#include "nix/get-drvs.hh" +#include "nix/signals.hh" +#include "nix/store-api.hh" +#include "nix/derivations.hh" +#include "nix/outputs-spec.hh" +#include "nix/attr-path.hh" +#include "nix/fetchers.hh" +#include "nix/registry.hh" +#include "nix/eval-cache.hh" +#include "nix/markdown.hh" +#include "nix/users.hh" +#include "nix/fetch-to-store.hh" +#include "nix/local-fs-store.hh" #include #include #include -#include "strings-inline.hh" +#include "nix/strings-inline.hh" namespace nix::fs { using namespace std::filesystem; } diff --git a/src/nix/fmt.cc b/src/nix/fmt.cc index f444d6addf1..e49f7608418 100644 --- a/src/nix/fmt.cc +++ b/src/nix/fmt.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "installable-value.hh" -#include "eval.hh" +#include "nix/command.hh" +#include "nix/installable-value.hh" +#include "nix/eval.hh" #include "run.hh" using namespace nix; diff --git a/src/nix/hash.cc b/src/nix/hash.cc index 91bba47f42b..db937283acf 100644 --- a/src/nix/hash.cc +++ b/src/nix/hash.cc @@ -1,13 +1,13 @@ -#include "command.hh" -#include "hash.hh" -#include "content-address.hh" -#include "legacy.hh" -#include "shared.hh" -#include "references.hh" -#include "archive.hh" -#include "git.hh" -#include "posix-source-accessor.hh" -#include "misc-store-flags.hh" +#include "nix/command.hh" +#include "nix/hash.hh" +#include "nix/content-address.hh" +#include "nix/legacy.hh" +#include "nix/shared.hh" +#include "nix/references.hh" +#include "nix/archive.hh" +#include "nix/git.hh" +#include "nix/posix-source-accessor.hh" +#include "nix/misc-store-flags.hh" #include "man-pages.hh" using namespace nix; diff --git a/src/nix/log.cc b/src/nix/log.cc index 1a6f48f5e29..d2906b9da10 100644 --- a/src/nix/log.cc +++ b/src/nix/log.cc @@ -1,9 +1,9 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "log-store.hh" -#include "progress-bar.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/log-store.hh" +#include "nix/progress-bar.hh" using namespace nix; diff --git a/src/nix/ls.cc b/src/nix/ls.cc index 63f97f2d3b6..c5a1c450485 100644 --- a/src/nix/ls.cc +++ b/src/nix/ls.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "store-api.hh" -#include "nar-accessor.hh" -#include "common-args.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/nar-accessor.hh" +#include "nix/common-args.hh" #include using namespace nix; diff --git a/src/nix/main.cc b/src/nix/main.cc index c5e9c0e7f80..54999bd48e0 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -1,25 +1,25 @@ -#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 "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 "self-exe.hh" -#include "json-utils.hh" +#include "nix/json-utils.hh" #include #include @@ -33,7 +33,7 @@ #endif #if __linux__ -# include "namespaces.hh" +# include "nix/namespaces.hh" #endif #ifndef _WIN32 @@ -42,7 +42,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 d9c988a9f5d..0426dd5d642 100644 --- a/src/nix/make-content-addressed.cc +++ b/src/nix/make-content-addressed.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "store-api.hh" -#include "make-content-addressed.hh" -#include "common-args.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/make-content-addressed.hh" +#include "nix/common-args.hh" #include diff --git a/src/nix/man-pages.cc b/src/nix/man-pages.cc index e9e89bb62a7..993ef28e1be 100644 --- a/src/nix/man-pages.cc +++ b/src/nix/man-pages.cc @@ -1,7 +1,7 @@ #include "man-pages.hh" -#include "file-system.hh" -#include "current-process.hh" -#include "environment-variables.hh" +#include "nix/file-system.hh" +#include "nix/current-process.hh" +#include "nix/environment-variables.hh" namespace nix { diff --git a/src/nix/meson.build b/src/nix/meson.build index 398750498fd..68a33224a43 100644 --- a/src/nix/meson.build +++ b/src/nix/meson.build @@ -54,12 +54,13 @@ 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', 'config-fetchers.hh', - '-include', 'config-main.hh', - '-include', 'config-cmd.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-expr.hh', + #'-include', 'nix/config-fetchers.hh', + '-include', 'nix/config-main.hh', + '-include', 'nix/config-cmd.hh', + # Not installed '-include', 'config-nix-cli.hh', language : 'cpp', ) diff --git a/src/nix/nar.cc b/src/nix/nar.cc index 8ad4f92a796..ba815551d59 100644 --- a/src/nix/nar.cc +++ b/src/nix/nar.cc @@ -1,4 +1,4 @@ -#include "command.hh" +#include "nix/command.hh" using namespace nix; diff --git a/src/nix/optimise-store.cc b/src/nix/optimise-store.cc index 985006e5a54..ac1b03f60a5 100644 --- a/src/nix/optimise-store.cc +++ b/src/nix/optimise-store.cc @@ -1,6 +1,6 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" #include diff --git a/src/nix/path-from-hash-part.cc b/src/nix/path-from-hash-part.cc index 7f7cda8d3d3..060231d025a 100644 --- a/src/nix/path-from-hash-part.cc +++ b/src/nix/path-from-hash-part.cc @@ -1,5 +1,5 @@ -#include "command.hh" -#include "store-api.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" using namespace nix; diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index 8e3d0406dd2..994c7e7dc6b 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 84c0224e223..e3e246eb8da 100644 --- a/src/nix/prefetch.cc +++ b/src/nix/prefetch.cc @@ -1,17 +1,17 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "filetransfer.hh" -#include "finally.hh" -#include "progress-bar.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/progress-bar.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 324fd633003..2ba3a82682b 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 a386d98eac9..32e5442652c 100644 --- a/src/nix/realisation.cc +++ b/src/nix/realisation.cc @@ -1,5 +1,5 @@ -#include "command.hh" -#include "common-args.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" #include diff --git a/src/nix/registry.cc b/src/nix/registry.cc index ee45162302c..f464ab02f6a 100644 --- a/src/nix/registry.cc +++ b/src/nix/registry.cc @@ -1,11 +1,11 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "eval.hh" -#include "flake/flake.hh" -#include "store-api.hh" -#include "fetchers.hh" -#include "registry.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/eval.hh" +#include "nix/flake/flake.hh" +#include "nix/store-api.hh" +#include "nix/fetchers.hh" +#include "nix/registry.hh" using namespace nix; using namespace nix::flake; diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 5a570749f4c..fb895445587 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -1,11 +1,11 @@ -#include "eval.hh" -#include "eval-settings.hh" -#include "config-global.hh" -#include "globals.hh" -#include "command.hh" -#include "installable-value.hh" -#include "repl.hh" -#include "processes.hh" +#include "nix/eval.hh" +#include "nix/eval-settings.hh" +#include "nix/config-global.hh" +#include "nix/globals.hh" +#include "nix/command.hh" +#include "nix/installable-value.hh" +#include "nix/repl.hh" +#include "nix/processes.hh" #include "self-exe.hh" namespace nix { diff --git a/src/nix/run.cc b/src/nix/run.cc index a9f9ef60ff2..d8ee8aceba5 100644 --- a/src/nix/run.cc +++ b/src/nix/run.cc @@ -1,21 +1,21 @@ -#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 "progress-bar.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/progress-bar.hh" +#include "nix/eval.hh" #include #if __linux__ # include -# include "personality.hh" +# include "nix/personality.hh" #endif #include diff --git a/src/nix/run.hh b/src/nix/run.hh index 51517fdc94a..eb670319ca5 100644 --- a/src/nix/run.hh +++ b/src/nix/run.hh @@ -1,7 +1,7 @@ #pragma once ///@file -#include "store-api.hh" +#include "nix/store-api.hh" namespace nix { diff --git a/src/nix/search.cc b/src/nix/search.cc index 30b96c5008d..6a2ee1aa6c6 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -1,22 +1,22 @@ -#include "command-installable-value.hh" -#include "globals.hh" -#include "eval.hh" -#include "eval-inline.hh" -#include "eval-settings.hh" -#include "names.hh" -#include "get-drvs.hh" -#include "common-args.hh" -#include "shared.hh" -#include "eval-cache.hh" -#include "attr-path.hh" -#include "hilite.hh" -#include "strings-inline.hh" +#include "nix/command-installable-value.hh" +#include "nix/globals.hh" +#include "nix/eval.hh" +#include "nix/eval-inline.hh" +#include "nix/eval-settings.hh" +#include "nix/names.hh" +#include "nix/get-drvs.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/eval-cache.hh" +#include "nix/attr-path.hh" +#include "nix/hilite.hh" +#include "nix/strings-inline.hh" #include #include #include -#include "strings.hh" +#include "nix/strings.hh" using namespace nix; using json = nlohmann::json; diff --git a/src/nix/self-exe.cc b/src/nix/self-exe.cc index 77d20a835e3..c9ab566cec7 100644 --- a/src/nix/self-exe.cc +++ b/src/nix/self-exe.cc @@ -1,6 +1,6 @@ -#include "current-process.hh" -#include "file-system.hh" -#include "globals.hh" +#include "nix/current-process.hh" +#include "nix/file-system.hh" +#include "nix/globals.hh" #include "self-exe.hh" namespace nix { diff --git a/src/nix/sigs.cc b/src/nix/sigs.cc index 134d4f34a17..342721566de 100644 --- a/src/nix/sigs.cc +++ b/src/nix/sigs.cc @@ -1,9 +1,9 @@ -#include "signals.hh" -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "thread-pool.hh" -#include "progress-bar.hh" +#include "nix/signals.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/thread-pool.hh" +#include "nix/progress-bar.hh" #include diff --git a/src/nix/store-copy-log.cc b/src/nix/store-copy-log.cc index a6e8aeff7cb..7dde15dfa43 100644 --- a/src/nix/store-copy-log.cc +++ b/src/nix/store-copy-log.cc @@ -1,10 +1,10 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "log-store.hh" -#include "sync.hh" -#include "thread-pool.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/log-store.hh" +#include "nix/sync.hh" +#include "nix/thread-pool.hh" #include diff --git a/src/nix/store-delete.cc b/src/nix/store-delete.cc index 6719227dfe7..3d73b7b9a2a 100644 --- a/src/nix/store-delete.cc +++ b/src/nix/store-delete.cc @@ -1,9 +1,9 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" using namespace nix; diff --git a/src/nix/store-gc.cc b/src/nix/store-gc.cc index 8b9b5d1642a..a8ea3f2fa0f 100644 --- a/src/nix/store-gc.cc +++ b/src/nix/store-gc.cc @@ -1,9 +1,9 @@ -#include "command.hh" -#include "common-args.hh" -#include "shared.hh" -#include "store-api.hh" -#include "store-cast.hh" -#include "gc-store.hh" +#include "nix/command.hh" +#include "nix/common-args.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/store-cast.hh" +#include "nix/gc-store.hh" using namespace nix; diff --git a/src/nix/store-info.cc b/src/nix/store-info.cc index a7c59576146..656be0d41c3 100644 --- a/src/nix/store-info.cc +++ b/src/nix/store-info.cc @@ -1,7 +1,7 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "finally.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/finally.hh" #include diff --git a/src/nix/store-repair.cc b/src/nix/store-repair.cc index 895e3968507..cd63a836a1a 100644 --- a/src/nix/store-repair.cc +++ b/src/nix/store-repair.cc @@ -1,5 +1,5 @@ -#include "command.hh" -#include "store-api.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" using namespace nix; diff --git a/src/nix/store.cc b/src/nix/store.cc index 79b41e0965e..ccf02c22e1d 100644 --- a/src/nix/store.cc +++ b/src/nix/store.cc @@ -1,4 +1,4 @@ -#include "command.hh" +#include "nix/command.hh" using namespace nix; diff --git a/src/nix/unix/daemon.cc b/src/nix/unix/daemon.cc index b4c7c10edb1..9bdbca1301d 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 1e8032af6dc..3d4fe06f4b0 100644 --- a/src/nix/upgrade-nix.cc +++ b/src/nix/upgrade-nix.cc @@ -1,14 +1,14 @@ -#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 "progress-bar.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/progress-bar.hh" +#include "nix/executable-path.hh" #include "self-exe.hh" using namespace nix; diff --git a/src/nix/verify.cc b/src/nix/verify.cc index 52585fe08d5..0adfec89527 100644 --- a/src/nix/verify.cc +++ b/src/nix/verify.cc @@ -1,13 +1,13 @@ -#include "command.hh" -#include "shared.hh" -#include "store-api.hh" -#include "thread-pool.hh" -#include "signals.hh" -#include "keys.hh" +#include "nix/command.hh" +#include "nix/shared.hh" +#include "nix/store-api.hh" +#include "nix/thread-pool.hh" +#include "nix/signals.hh" +#include "nix/keys.hh" #include -#include "exit.hh" +#include "nix/exit.hh" using namespace nix; diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc index e299585ff88..6ca0144c11a 100644 --- a/src/nix/why-depends.cc +++ b/src/nix/why-depends.cc @@ -1,8 +1,8 @@ -#include "command.hh" -#include "store-api.hh" -#include "progress-bar.hh" -#include "source-accessor.hh" -#include "shared.hh" +#include "nix/command.hh" +#include "nix/store-api.hh" +#include "nix/progress-bar.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 172c3500de0..3cd9fef472d 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 3d6b2f0e1d8..0b3bfdfab00 100644 --- a/tests/functional/plugins/meson.build +++ b/tests/functional/plugins/meson.build @@ -4,10 +4,10 @@ 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-fetchers.hh', - '-include', 'config-expr.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + # '-include', 'nix/config-fetchers.hh', + '-include', 'nix/config-expr.hh', ], dependencies : [ dependency('nix-expr'), diff --git a/tests/functional/plugins/plugintest.cc b/tests/functional/plugins/plugintest.cc index 7433ad19008..e3343bcbc2d 100644 --- a/tests/functional/plugins/plugintest.cc +++ b/tests/functional/plugins/plugintest.cc @@ -1,5 +1,5 @@ -#include "config-global.hh" -#include "primops.hh" +#include "nix/config-global.hh" +#include "nix/primops.hh" using namespace nix; diff --git a/tests/functional/test-libstoreconsumer/main.cc b/tests/functional/test-libstoreconsumer/main.cc index c61489af69a..7cb0da944c1 100644 --- a/tests/functional/test-libstoreconsumer/main.cc +++ b/tests/functional/test-libstoreconsumer/main.cc @@ -1,6 +1,6 @@ -#include "globals.hh" -#include "store-api.hh" -#include "build-result.hh" +#include "nix/globals.hh" +#include "nix/store-api.hh" +#include "nix/build-result.hh" #include using namespace nix; diff --git a/tests/functional/test-libstoreconsumer/meson.build b/tests/functional/test-libstoreconsumer/meson.build index 7076127f70a..13a7f6d6f9b 100644 --- a/tests/functional/test-libstoreconsumer/meson.build +++ b/tests/functional/test-libstoreconsumer/meson.build @@ -4,8 +4,8 @@ libstoreconsumer_tester = executable( cpp_args : [ # TODO(Qyriad): Yes this is how the autoconf+Make system did it. # It would be nice for our headers to be idempotent instead. - '-include', 'config-util.hh', - '-include', 'config-store.hh', + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', ], dependencies : [ dependency('nix-store'),