We are migrating packages that meet below requirements:
1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration
The tool is here: https://github.com/Aleksanaa/by-name-migrate.
This fails to build with gcc_13 as default, opting to remove the flag
for the time being instead of conditioning to the gcc version
Not showing up on hydra at the moment
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"
```
The xxxFlagsArray variants were never meant to be used in nix code, at
least they can't be used properly without __structuredAttrs turned on.
If no spaces are passed in the argument the xxxFlagsArray can be
replaced as-is with the non-Array variant. When whitespace needs to be
passed, the derivation is additionally changed to enable
__structuredAttrs.
Done using `grep -rP 'description\s+=\s+"[^"]+[ ]";' | cut -d ':' -f 1 |
xargs -i nvim {}` and sorting the opened files by hand, avoiding
generated packages list
This was achieved using the following command:
sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')
And then manually reverted the following changes:
- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
* mpd-touch-screen-gui: use finalAttrs in mkDerivation; reformat
* musescore: use finalAttrs in mkDerivation
* syncthingtray: use stdenv.mkDerivation with a function; reformat
* ocrfeeder: use finalAttrs in mkDerivation; reformat
* castget: use finalAttrs in mkDerivation
* gnome-network-displays: use finalAttrs in mkDerivation
* mailreaders: use finalAttrs in mkDerivation
* mswatch: use finalAttrs in mkDerivation
* uhd: use finalAttrs in mkDerivation
* maxima: use finalAttrs in mkDerivation
* qalculate-gtk: use finalAttrs in mkDerivation
* qalculate-qt: use finalAttrs in mkDerivation
* wxmaxima: use finalAttrs in mkDerivation
* lammps: use finalAttrs in mkDerivation
* mlterm: use finalAttrs in mkDerivation
* video-trimmer: use finalAttrs in mkDerivation
* nerdfonts: use finalAttrs in mkDerivation
* gnomeExtensions.easyScreenCast: use finalAttrs in mkDerivation
* octave: use finalAttrs in mkDerivation; reformat
* comedilib: use finalAttrs in mkDerivation
* cpp-utilities: use finalAttrs in mkDerivation
* libsForQt5.kpeoplevcard: use finalAttrs in mkDerivation; reformat
* liberio: use finalAttrs in mkDerivation
* libqalculate: use finalAttrs in mkDerivation; reformat
* libwtk-sdl2: use finalAttrs in mkDerivation
* libsForQt5.pulseaudio-qt: use finalAttrs in mkDerivation; reformat
* qrupdate: use finalAttrs in mkDerivation; reformat
* libsForQt5.qtforkawesome: use finalAttrs in mkDerivation; reformat
* libsForQt5.qtutilities: use finalAttrs in mkDerivation; reformat
* sqlitecpp: use finalAttrs in mkDerivation; reformat
* tweeny: use finalAttrs in mkDerivation
* volk: use finalAttrs in mkDerivation
* wiringpi: use finalAttrs in mkDerivation
* snzip: use finalAttrs in mkDerivation; reformat
* bpm-tools: use finalAttrs in mkDerivation; reformat
* sacd: use finalAttrs in mkDerivation
* gtk-gnutella: use finalAttrs in mkDerivation; reformat
* sile: use finalAttrs in mkDerivation
* pplatex: use finalAttrs in mkDerivation; reformat
The upstream Makefile is using logic to build into different dirs
depending on uname output. Trivial to get macOS builds working if
we just don't do that.
I've also stripped out a use of substituteAll that was having no
effect (the variables it replaced were removed during review of
the initial PR.)