The current algorithm creates attributes with null values for packages
with no source in a variant of MELPA. Though will satify dependencies
they produce no files, and though a build that transitively depends on
one them will be successful, Emacs won't find them and any code
depending on them won't work.
The solution with minimal code change would have been filtering the
list of results from melpaDerivation by comparing the value against
null, but that leads to an infinite recursion.
This commit also moves legacy renames from the shared to the unstable
set, as the corresponding null value elements won't exist in the
stable set anymore.
The test used for the problem was:
$ nix-build --show-trace ./default.nix -A emacs26Packages.melpaStablePackages.findr
error: expression does not evaluate to a derivation (or a set or list of those)
The expected output, obtained with this commit is:
$ nix-build --show-trace ./default.nix -A emacs26Packages.melpaStablePackages.findr
error: attribute 'findr' in selection path 'emacs26Packages.melpaStablePackages.findr' not found
With #83290 merged the build would fail during the configuration phase:
```
configuring
ERROR at //gn/BUILDCONFIG.gn:85:14: Script returned non-zero exit code.
is_clang = exec_script("gn/is_clang.py",
^----------
Current dir: /build/source/out/Release/
Command: python /build/source/gn/gn/is_clang.py cc c++
Returned 2.
stderr:
python: can't open file '/build/source/gn/gn/is_clang.py': [Errno 2] No such file or directory
```
buildFHSUserEnv does not currently support multiple binaries, so doing
this manually with wrappers.
Pass through original quartus derivation for debugging/overriding
Otherwise it fails with:
In file included from /build/source/src/allegro/include/allegro/base.h:41,
from /build/source/src/allegro/include/allegro.h:25,
from /build/source/src/./she/alleg4/alleg_surface.h:11,
from /build/source/src/she/alleg4/alleg_surface.cpp:11:
/build/source/src/allegro/include/allegro/alcompat.h:44:22: error: conflicting declaration of C function 'fixed fadd(fixed, fixed)'
44 | AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y))
| ^~~~
/build/source/src/allegro/include/allegro/internal/alconfig.h:164:49: note: in definition of macro 'AL_ALIAS'
164 | static __attribute__((unused)) __inline__ DECL \
| ^~~~
In file included from /nix/store/y57skwl8a5vbkrjrc30ygdw9vr1p6n19-gcc-9.2.0/include/c++/9.2.0/cmath:45,
from /nix/store/y57skwl8a5vbkrjrc30ygdw9vr1p6n19-gcc-9.2.0/include/c++/9.2.0/math.h:36,
from /build/source/src/./base/base.h:13,
from /build/source/src/./config.h:40,
from /build/source/src/she/alleg4/alleg_surface.cpp:8:
/nix/store/2v6pi2wj3lcsc3j48n7flx9mgqyii1lv-glibc-2.30-dev/include/bits/mathcalls-narrow.h:24:20: note: previous declaration 'float fadd(double, double)'
24 | __MATHCALL_NARROW (__MATHCALL_NAME (add), __MATHCALL_REDIR_NAME (add), 2);
| ^~~~~~~~~~~~~~~
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.
This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.
See #79975 for details.
This has several advantages:
1. It takes up less space on disk in-between builds in the nix store.
2. It uses less space in the binary cache for vendor derivation packages.
3. It uses less network traffic downloading from the binary cache.
4. It plays nicely with hashed mirrors like tarballs.nixos.org, which only
substitute --flat hashes on single files (not recursive directory hashes).
5. It's consistent with how simple `fetchurl` src derivations work.
6. It provides a stronger abstraction between input src-package and output
package, e.g., it's harder to accidentally depend on the src derivation at
runtime by referencing something like `${src}/etc/index.html`. Likewise, in
the store it's harder to get confused with something that is just there as a
build-time dependency vs. a runtime dependency, since the build-time
src dependencies are tarred up.
Disadvantages are:
1. It takes slightly longer to untar at the start of a build.
As currently implemented, this attaches the compacted vendor.tar.gz feature as a
rider on `verifyCargoDeps`, since both of them are relatively newly implemented
behavior that change the `cargoSha256`.
If this PR is accepted, I will push forward the remaining rust packages with a
series of treewide PRs to update the `cargoSha256`s.
I am not happy with this at all. It avoids using libbsd at all on
darwin because there are conflicting header files, particularly the
header string.h.
Ideally that would be the thing to fix. But in the meantime, this patch
should do the trick.
It declares a header file apple.h, which files include if target is
darwin (checks for presence of __APPLE__). This header file also
references the three source files futimens.c, reallocarray.c and
strtonum.c. The former and latter are from https://github.com/ibara/mg
which is another portable fork, but building against more platforms.
From the OpenBSD source tree is _null.h and tree.h. There is a check so
that if __APPLE__ is present then it will include them from this source
tree.
Now,the makefile GNUMakefile will not link against libbsd on darwin, by
checking the output of uname in much the same way as it did already for
FreeBSD.
According to https://repology.org/repository/nix_unstable/problems, we have a
lot of packages that have http links that redirect to https as their homepage.
This commit updates all these packages to use the https links as their
homepage.
The following script was used to make these updates:
```
curl https://repology.org/api/v1/repository/nix_unstable/problems \
| jq '.[] | .problem' -r \
| rg 'Homepage link "(.+)" is a permanent redirect to "(.+)" and should be updated' --replace 's@$1@$2@' \
| sort | uniq > script.sed
find -name '*.nix' | xargs -P4 -- sed -f script.sed -i
```
Unfortunately this update seems to require some manual changes, at least
in my case. But fortunately the IDE explains the required changes:
4:45 PM Gradle sync failed: Minimum supported Gradle version is 6.1-rc-1. Current version is 6.1-milestone-2. If using the gradle wrapper, try editing the distributionUrl in /home/michael/workspace/as40test/gradle/wrapper/gradle-wrapper.properties to gradle-6.1-rc-1-all.zip
Consult IDE log for more details (Help | Show Log) (21 s 544 ms)
nixpkgs-update doesn't correctly update the hash for darwin.
There doesn't seem to be a good fix for this.
See also:
- #76471
- #76458
CC: @ryantm @eadwu
Idea shamelessly stolen from 4e60b0efae.
I realized that I don't really know anymore where I'm listed as maintainer and what
I'm actually (co)-maintaining which means that I can't proactively take
care of packages I officially maintain.
As I don't have the time, energy and motivation to take care of stuff I
was interested in 1 or 2 years ago (or packaged for someone else in the
past), I decided that I make this explicit by removing myself from several
packages and adding myself in some other stuff I'm now interested in.
I've seen it several times now that people remove themselves from a
package without removing the package if it's unmaintained after that
which is why I figured that it's fine in my case as the affected pkgs
are rather low-prio and were pretty easy to maintain.