/etc/hostname is the file used by hostnamectl(1) and the
org.freedesktop.hostname1 dbus service (both provided by systemd) to get
the "static hostname". Better provide it so that users of those
tools/services get a proper hostname.
An example of an issue created by the lack of /etc/hostname is that the
bluetooth stack on NixOS identifies itself to peers as "BlueZ $VERSION"
instead of the hostname.
References:
https://www.freedesktop.org/software/systemd/man/hostname.html
Changes v1 -> v2:
* ensure /etc/hostname ends with a newline
* cpu-freq: Try powersave if ondemand is not available
* Revert "cpu-freq: Try powersave if ondemand is not available"
This reverts commit 4dc56db37e.
Consult available scaling governors; for freshly generated configs, this provides a better experience than relying on a default that might not work everywhere.
- wrap-python.nix used to set sys.argv[0] to the name of the script, but
it now sets the path so we won't have to do it here anymore
- tests were not found, so the correct file is now invoked
Certain programs, like zim, calibre and now also apparently mercurial,
rely on sys.argv[0] providing not just the script name but the full
path.
The Python docs [1] state the following on the matter:
> argv[0] is the script name (it is operating system dependent whether
this is a full pathname or not).
Therefore, scripts should not expect to receive a full path.
Unfortunately some do. While this can be considered a bug, there doesn't
seem any reason not to provide the full path. Therefore we now provide
the full path.
[1]
https://docs.python.org/3.5/library/sys.html?highlight=sys.argv#sys.argv
1) Replace --system-libclang with an explicit setting for the path to
nix libclang 3.9. Otherwise it will find system's libclang on darwin.
2) Remove clang/llvm from build inputs. This prevents ycm itself from
being compiled by clang 3.9. stdenv's standard compiler (gcc or
clang 3.7) will suffice.
3) Enable C++11 again as #16212 is caused by incopatibility between
clang 3.9 and libc++ 3.7, but we don't compile YCM with clang 3.9, so
this is not needed anymore.