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.
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 nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
Fixes the xscreensaver-text based screensavers, namely:
Apple ][
Flip Text
Font Glide
GL Text
Nose Guy
Phosphor
Split-Flap
Star Wars
Windup Robot
XMatrix
Symptom of breakage was:
Can't exec "appres": No such file or directory at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 139.
Use of uninitialized value $body in substitution (s///) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 161.
Use of uninitialized value $body in substitution (s///) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 162.
Use of uninitialized value $body in pattern match (m//) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 164.
Use of uninitialized value $body in pattern match (m//) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 168.
Use of uninitialized value $body in pattern match (m//) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 171.
Use of uninitialized value $body in pattern match (m//) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 174.
Use of uninitialized value $body in pattern match (m//) at /nix/store/cm6kipfjrgj17pwdj5si39njzfrrvw8k-xscreensaver-6.08/libexec/xscreensaver/xscreensaver-text line 177.
This adds a patch for XScreenSaver that ensures that the suid wrapper
for xscreensaver-auth is run correctly.
The patch is a simple update to drivers/xscreensaver.c that inserts
/run/wrappers/bin before the DEFAULT_PATH_PREFIX, which is the directory
for xscreensaver hacks/demos, and should be preserved.
The wrapper directory can be modified in the derivation, or even
disabled.
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>