-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into lazy-trees
- Loading branch information
Showing
153 changed files
with
3,345 additions
and
1,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# These are private dependencies with pkg-config files. What private | ||
# means is that the dependencies are used by the library but they are | ||
# *not* used (e.g. `#include`-ed) in any installed header file, and only | ||
# in regular source code (`*.cc`) or private, uninstalled headers. They | ||
# are thus part of the *implementation* of the library, but not its | ||
# *interface*. | ||
# | ||
# See `man pkg-config` for some details. | ||
deps_private = [ ] | ||
|
||
# These are public dependencies with pkg-config files. Public is the | ||
# opposite of private: these dependencies are used in installed header | ||
# files. They are part of the interface (and implementation) of the | ||
# library. | ||
# | ||
# N.B. This concept is mostly unrelated to our own concept of a public | ||
# (stable) API, for consumption outside of the Nix repository. | ||
# `libnixutil` is an unstable C++ library, whose public interface is | ||
# likewise unstable. `libutilc` conversely is a hopefully-soon stable | ||
# C library, whose public interface --- including public but not private | ||
# dependencies --- will also likewise soon be stable. | ||
# | ||
# N.B. For distributions that care about "ABI" stability and not just | ||
# "API" stability, the private dependencies also matter as they can | ||
# potentially affect the public ABI. | ||
deps_public = [ ] | ||
|
||
# These are subproject deps (type == "internal"). They are other | ||
# packages in `/src` in this repo. The private vs public distinction is | ||
# the same as above. | ||
deps_private_subproject = [ ] | ||
deps_public_subproject = [ ] | ||
|
||
# These are dependencencies without pkg-config files. Ideally they are | ||
# just private, but they may also be public (e.g. boost). | ||
deps_other = [ ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
add_project_arguments( | ||
'-Wno-deprecated-declarations', | ||
'-Wimplicit-fallthrough', | ||
'-Werror=switch', | ||
'-Werror=switch-enum', | ||
'-Werror=unused-result', | ||
'-Wdeprecated-copy', | ||
'-Wignored-qualifiers', | ||
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked | ||
# at ~1% overhead in `nix search`. | ||
# | ||
language : 'cpp', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' | ||
# Windows DLLs are stricter about symbol visibility than Unix shared | ||
# objects --- see https://gcc.gnu.org/wiki/Visibility for details. | ||
# This is a temporary sledgehammer to export everything like on Unix, | ||
# and not detail with this yet. | ||
# | ||
# TODO do not do this, and instead do fine-grained export annotations. | ||
linker_export_flags = ['-Wl,--export-all-symbols'] | ||
else | ||
linker_export_flags = [] | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
requires_private = [] | ||
foreach dep : deps_private_subproject | ||
requires_private += dep.name() | ||
endforeach | ||
requires_private += deps_private | ||
|
||
requires_public = [] | ||
foreach dep : deps_public_subproject | ||
requires_public += dep.name() | ||
endforeach | ||
requires_public += deps_public | ||
|
||
import('pkgconfig').generate( | ||
this_library, | ||
filebase : meson.project_name(), | ||
name : 'Nix', | ||
description : 'Nix Package Manager', | ||
subdirs : ['nix'], | ||
extra_cflags : ['-std=c++2a'], | ||
requires : requires_public, | ||
requires_private : requires_private, | ||
libraries_private : libraries_private, | ||
) | ||
|
||
meson.override_dependency(meson.project_name(), declare_dependency( | ||
include_directories : include_dirs, | ||
link_with : this_library, | ||
compile_args : ['-std=c++2a'], | ||
dependencies : deps_public_subproject + deps_public, | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
foreach maybe_subproject_dep : deps_private_maybe_subproject | ||
if maybe_subproject_dep.type_name() == 'internal' | ||
deps_private_subproject += maybe_subproject_dep | ||
# subproject sadly no good for pkg-config module | ||
deps_other += maybe_subproject_dep | ||
else | ||
deps_private += maybe_subproject_dep | ||
endif | ||
endforeach | ||
|
||
foreach maybe_subproject_dep : deps_public_maybe_subproject | ||
if maybe_subproject_dep.type_name() == 'internal' | ||
deps_public_subproject += maybe_subproject_dep | ||
# subproject sadly no good for pkg-config module | ||
deps_other += maybe_subproject_dep | ||
else | ||
deps_public += maybe_subproject_dep | ||
endif | ||
endforeach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This is only conditional to work around | ||
# https://github.com/mesonbuild/meson/issues/13293. It should be | ||
# unconditional. | ||
if not (host_machine.system() == 'windows' and cxx.get_id() == 'gcc') | ||
deps_private += dependency('threads') | ||
endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
synopsis: "`nix-shell <directory>` looks for `shell.nix`" | ||
significance: significant | ||
issues: | ||
- 496 | ||
- 2279 | ||
- 4529 | ||
- 5431 | ||
- 11053 | ||
prs: | ||
- 11057 | ||
--- | ||
|
||
`nix-shell $x` now looks for `$x/shell.nix` when `$x` resolves to a directory. | ||
|
||
Although this might be seen as a breaking change, its primarily interactive usage makes it a minor issue. | ||
This adjustment addresses a commonly reported problem. | ||
|
||
This also applies to `nix-shell` shebang scripts. Consider the following example: | ||
|
||
```shell | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell -i bash | ||
``` | ||
|
||
This will now load `shell.nix` from the script's directory, if it exists; `default.nix` otherwise. | ||
|
||
The old behavior can be opted into by setting the option [`nix-shell-always-looks-for-shell-nix`](@docroot@/command-ref/conf-file.md#conf-nix-shell-always-looks-for-shell-nix) to `false`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.