Skip to content

emacs: replace fetchFromSavannah with mirror; adjust build#436020

Merged
philiptaron merged 1 commit intomasterfrom
unknown repository
Aug 26, 2025
Merged

emacs: replace fetchFromSavannah with mirror; adjust build#436020
philiptaron merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Aug 22, 2025

I used Guix's own Emacs derivation builder as an example for removing the pre-built files. As for determinism issues, apparently the unchanged savannah package still flags a determinism problem (building with --check/--rebuild). If it's good enough for Guix then it is probably good enough for nixpkgs.

See: #435964

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@ghost ghost mentioned this pull request Aug 22, 2025
13 tasks
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 6.topic: emacs Text editor labels Aug 23, 2025
@ghost ghost requested a review from philiptaron August 23, 2025 00:10
@ghost ghost changed the base branch from staging to master August 23, 2025 00:24
@nixpkgs-ci nixpkgs-ci bot closed this Aug 23, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Aug 23, 2025
@ghost ghost changed the base branch from master to staging August 23, 2025 00:24
@nixpkgs-ci nixpkgs-ci bot closed this Aug 23, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Aug 23, 2025
@ghost ghost force-pushed the emacs-use-mirror branch from 8aaba84 to 029d3ec Compare August 23, 2025 00:40
@ghost ghost changed the base branch from staging to master August 23, 2025 00:40
@nixpkgs-ci nixpkgs-ci bot closed this Aug 23, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Aug 23, 2025
@philiptaron
Copy link
Contributor

As for determinism issues, apparently the unchanged savannah package still flags a determinism problem (building with --check/--rebuild).

What does this mean? That the FOD hash is incorrect and only held up by the cache? 😱

@AndersonTorres
Copy link
Member

For Emacs I am a bit divided on this issue.
On a hand, since the XZ Incident I do not believe in pre-compiled compressed tar balls.
On the other one, snapshot functionality from Git forges like cgit or github is basically a pre-compiled compressed tar ball.
So this was never a relevant argument to begin with.

Since less code is better code, I am fine with this.

Copy link
Contributor

@jian-lin jian-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snapshot functionality from Git forges like cgit or github is basically a pre-compiled compressed tar ball

I do not think a snapshot from cgit has been pre-compiled. Compared to the tarball from the mirror, there is no .elc files in the tarball.

Even if we choose to not use fetchFromSavannah which uses the snapshot functionality of cgit, we can still get vanilla source code using fetchgit.

As for determinism issues, apparently the unchanged savannah package still flags a determinism problem (building with --check/--rebuild).

I also don't understand what this sentence means. Please elaborate.

@ghost
Copy link
Author

ghost commented Aug 24, 2025

As for determinism issues, apparently the unchanged savannah package still flags a determinism problem (building with --check/--rebuild).

I also don't understand what this sentence means. Please elaborate.

It comes from the --rebuild flag in nix build which states:

Rebuild an already built package and compare the result to the existing store paths.

I mentioned this because mirrors can introduce determinism issues like the pre-compiled lisp files that have to be removed. I don't fully understand this and this could be an issue only on my end so I can drop that as part of the reasoning given for this change.


One benefit of using a mirror is that the fetched source is smaller in size and that users can rely on mirrors rather than having to connect to savannah itself. fetchgit could also work but the resulting source output is ~198 MB in size. The mirror tarball is ~55MB in comparison, the cgit snapshot is ~49 MB and I'm confident the difference is because of the pre-compiled files.

@jian-lin
Copy link
Contributor

jian-lin commented Aug 24, 2025

OK, so the determinism issue you mention is about the build result of emacs, not about the source tarball itself emacs.src.

I can drop that as part of the reasoning given for this change

I think find . -type f \( -name "*.elc" -o -name "*loaddefs.el" \) -exec rm {} \; cannot be dropped. Otherwise, we would miss some native compilation .eln files. See #170467.

fetchgit could also work but the resulting source output is ~198 MB in size. The mirror tarball is ~55MB in comparison, the cgit snapshot is ~49 MB and I'm confident the difference is because of the pre-compiled files.

Isn't the difference is from compression? Please note that pre-compiled .elc files exist only in Emacs release tarballs, not in fetchgit/fetchFromSavannah result.

edit:
I mean the large size of the fetchgit result is due to no compression.

The size diff between release tarballs and fetchFromSavannah is from added files and maybe also different compression methods.

@ghost
Copy link
Author

ghost commented Aug 24, 2025

OK, so the determinism issue you mention is about the build result of emacs, not about the source tarball itself emacs.src.

I can drop that as part of the reasoning given for this change

I think find . -type f \( -name "*.elc" -o -name "*loaddefs.el" \) -exec rm {} \; cannot be dropped. Otherwise, we would miss some native compilation .eln files. See #170467.

Yeah that can't be dropped and was taken straight from Guix, otherwise, the build would skip them as per the PR you mentioned. This snippet should have been the one used instead of using fetchFromSavannah in my opinion.

fetchgit could also work but the resulting source output is ~198 MB in size. The mirror tarball is ~55MB in comparison, the cgit snapshot is ~49 MB and I'm confident the difference is because of the pre-compiled files.

Isn't the difference is from compression? Please note that pre-compiled .elc files exist only in Emacs release tarballs, not in fetchgit result.

The difference is from compression and is smaller than using fetchgit whose output in the store is nearly 3 times larger. Using tarballs as the source is preferable over space and performance reasons.

@jian-lin
Copy link
Contributor

Using tarballs as the source is preferable over space and performance reasons.

Many people prefer not using release tarballs due to the XZ incident. I am not aware of the policy about this in Nixpkgs though.

@ghost
Copy link
Author

ghost commented Aug 24, 2025

I'm not aware of any such policy in nixpkgs as a whole but I still believe you've brought up a valid concern, however, quoting #409110 (review) mirrors have their own advantages over just fetching from git.

I don't think planning for XZ style attacks would be fruitful since I believe the main crux of XZ is that upstream was already compromised with a malicious actor who took control rather than being just about the delivery mechanism. A similar attack could just be done by compromising Savannah's cgit instance or the old fashioned merging bad commits.

Emacs (hopefully) isn't in the state XZ was in where this could happen undetected.

@AndersonTorres
Copy link
Member

I do not think a snapshot from cgit has been pre-compiled. Compared to the tarball from the mirror, there is no .elc files in the tarball.

As far as I remember, a long time ago a change in some internal subroutine of Git modified the checksums of resulting artifacts, causing a noticeable hullabaloo:

https://github.blog/open-source/git/update-on-the-future-stability-of-source-code-archives-and-hashes/

This is not the same as "injecting a backdoor after two years building trust", but it still qualifies as "another thing affecting the source provenance".

Nonetheless, as I said before, this will not affect the current state of things.

@ghost ghost force-pushed the emacs-use-mirror branch from 029d3ec to abdaad0 Compare August 24, 2025 21:14
Copy link
Contributor

@jian-lin jian-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I will try to find some time to test it later.

@ghost ghost force-pushed the emacs-use-mirror branch from abdaad0 to a019344 Compare August 24, 2025 22:36
@ghost
Copy link
Author

ghost commented Aug 25, 2025

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 436020
Commit: a019344338d84d8e6a79ab0a5a1ede443234e331 (subsequent changes)
Merge: 4ebe298cc46024d29262d73138a0c936e6ab9d9f

Logs: https://github.com/normalcea/nixpkgs-review-gha/actions/runs/17194670225


x86_64-linux

❌ 3 packages failed to build:
  • haskellPackages.trexio-hs
  • meli
  • mozart2
✅ 91 packages built:
  • aerc
  • afew
  • afew.dist
  • afew.doc
  • afew.man
  • agda (agdaPackages.agda)
  • agdaPackages._1lab
  • agdaPackages.agda-categories
  • agdaPackages.agda-prelude
  • agdaPackages.cubical
  • agdaPackages.cubical-mini
  • agdaPackages.functional-linear-algebra
  • agdaPackages.generics
  • agdaPackages.standard-library
  • alot
  • alot.dist
  • astroid
  • auctex
  • auctex.tex
  • cflow
  • cscope
  • easycrypt
  • emacs (emacs30)
  • emacs-gtk (emacs30-gtk3)
  • emacs-lsp-booster
  • emacs-nox (emacs30-nox)
  • emacs-pgtk (emacs30-pgtk)
  • emacspeak
  • framac
  • haskellPackages.Agda
  • haskellPackages.Agda.bin
  • haskellPackages.Agda.data
  • haskellPackages.Agda.doc
  • haskellPackages.agda2hs
  • haskellPackages.agda2hs.data
  • haskellPackages.agda2hs.doc
  • haskellPackages.notmuch
  • haskellPackages.notmuch.doc
  • idutils
  • knot-dns
  • knot-dns.bin
  • knot-dns.dev
  • knot-resolver
  • knot-resolver.dev
  • lbdb
  • lieer
  • lieer.dist
  • mu
  • mu.mu4e
  • muchsync
  • mujmap
  • neomutt
  • notifymuch
  • notifymuch.dist
  • notmuch
  • notmuch-addrlookup
  • notmuch-mailmover
  • notmuch.bindingconfig
  • notmuch.emacs
  • notmuch.info
  • notmuch.man
  • notmuch.vim (vimPlugins.notmuch-vim, vimPlugins.notmuch-vim.bindingconfig, vimPlugins.notmuch-vim.emacs, vimPlugins.notmuch-vim.info, vimPlugins.notmuch-vim.man, vimPlugins.notmuch-vim.vim)
  • ovn
  • prometheus-knot-exporter
  • prometheus-knot-exporter.dist
  • pycflow2dot (python313Packages.pycflow2dot)
  • pycflow2dot.dist (python313Packages.pycflow2dot.dist)
  • python312Packages.libknot
  • python312Packages.libknot.dist
  • python312Packages.notmuch
  • python312Packages.notmuch.dist
  • python312Packages.notmuch2
  • python312Packages.notmuch2.dist
  • python312Packages.pycflow2dot
  • python312Packages.pycflow2dot.dist
  • python313Packages.libknot
  • python313Packages.libknot.dist
  • python313Packages.notmuch
  • python313Packages.notmuch.dist
  • python313Packages.notmuch2
  • python313Packages.notmuch2.dist
  • rtags
  • supercollider_scel
  • trexio
  • trexio.dev
  • tuntox
  • vpp
  • why3
  • why3.dev
  • xdp-tools
  • xdp-tools.lib

Error logs: `x86_64-linux`
haskellPackages.trexio-hs
      amplitude.single:          OK (1.38s)
          ✓ <interactive> passed 100 tests.
  3D
    Sparse
      mo_2e_int.eri_lr_cholesky: OK (25.92s)
          ✓ <interactive> passed 100 tests.
  4D
    mo_2e_int.eri:               OK (24.45s)
        ✓ <interactive> passed 100 tests.
  6D
    amplitude.triple:            OK (29.20s)
        ✓ <interactive> passed 100 tests.
  8D
    amplitude.quadruple:         OK (37.21s)
        ✓ <interactive> passed 100 tests.

3 out of 15 tests failed (120.66s)
Test suite trexio-test: FAIL
Test suite logged to: dist/test/trexio-hs-0.1.0-trexio-test.log
0 of 1 test suites (0 of 1 test cases) passed.

meli
    |                                                                                ++++

warning: meli (lib) generated 4 warnings
warning: melib (test "imap") generated 2 warnings
warning: melib (lib test) generated 58 warnings (58 duplicates)
warning: meli (lib test) generated 4 warnings (4 duplicates)
Finished release profile [optimized] target(s) in 16m 34s
Running unittests src/lib.rs (target/x86_64-unknown-linux-gnu/release/deps/meli-9c53b3ee2b734856)

running 50 tests
test command::tests::test_command_error_display ... ok
test command::tests::test_command_parser ... ok
test command::tests::test_command_parser_interactive ... ignored
test command::tests::test_command_parser_all ... ok
test accounts::tests::test_mailbox_utf7 ... ok
test conf::tests::test_conf_progress_spinner_sequence ... ok
error: test failed, to rerun pass -p meli --lib

Caused by:
process didn't exit successfully: /build/source/target/x86_64-unknown-linux-gnu/release/deps/meli-9c53b3ee2b734856 --skip=test_cli_subcommands (signal: 11, SIGSEGV: invalid memory reference)


aarch64-linux

❌ 3 packages failed to build:
  • haskellPackages.trexio-hs
  • meli
  • mozart2
✅ 91 packages built:
  • aerc
  • afew
  • afew.dist
  • afew.doc
  • afew.man
  • agda (agdaPackages.agda)
  • agdaPackages._1lab
  • agdaPackages.agda-categories
  • agdaPackages.agda-prelude
  • agdaPackages.cubical
  • agdaPackages.cubical-mini
  • agdaPackages.functional-linear-algebra
  • agdaPackages.generics
  • agdaPackages.standard-library
  • alot
  • alot.dist
  • astroid
  • auctex
  • auctex.tex
  • cflow
  • cscope
  • easycrypt
  • emacs (emacs30)
  • emacs-gtk (emacs30-gtk3)
  • emacs-lsp-booster
  • emacs-nox (emacs30-nox)
  • emacs-pgtk (emacs30-pgtk)
  • emacspeak
  • framac
  • haskellPackages.Agda
  • haskellPackages.Agda.bin
  • haskellPackages.Agda.data
  • haskellPackages.Agda.doc
  • haskellPackages.agda2hs
  • haskellPackages.agda2hs.data
  • haskellPackages.agda2hs.doc
  • haskellPackages.notmuch
  • haskellPackages.notmuch.doc
  • idutils
  • knot-dns
  • knot-dns.bin
  • knot-dns.dev
  • knot-resolver
  • knot-resolver.dev
  • lbdb
  • lieer
  • lieer.dist
  • mu
  • mu.mu4e
  • muchsync
  • mujmap
  • neomutt
  • notifymuch
  • notifymuch.dist
  • notmuch
  • notmuch-addrlookup
  • notmuch-mailmover
  • notmuch.bindingconfig
  • notmuch.emacs
  • notmuch.info
  • notmuch.man
  • notmuch.vim (vimPlugins.notmuch-vim, vimPlugins.notmuch-vim.bindingconfig, vimPlugins.notmuch-vim.emacs, vimPlugins.notmuch-vim.info, vimPlugins.notmuch-vim.man, vimPlugins.notmuch-vim.vim)
  • ovn
  • prometheus-knot-exporter
  • prometheus-knot-exporter.dist
  • pycflow2dot (python313Packages.pycflow2dot)
  • pycflow2dot.dist (python313Packages.pycflow2dot.dist)
  • python312Packages.libknot
  • python312Packages.libknot.dist
  • python312Packages.notmuch
  • python312Packages.notmuch.dist
  • python312Packages.notmuch2
  • python312Packages.notmuch2.dist
  • python312Packages.pycflow2dot
  • python312Packages.pycflow2dot.dist
  • python313Packages.libknot
  • python313Packages.libknot.dist
  • python313Packages.notmuch
  • python313Packages.notmuch.dist
  • python313Packages.notmuch2
  • python313Packages.notmuch2.dist
  • rtags
  • supercollider_scel
  • trexio
  • trexio.dev
  • tuntox
  • vpp
  • why3
  • why3.dev
  • xdp-tools
  • xdp-tools.lib

Error logs: `aarch64-linux`
haskellPackages.trexio-hs
      amplitude.single:          OK (0.48s)
          ✓ <interactive> passed 100 tests.
  3D
    Sparse
      mo_2e_int.eri_lr_cholesky: OK (14.90s)
          ✓ <interactive> passed 100 tests.
  4D
    mo_2e_int.eri:               OK (15.54s)
        ✓ <interactive> passed 100 tests.
  6D
    amplitude.triple:            OK (18.26s)
        ✓ <interactive> passed 100 tests.
  8D
    amplitude.quadruple:         OK (15.22s)
        ✓ <interactive> passed 100 tests.

3 out of 15 tests failed (66.22s)
Test suite trexio-test: FAIL
Test suite logged to: dist/test/trexio-hs-0.1.0-trexio-test.log
0 of 1 test suites (0 of 1 test cases) passed.

meli
154 |         fn as_body_peek_references(&self) -> imap_types::fetch::MessageDataItem<'_> {
    |                                                                                ++++

warning: melib (test "imap") generated 2 warnings
warning: meli (lib test) generated 4 warnings (4 duplicates)
Finished release profile [optimized] target(s) in 13m 36s
Running unittests src/lib.rs (target/aarch64-unknown-linux-gnu/release/deps/meli-d9ab812e9bfb1261)

running 50 tests
test accounts::tests::test_mailbox_utf7 ... ok
test command::tests::test_command_error_display ... ok
test command::tests::test_command_parser ... ok
test command::tests::test_command_parser_interactive ... ignored
test conf::tests::test_conf_progress_spinner_sequence ... ok
test command::tests::test_command_parser_all ... ok
test conf::tests::test_conf_theme_parsing ... ok
error: test failed, to rerun pass -p meli --lib

Caused by:
process didn't exit successfully: /build/source/target/aarch64-unknown-linux-gnu/release/deps/meli-d9ab812e9bfb1261 --skip=test_cli_subcommands (signal: 11, SIGSEGV: invalid memory reference)


x86_64-darwin (sandbox = true)

❌ 65 packages failed to build:
  • aerc
  • afew
  • afew.dist
  • afew.doc
  • afew.man
  • agda (agdaPackages.agda)
  • agdaPackages._1lab
  • agdaPackages.agda-categories
  • agdaPackages.agda-prelude
  • agdaPackages.cubical
  • agdaPackages.cubical-mini
  • agdaPackages.functional-linear-algebra
  • agdaPackages.generics
  • agdaPackages.standard-library
  • easycrypt
  • emacs-pgtk (emacs30-pgtk)
  • framac
  • haskellPackages.Agda
  • haskellPackages.Agda.bin
  • haskellPackages.Agda.data
  • haskellPackages.Agda.doc
  • haskellPackages.agda2hs
  • haskellPackages.agda2hs.data
  • haskellPackages.agda2hs.doc
  • haskellPackages.notmuch
  • haskellPackages.notmuch.doc
  • haskellPackages.trexio-hs
  • lbdb
  • lieer
  • lieer.dist
  • meli
  • mu
  • mu.mu4e
  • muchsync
  • mujmap
  • neomutt
  • notifymuch
  • notifymuch.dist
  • notmuch
  • notmuch-addrlookup
  • notmuch-mailmover
  • notmuch.bindingconfig
  • notmuch.emacs
  • notmuch.info
  • notmuch.man
  • notmuch.vim (vimPlugins.notmuch-vim, vimPlugins.notmuch-vim.bindingconfig, vimPlugins.notmuch-vim.emacs, vimPlugins.notmuch-vim.info, vimPlugins.notmuch-vim.man, vimPlugins.notmuch-vim.vim)
  • pycflow2dot (python313Packages.pycflow2dot)
  • pycflow2dot.dist (python313Packages.pycflow2dot.dist)
  • python312Packages.notmuch
  • python312Packages.notmuch.dist
  • python312Packages.notmuch2
  • python312Packages.notmuch2.dist
  • python312Packages.pycflow2dot
  • python312Packages.pycflow2dot.dist
  • python313Packages.notmuch
  • python313Packages.notmuch.dist
  • python313Packages.notmuch2
  • python313Packages.notmuch2.dist
  • rtags
  • trexio
  • trexio.dev
  • tuntox
  • vimacs
  • why3
  • why3.dev
✅ 9 packages built:
  • auctex
  • auctex.tex
  • cflow
  • cscope
  • emacs (emacs30)
  • emacs-gtk (emacs30-gtk3)
  • emacs-lsp-booster
  • emacs-macport (emacs29-macport)
  • emacs-nox (emacs30-nox)

Error logs: `x86_64-darwin`
emacs-pgtk
umask 022 && /nix/store/4419xj3qgn8ir8qigdk5vmbf2gfkfa8x-coreutils-9.7/bin/mkdir -p "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/bin"
for file in etags ctags emacsclient  ebrowse ; do \
  /nix/store/4419xj3qgn8ir8qigdk5vmbf2gfkfa8x-coreutils-9.7/bin/install -c  ${file} \
    "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/bin"/` \
      echo ${file} | sed -e 's/$//' -e 's,x,x,' \
    ` || exit; \
done
make[1]: Leaving directory '/nix/build/nix-build-emacs-pgtk-30.2.drv-9946-1975521200/emacs-30.2/lib-src'
/nix/store/4419xj3qgn8ir8qigdk5vmbf2gfkfa8x-coreutils-9.7/bin/install -c  src/emacs "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/bin/`echo emacs-30.2 | sed 's,x,x,'`"
/nix/store/4419xj3qgn8ir8qigdk5vmbf2gfkfa8x-coreutils-9.7/bin/install -c -m 644 src/emacs.pdmp "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/libexec/emacs/30.2/x86_64-apple-darwin23.6.0"/emacs-`./src/emacs --fingerprint`.pdmp
chmod 755 "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/bin/`echo emacs-30.2 | sed 's,x,x,'`"
rm -f "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/bin/`echo emacs | sed 's,x,x,'`"
cd "/nix/store/zzm9mjp9z8w1ssdmnr6abh90bl3axc23-emacs-pgtk-30.2/bin" && ln -s "`echo emacs-30.2 | sed 's,x,x,'`" "`echo emacs | sed 's,x,x,'`"
Generating native-compiled trampolines...
 Warning: ‘string-make-multibyte’ is an obsolete function (as of 26.1); use ‘decode-coding-string’.
 Warning: ‘invocation-name’ is an obsolete function (as of 27.1); use the variable of the same name.
 Warning: ‘invocation-directory’ is an obsolete function (as of 27.1); use the variable of the same name.
 Warning: ‘run-window-configuration-change-hook’ is an obsolete function (as of 27.1).
 Warning: ‘string-as-unibyte’ is an obsolete function (as of 26.1); use ‘encode-coding-string’.
 Warning: ‘string-as-multibyte’ is an obsolete function (as of 26.1); use ‘decode-coding-string’.
haskellPackages.Agda
	- Agda.Interaction.BasicOps.D:R:ConOfAbsOutputConstraint_boot
	- Agda.Interaction.BasicOps.D:R:ConOfAbsOutputForm_boot
	- Agda.Interaction.BasicOps.D:R:ReifiesToConstraint
	- Agda.Interaction.BasicOps.D:R:ReifiesToProblemConstraint
Warning: Agda.Mimer.Mimer: could not find link destinations for: 
	- Agda.Mimer.Mimer.Rep_MimerResult
Warning: Agda.Interaction.Imports: could not find link destinations for: 
	- Agda.Interaction.Imports.MainInterface
Warning: Agda.Compiler.MAlonzo.HaskellTypes: could not find link destinations for: 
	- Agda.Compiler.MAlonzo.HaskellTypes.PolyApprox
Warning: Agda.Compiler.Backend: could not find link destinations for: 
	- Agda.Compiler.Backend.compilerMain
Warning: Agda.Interaction.Highlighting.LaTeX.Base: could not find link destinations for: 
	- Agda.Interaction.Highlighting.LaTeX.Base.Debug
Warning: Agda.Interaction.Highlighting.HTML.Base: could not find link destinations for: 
	- Agda.Interaction.Highlighting.HTML.Base.HtmlLogAction
	- Agda.Interaction.Highlighting.HTML.Base.HtmlInputSourceFile
	- Agda.Interaction.Highlighting.HTML.Base.Rep_HtmlHighlight
Warning: Agda.Compiler.JS.Compiler: could not find link destinations for: 
	- Agda.Compiler.JS.Compiler.Rep_JSOptions

aarch64-darwin (sandbox = true)

❌ 54 packages failed to build:
  • aerc
  • afew
  • afew.dist
  • afew.doc
  • afew.man
  • agdaPackages.agda-categories
  • agdaPackages.cubical
  • agdaPackages.cubical-mini
  • agdaPackages.functional-linear-algebra
  • agdaPackages.generics
  • agdaPackages.standard-library
  • easycrypt
  • framac
  • haskellPackages.notmuch
  • haskellPackages.notmuch.doc
  • haskellPackages.trexio-hs
  • lbdb
  • lieer
  • lieer.dist
  • meli
  • mu
  • mu.mu4e
  • muchsync
  • mujmap
  • neomutt
  • notifymuch
  • notifymuch.dist
  • notmuch
  • notmuch-addrlookup
  • notmuch-mailmover
  • notmuch.bindingconfig
  • notmuch.emacs
  • notmuch.info
  • notmuch.man
  • notmuch.vim (vimPlugins.notmuch-vim, vimPlugins.notmuch-vim.bindingconfig, vimPlugins.notmuch-vim.emacs, vimPlugins.notmuch-vim.info, vimPlugins.notmuch-vim.man, vimPlugins.notmuch-vim.vim)
  • pycflow2dot (python313Packages.pycflow2dot)
  • pycflow2dot.dist (python313Packages.pycflow2dot.dist)
  • python312Packages.notmuch
  • python312Packages.notmuch.dist
  • python312Packages.notmuch2
  • python312Packages.notmuch2.dist
  • python312Packages.pycflow2dot
  • python312Packages.pycflow2dot.dist
  • python313Packages.notmuch
  • python313Packages.notmuch.dist
  • python313Packages.notmuch2
  • python313Packages.notmuch2.dist
  • rtags
  • trexio
  • trexio.dev
  • tuntox
  • vimacs
  • why3
  • why3.dev
✅ 20 packages built:
  • agda (agdaPackages.agda)
  • agdaPackages._1lab
  • agdaPackages.agda-prelude
  • auctex
  • auctex.tex
  • cflow
  • cscope
  • emacs (emacs30)
  • emacs-gtk (emacs30-gtk3)
  • emacs-lsp-booster
  • emacs-macport (emacs29-macport)
  • emacs-nox (emacs30-nox)
  • emacs-pgtk (emacs30-pgtk)
  • haskellPackages.Agda
  • haskellPackages.Agda.bin
  • haskellPackages.Agda.data
  • haskellPackages.Agda.doc
  • haskellPackages.agda2hs
  • haskellPackages.agda2hs.data
  • haskellPackages.agda2hs.doc

Error logs: `aarch64-darwin`
agdaPackages.cubical
  Checking Cubical.Homotopy.EilenbergMacLane.WedgeConnectivity (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergMacLane/WedgeConnectivity.agda).
 Checking Cubical.Homotopy.EilenbergMacLane.Properties (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergMacLane/Properties.agda).
 Checking Cubical.Homotopy.EilenbergMacLane.Order2 (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergMacLane/Order2.agda).
  Checking Cubical.Homotopy.EilenbergMacLane.CupProduct (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergMacLane/CupProduct.agda).
   Checking Cubical.Homotopy.EilenbergMacLane.CupProductTensor (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergMacLane/CupProductTensor.agda).
   Checking Cubical.Homotopy.EilenbergMacLane.GradedCommTensor (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergMacLane/GradedCommTensor.agda).
Checking Cubical.Cohomology.EilenbergMacLane.CupProduct (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Cohomology/EilenbergMacLane/CupProduct.agda).
Checking Cubical.Cohomology.EilenbergMacLane.EilenbergSteenrod (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Cohomology/EilenbergMacLane/EilenbergSteenrod.agda).
 Checking Cubical.Homotopy.EilenbergSteenrod (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Homotopy/EilenbergSteenrod.agda).
Checking Cubical.Cohomology.EilenbergMacLane.Groups.Connected (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Cohomology/EilenbergMacLane/Groups/Connected.agda).
Checking Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Cohomology/EilenbergMacLane/Groups/KleinBottle.agda).
 Checking Cubical.Cohomology.EilenbergMacLane.Groups.RP2 (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Cohomology/EilenbergMacLane/Groups/RP2.agda).
  Checking Cubical.HITs.RPn (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/HITs/RPn.agda).
   Checking Cubical.HITs.RPn.Base (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/HITs/RPn/Base.agda).
    Checking Cubical.Functions.Bundle (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Functions/Bundle.agda).
     Checking Cubical.Structures.TypeEqvTo (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/Structures/TypeEqvTo.agda).
    Checking Cubical.HITs.Pushout.Flattening (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/HITs/Pushout/Flattening.agda).
 Checking Cubical.HITs.KleinBottle (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/HITs/KleinBottle.agda).
  Checking Cubical.HITs.KleinBottle.Base (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/HITs/KleinBottle/Base.agda).
  Checking Cubical.HITs.KleinBottle.Properties (/nix/build/nix-build-cubical-0.9.drv-8366-2361234643/source/Cubical/HITs/KleinBottle/Properties.agda).
agdaPackages.cubical-mini
     Checking Data.Reflects.Path (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/Reflects/Path.agda).
   Checking Data.List.Membership (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/List/Membership.agda).
    Checking Data.List.Correspondences.Unary.All (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/List/Correspondences/Unary/All.agda).
  Checking Combinatorics.Power (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Combinatorics/Power.agda).
   Checking Combinatorics.Power.Decidable (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Combinatorics/Power/Decidable.agda).
    Checking Data.Bool (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/Bool.agda).
     Checking Data.Bool.Properties (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/Bool/Properties.agda).
      Checking Data.Bool.Instances.Finite (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/Bool/Instances/Finite.agda).
     Checking Data.Bool.Instances.Everything (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/Bool/Instances/Everything.agda).
      Checking Data.Bool.Instances.Show (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Data/Bool/Instances/Show.agda).
 Checking Homotopy.Everything (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Homotopy/Everything.agda).
  Checking Homotopy.Connectedness (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Homotopy/Connectedness.agda).
  Checking Homotopy.Space.Circle (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Homotopy/Space/Circle.agda).
 Checking Cat.Everything (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Cat/Everything.agda).
  Checking Cat.Base (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Cat/Base.agda).
  Checking Cat.Constructions.Delooping (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Cat/Constructions/Delooping.agda).
   Checking Algebra.Monoid (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Algebra/Monoid.agda).
    Checking Cat.Prelude (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Cat/Prelude.agda).
     Checking Cat.Functor.Base (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Cat/Functor/Base.agda).
     Checking Cat.NT (/nix/build/nix-build-cubical-mini-0.5-unstable-2025-06-13.drv-8366-2361234644/source/src/Cat/NT.agda).

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Aug 25, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 25, 2025
@philiptaron philiptaron merged commit 2e70275 into NixOS:master Aug 26, 2025
33 of 35 checks passed
@tadfisher
Copy link
Contributor

This hit nixos-unstable and broke emacs-overlay.

Can we please coordinate these changes a bit better? This is far from the first time I've had to pin nixpkgs because of a minor build improvement to the emacs derivation.

@philiptaron
Copy link
Contributor

Quoting from @emilazy's excellent essay on the matter:

I want to strongly push back on the idea that maintainers of dependencies can reasonably be expected to be responsible for their downstream closures.

especially if any of them happen to poke directly into internals in a way that the upstream maintainer may not even have been aware of.

I think the coordination here of being broken and being fixed is acceptable. Nixpkgs needs to be able to evolve. The mitigation you have available (pin the previous version until you make the appropriate fix in the overlay) is a great tradeoff that enables these sorts of changes.

@jian-lin
Copy link
Contributor

jian-lin commented Aug 27, 2025

@tadfisher

Can we please coordinate these changes a bit better? This is far from the first time I've had to pin nixpkgs because of a minor build improvement to the emacs derivation.

Thanks for the reminder and sorry for the inconvenience. I have kept and will keep emacs-overlay in mind when changing Emacs in Nixpkgs.

I did notice that this would break emacs-overlay after the merge. But I do not have enough time recently for a fix.

@normalcea Could you PR a fix in Nixpkgs? The issue of this PR is that it should not touch srcRepo. It should only change the default value of srcRepo from true to false.

@philiptaron

I agree with emilazy's quote in general but I do not think that quote applies here because active maintainers of emacs-overlay (adisbladis and myself) are maintainers of Emacs in Nixpkgs. We know both parts. We want to keep emacs-overlay free of breakage due to changes of Emacs in Nixpkgs (though I fail sometimes 😅).


BTW, I do find the "quick" merge a bit surprising. I said that I wanted to (have another look and) do some tests when I have more time in my preliminary review. Then before I found time to do so, this PR was merged.

To be clear, I do not think this surprise is others' fault. I think it is my fault of not using GitHub's "Request changes" review type to express my intention more clearly. (So I posted a "Request changes" review in another similar PR right after the merge of this PR.)

@philiptaron
Copy link
Contributor

I'm happy to take the feedback. Thanks for the context. I do look for ❌ as a strong signal both of "wait" and for why that waiting is encouraged.

I would push back on a norm of waiting more than a few days absent an ❌, and my merge came after I saw two maintainers say "LGTM" and waiting some more after that. 🙂

@jian-lin
Copy link
Contributor

I made a fix in #437637

@tadfisher
Copy link
Contributor

@philiptaron

I think the coordination here of being broken and being fixed is acceptable. Nixpkgs needs to be able to evolve. The mitigation you have available (pin the previous version until you make the appropriate fix in the overlay) is a great tradeoff that enables these sorts of changes.

I think this is reasonable when downstream consumers are unknown. I don't think it's something we should encourage when the downstream consumer is a widely-used nix-community project. Nixpkgs can still evolve, but we should, at the very least, stage changes in dependent projects which we own before making breaking changes.

@philiptaron
Copy link
Contributor

philiptaron commented Aug 27, 2025

I'll definitely pay closer attention to non-package parts of the interface like srcRepo in the future.

With regard to things being in nix-community, a large section of even highly-active users don't know about them. (Me 😬).

Is there any way to note down in the derivation itself or close by -- so that a reviewer on the PR would see -- that this parameter is overridden there? That seems like a cheap way of making it easier to not break these projects.

Being human, I know that "just know about it" never works.

@jian-lin
Copy link
Contributor

jian-lin commented Aug 27, 2025

I want to highlight that emacs-overlay is not just a random popular downstream project. It is created by one Nixpkgs Emacs maintainer (adisbladis), maintained by some Nixpkgs Emacs maintainers (adisbladis and myself) and used by many Nix Emacs users. It is an important piece of Nix Emacs. Since there are same maintainers of both parts, I think we can, should and will do better in coordinating Emacs changes.


Is there any way to note down in the derivation itself or close by -- so that a reviewer on the PR would see -- that this parameter is overridden there? That seems like a cheap way of making it easier to not break these projects.

It is not that cheap. emacs-overlay tightly couples with Emacs ecosystem in Nixpkgs, including not only emacs itself, but also Emacs lisp package set infra.

The good news is that CI will request Emacs team for review for almost every Emacs-related PR.

@ghost
Copy link
Author

ghost commented Aug 29, 2025

That is unfortunate and not my intention with any of these changes. I did note that downstreams could be negatively affected by this change but didn't realize the extent in which emacs-overlay was entwined with nixpkgs (which is why I opted for not removing the savannah fetcher codepath and just placed it behind a warning but now I realize the Emacs derivation itself was an interface).

The removal of srcRepo was done because it was a redundant package argument considering it's ideal to remove the .git portion of the source in the fetch phase and not in any of the package build phases. Though in the future I'll make sure to note removing named package arguments as a breaking change.

edit:

I also agree with the idea that nixpkgs downstream consumers shouldn't expect package API (as in the derivation) compatibility especially when tracking the unstable branch of nixpkgs. Users that want this promise should use the stable branches of nixpkgs. Downstream nix projects should ideally maintain a stable and unstable edition of their projects or make it clear which nixpkgs they track.

@ghost ghost deleted the emacs-use-mirror branch August 29, 2025 14:03
@jian-lin
Copy link
Contributor

The removal of srcRepo was done because it was a redundant package argument

To be precise, srcRepo is not redundant and removing it (as is done by this PR) adds autoreconfHook and texinfo to nativeBuildInputs.

When src is release tarballs, autoreconfHook and texinfo are not needed. Adding autoreconfHook runs an extra hook which is also not needed.

So removing srcRepo does change the build process. Whether the built result is affected is another issue of its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants