this creates some eval errors that will be fixed in the next commit
done with the following script:
```fish
\#!/usr/bin/env fish
set packagesjson (nix eval --impure --json --expr '
let
lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
name: _:
if name == "lib" then
lib
else if name == "config" then
{ allowAliases = false; }
else
name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)
set one (grep '^ [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^ [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)
for arg in $one $two
set oname $arg
set nname (echo $packagesjson | jq -r .$oname)
if test $nname = null
echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
continue
end
echo $oname "->" $nname
# replace basic xorg.$name references
for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
# special cases
sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file
# replace
sd -F "xorg.$oname" "$nname" $file
# fixup function arguments
# prevent duplicate function args
if grep -E " ($oname|$nname),\$" $file >/dev/null
continue
end
if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg
if grep ' xorg,$' $file >/dev/null
sd ' xorg,$' " xorg,
$nname," $file
else if grep ' xorg ? .*,$' $file >/dev/null
sd 'xorg( ? .*),$' "xorg\$1,
$nname," $file
else
sd -F 'xorg,' "$nname,
xorg," $file
end
else # case there is no more xorg..* so we can just replace the function arg
sd 'xorg(| ? .*),.*$' "$nname," $file
end
end
end
nix fmt
```
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
This essentially applies https://github.com/NixOS/nixpkgs/pull/455592 to
qtbase (and thus all packages depending on Qt on Darwin) without
rebuilding the world.
We're doing this so that Qt-based applications will be fixed faster than
the time it takes to wait for a staging cycle.
Qt tries to detect the running Xcode version through `xcrun xcodebuild
-version`.
This fails when xcbuild is not included in the dependencies, and is also
unnecessary as the value is only used for the Xcode min version check
that we explicitly disable already.
`xmlstarlet` is only necessary to minify the mime ypes resources [1].
It is virtually unnecessary: the closure size reduction from minification
here is mostly useless compared to the cost of including xmlstarlet in the closure.
[1] 475c951d69/src/corelib/QtCompressMimeDatabase.cmake (L8-L15)
Co-authored-by: K900 <me@0upti.me>
When building on Linux, the Qt build process includes
`CMAKE_SYSTEM_VERSION` in the resulting module description, which
defaults to the kernel version of the build host, breaking
reproducibility.
This change clears the `CMAKE_SYSTEM_VERSION` which is supported
by the build process and leaves out the version, giving us
reproducibility and avoiding increased rebuilds when the Linux
kernel is updated.
This is tracked upstream as QTBUG-136060