The indentation stripping semantics of strings are fairly bad and have a
few gotchas where the resulting string has not the intended indentation.
This commit fixes most if not all such instances in Nixpkgs.
I tried to strive a balance between keeping the diff small and
reformatting/refactoring the code to look better. In general,
reformatting should be left to Nixfmt.
Note that this causes a lot of rebuilds by design. All changes need to
be thoroughly vetted and reviewed for correctness. There is no automatic
way to prove correctness.
List of files to fix generated by running
https://gerrit.lix.systems/c/lix/+/2092 on Nixpkgs and looking at the
warnings.
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"
```
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
by changing its path and wrapping the correct binary
all the other binaries in bin/ are symlinks to bin/mit-scheme${arch}-${version}
therefore its easier to just wrap that one instead of all the others
Add ncurses as a propagated build input.
Add ghostscript, autoconf, and libtool as native build inputs.
Add epsf and texinfo to the texLive closure.
Support aarch64 Linux, and remove support for i686 Linux.
Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
The last update was in 2014 (9.2), but a major
release came out since (10.x).
See discussion at https://discourse.nixos.org/t/6776
but to sum up:
The portable C source and Windows binaries are not
available in the latest MIT Scheme release
(see https://www.gnu.org/software/mit-scheme/release.html )
Warning: Locale seems not configured
hence the option to build from source has been
removed from `default.nix`. Although there is a
source package included in the release (in lieu of
the portable C source), there is a caveat:
> Note that you cannot build a working system from the
> source unless you have a working MIT/GNU Scheme
> compiler to do the compilation. (This doesn't apply
> to the portable C source, which requires only a C
> compiler.) This means that if the above binaries
> don't work on your system, it is pointless to try
> building a custom set of binaries from the source
> code.
These changes are necessary for me to use mit-scheme on i686 NixOS.
mit-scheme in the current state should be broken on x86_64 either and
these changes should fix, too. I however did not test this.