After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 0128fbb0a5
result/bin/apply-formatting $NIXPKGS_PATH
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
Commit fe1151218c ("chiaki: cleanup package") replaced mkDerivation
with stdenv mkDerivation, which is wrong for QT5 applications and
results in the following error on start:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
also see [1] in the manual. Fix the package by using mkDerivation again.
[1]: https://nixos.org/manual/nixpkgs/unstable/#sec-language-qt
Fixes: fe1151218c ("chiaki: cleanup package")
Darwin requires qtmacextra in the buildInputs, otherwise compilation
fails with:
CMake Error at /nix/store/05nmn6v1hrk56zqs61s2awvykha51fx9-qtbase-5.12.7-dev/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
By not providing "FindQt5MacExtras.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5MacExtras", but CMake did not find one.
Could not find a package configuration file provided by "Qt5MacExtras" with
any of the following names:
Qt5MacExtrasConfig.cmake
qt5macextras-config.cmake
Add the installation prefix of "Qt5MacExtras" to CMAKE_PREFIX_PATH or set
"Qt5MacExtras_DIR" to a directory containing one of the above files. If
"Qt5MacExtras" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
gui/CMakeLists.txt:7 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-chiaki-2.0.1.drv-0/chiaki/build/CMakeFiles/CMakeOutput.log".
Chiaki supports the touchpad on DualShock4 controllers when they are
connected via USB and requires libevdev & udev for this. Add both
libraries if chiaki is to be built for a Linux host.
Also switch the upstream repository from github to git.sr.ht, since the
project has been moved to sourcehut.
Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
After making `ffmpeg` point to the latest `ffmpeg_4`, all packages that
used `ffmpeg` without requiring a specific version now use ffmpeg_3
explicitly so they shouldn't change.