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"
```
Always specify the preDistPhases attribute as a list instead of a string.
Append elements to the preDistPhases Bash variable using appendToVar
instead of string or Bash array concatenation.
Handle element insertion before a specific element using string
substitution as before, but handle both structured and unstructured
attributes.
Without the change the eval fails as:
nix-repl> octave.buildEnv
error:
… while evaluating the attribute 'buildEnv'
at pkgs/development/interpreters/octave/default.nix:205:7:
204| inherit enableQt enableReadline enableJava;
205| buildEnv = callPackage ./build-env.nix {
| ^
206| octave = finalAttrs.finalPackage;
… while calling a functor (an attribute set with a '__functor' attribute)
at /home/slyfox/dev/git/nixpkgs-master/lib/customisation.nix:264:13:
263| in if missingArgs == {}
264| then makeOverridable f allArgs
| ^
265| # This needs to be an abort so it can't be caught with `builtins.tryEval`,
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: function 'anonymous lambda' called with unexpected argument 'octavePackages'
at pkgs/development/interpreters/octave/build-env.nix:1:1:
1| { lib, stdenv, octave, buildEnv
| ^
2| , makeWrapper, texinfo
Since it is a somewhat common library, with support for multiple qt
versions, it is safer to put each version of it in libsForQt5 and
qt6Packages attribute sets. Also, it is cleaner to put the darwin
if-else inside the expression, in relation to https://github.com/NixOS/rfcs/pull/140 .
* 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
While searching for something different I wondered why there is a
trivial-builders.nix file next to the trivial-builders directory where
only tests live. Lets fix that.
This script is heavily based on the script used to update all python
libraries at
pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py
The Octave Packages' website uses YAML as their basis, so we must
reformat to use YAML instead of JSON.
Make Qt applications work on macOS Big Sur even if they're built with
an older version of the macOS SDK (<10.14 - we're currently using
10.12). This issue is fixed in 5.12.11, but it requires macOS SDK
10.13 to build. See https://bugreports.qt.io/browse/QTBUG-87014 for
more info.
Use `rm -f` for *.tar.gz files so the command won't fail in case there
aren't any packages.
Create the `$out/.octave_packages` file before iterating the packages.
Now that `buildEnv` is ready, always put `makeWrapper` in
`nativeBuildInputs`, rather than `buildInputs` or (worse) mucking around
with setup hooks by hand.
(C.f. #112276, which didn't catch these because the manual setup hook
sourcing is such a hack to being with!)
Fixes#114687
continuation of #109595
pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.
python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.