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 https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev 78e9caf153
result/bin/apply-formatting $NIXPKGS_PATH
35 lines
991 B
Nix
35 lines
991 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
qtModule,
|
|
qtbase,
|
|
qtmultimedia,
|
|
}:
|
|
|
|
qtModule {
|
|
pname = "qtlocation";
|
|
propagatedBuildInputs = [
|
|
qtbase
|
|
qtmultimedia
|
|
];
|
|
outputs = [
|
|
"bin"
|
|
"out"
|
|
"dev"
|
|
];
|
|
# Clang 18 treats a non-const, narrowing conversion in an initializer list as an error,
|
|
# which results in a failure building a 3rd party dependency of qtlocation. Just suppress it.
|
|
env =
|
|
lib.optionalAttrs (stdenv.cc.isClang && (lib.versionAtLeast (lib.getVersion stdenv.cc) "18"))
|
|
{
|
|
NIX_CFLAGS_COMPILE = "-Wno-c++11-narrowing-const-reference";
|
|
};
|
|
qmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# boost uses std::auto_ptr which has been disabled in clang with libcxx
|
|
# This flag re-enables this feature
|
|
# https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros
|
|
"QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR"
|
|
"QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"
|
|
];
|
|
}
|