octavePackages: Ensure Octave's "pkg install" sees a real file path.
Octave 11's "pkg install" command supports more usage methods than
previous versions did, including local files, URLs, and unqualified
package names. We/Nix pass a path that both is a local file and does
not look like a URL.
Despite us giving local paths in the shell script, the file
path we pass in is not glob-expanded by the shell running the
`postBuild` script from `build-env.nix`.
This happens Because Bash expansion and globbing do not fire for
multiple "rounds" inside of a string. So "$path/*.tar.gz" is given to
Octave as `/nix/store/...-octave-...-pkg-.../*.tar.gz`, which is NOT a
file we/Nix created.
We always need the octave-cli commands to be wrapped up into strings
so that Bash does not try to do anything with them. By doing the
expansion into a Bash variable before the string expansion, we get the
right thing:
/nix/store/...-octave-...-pkg-.../pkg-version-arch.tar.gz
Co-Authored-By: Karl Hallsby <karl@hallsby.com>
Co-Authored-By: Doron Behar <doron.behar@gmail.com>
Remove fem-fenics, level-set, parallel, sparsersb, tisean, vibes, and
vrml packages which have been marked broken since NixOS 24.05 and
remain unfixed.
Per RFC 180, packages broken for a full release cycle are subject
to removal.
https://github.com/NixOS/rfcs/pull/180
They are not doing anything right now. This is in preparation for their
complete removal from the tree.
Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.
Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
It seems like upstream Octave removed the requirement that Darwin
default to linking all of its dependencies[1]. Some packages (ltfat)
cannot link against Octave for some reason. Removing this optinal
configure flag fixes this issue.
[1] d4479bd8ae
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 a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
Add locale as buildInput to Octave packages buildEnv
Some Octave packages use a Perl script to translate their
documentation to other languages, which shells out to the locale
program. Before, this would error every time locale was called (which
is on every file), and would lead to a large number of what looked
like errors being printed out.
Set the path to the glibc locales using LOCALE_ARCHIVE in the
makeWrapper invocation, so the wrapped program knows where to find
locales for translations at run-time.
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.