Skip to content

emacsPackages.ws-butler: avoid fetchFromSavannah#477666

Merged
jian-lin merged 1 commit intoNixOS:masterfrom
dschrempf:ws-butler
Jan 8, 2026
Merged

emacsPackages.ws-butler: avoid fetchFromSavannah#477666
jian-lin merged 1 commit intoNixOS:masterfrom
dschrempf:ws-butler

Conversation

@dschrempf
Copy link
Contributor

@dschrempf dschrempf commented Jan 7, 2026

Avoid usage of fetchFromSavannah for ws-butler. (Simply remove the override; this works for me).

This may fix #436534, although I am not sure if it resolves the root cause of the issue.

@jian-lin @normalcea

Should we remove fetchFromSavannah altogether? It is not used anymore after this PR (but may be used downstream).

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.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: emacs Text editor labels Jan 7, 2026
Comment on lines 1767 to 1773
ws-butler = super.ws-butler.overrideAttrs (old: {
# work around https://github.com/NixOS/nixpkgs/issues/436534
src = pkgs.fetchFromSavannah {
repo = "emacs/nongnu";
inherit (old.src) rev outputHash outputHashAlgo;
};
});
Copy link
Contributor

@jian-lin jian-lin Jan 7, 2026

Choose a reason for hiding this comment

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

This won't work. We need to fix it or use another workaround.

I have the following error to build ws-butler.

It works for you probably because you already have the src FOD in the nix store. If that's true, try to add the --rebuild flag and you'll get the error.

nix build -f . emacs-pgtk.pkgs.ws-butler -L
these 2 derivations will be built:
  /nix/store/7h1cl12ipzf2ri6my2115cgk0yi6q351-nongnu-9ee5a76.drv
  /nix/store/jm5z0pn80zcnbnyc7x6lhhi2xfx7kbwp-emacs-ws-butler-20250310.205.drv
building '/nix/store/7h1cl12ipzf2ri6my2115cgk0yi6q351-nongnu-9ee5a76.drv'...
nongnu> structuredAttrs is enabled
nongnu> exporting https://git.savannah.gnu.org/git/emacs/nongnu.git (rev 9ee5a7657a22e836618813c2e2b64a548d27d2ff) into /nix/store/4cmfwrxnib7bpil5maqm6yk5hr6f6iqg-nongnu-9ee5a76
nongnu> Initialized empty Git repository in /nix/store/4cmfwrxnib7bpil5maqm6yk5hr6f6iqg-nongnu-9ee5a76/.git/
nongnu> error: Server does not allow request for unadvertised object 9ee5a7657a22e836618813c2e2b64a548d27d2ff
nongnu> ERROR: `git fetch' failed.
nongnu> This might be due to the dumb transfer protocol not supporting shallow fetch or no-tag cloning. Trying with `--tags' and without `--depth=1'...
nongnu> remote: Counting objects: 569800, done.
nongnu> remote: Compressing objects: 100% (193314/193314), done.
nongnu> remote: Total 569800 (delta 371837), reused 566055 (delta 368737)
nongnu> Receiving objects: 100% (569800/569800), 413.47 MiB | 9.81 MiB/s, done.
nongnu> Resolving deltas: 100% (371837/371837), done.
nongnu> error: Could not read 2a59ce05bd0a86db1911f07adb942f10b8540614
nongnu> fatal: Failed to traverse parents of commit b1c16e50e93c662a12c49ac8f18b607656238361
nongnu> error: https://git.savannah.gnu.org/git/emacs/nongnu.git did not send all necessary objects
nongnu> Unable to checkout 9ee5a7657a22e836618813c2e2b64a548d27d2ff from https://git.savannah.gnu.org/git/emacs/nongnu.git.

Copy link
Contributor

Choose a reason for hiding this comment

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

It turns out that removing this overrideAttrs and updating its url to the new one https://https.git.savannah.gnu.org/git/elpa/nongnu.git fixes it. So we should update the url in upstream melpa/melpaand the change will reaches Nixpkgs after the next elisp bump. Before that, we can optionally add the following override to update url locally in Nixpkgs. Could you do those two PRs?

          ws-butler = super.ws-butler.overrideAttrs (old: {
            # TODO remove this when not needed
            src = old.src.override {
              url = "https://https.git.savannah.gnu.org/git/elpa/nongnu.git";
            };
          });

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

should be the nongnu one, see melpa/melpa#9366

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's funny because the build works fine for me ...

What is the final take on it? Should we remove the override and fix the URL upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I just saw your comment on why it works for me, but not for others, thanks).

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the final take on it? Should we remove the override and fix the URL upstream?

Yes

@ghost
Copy link

ghost commented Jan 7, 2026

Should we remove fetchFromSavannah altogether? It is not used anymore after this PR (but may be used downstream).

@jian-lin and I met halfway on this and kept fetchFromSavannah in-tree in case downstreams would like to use it, the motivation for removing it completely is if it's not usable anymore which may or may not be the case in the future. Currently it is still usable and is being utilized for MELPA generation.

@jian-lin
Copy link
Contributor

jian-lin commented Jan 7, 2026

Should we remove fetchFromSavannah altogether?

(I wanted to comment on this previously but forgot 😅)

Currently it is still usable

The situation has changed: savannah disabled their cgit snapshot service for many (all?) repos about a month ago. (related nix-community/emacs-overlay#524) So I would not say it is usable as is currently. As a result, now I think we should remove it.

@dschrempf
Copy link
Contributor Author

dschrempf commented Jan 8, 2026

I have removed fetchFromSavannah and updated the release notes. I guess this also merits an entry in the breaking changes Discourse thread. What are your opinions?

I still need to fix the ws-butler derivation as stated above.

@ghost
Copy link

ghost commented Jan 8, 2026

@dschrempf

It wouldn't be good to remove fetchFromSavannah here, this is something handled in a separate PR for organization. The ws-butler fix should be the only thing handled here.

@dschrempf
Copy link
Contributor Author

OK, I can split this up but running out of time. I am not angry if you want to take over.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 8.has: changelog This PR adds or changes release notes 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 8.has: documentation This PR adds or changes documentation and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 8, 2026

fetchFromBitbucket = callPackage ../build-support/fetchbitbucket { };

fetchFromSavannah = callPackage ../build-support/fetchsavannah { };
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

I guess this also merits an entry in the breaking changes Discourse thread. What are your opinions?

I think adding an alias which throws should be enough.

It wouldn't be good to remove fetchFromSavannah here, this is something handled in a separate PR for organization.

I think removing fetchFromSavannah in this PR isn't a big deal, it is acceptable. Of course, doing it in another PR is better.

Comment on lines 1767 to 1773
ws-butler = super.ws-butler.overrideAttrs (old: {
# work around https://github.com/NixOS/nixpkgs/issues/436534
src = pkgs.fetchFromSavannah {
repo = "emacs/nongnu";
inherit (old.src) rev outputHash outputHashAlgo;
};
});
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the final take on it? Should we remove the override and fix the URL upstream?

Yes

@ghost
Copy link

ghost commented Jan 8, 2026

Re: @jian-lin

I think removing fetchFromSavannah in this PR isn't a big deal, it is acceptable. Of course, doing it in another PR is better.

My concern is that we don't have all the facts about savannah organized here and I don't want to bog down this original build fix with discussions on the fetcher. It'd be better to handle the removal in a separate PR so we could consolidate discussion there and get this PR moving without it.

Also @dschrempf mentioned not having time to dedicate to this I presume, so I also want to respect that wish. Much easier to negotiate a build fix than a standard library removal.

@jian-lin
Copy link
Contributor

jian-lin commented Jan 8, 2026

Thanks for the clarification. I agree with you now.

@dschrempf
Copy link
Contributor Author

@normalcea go ahead. If you wish, you can cherry pick the PR removing the fetcher, but no need to to so.

@ghost
Copy link

ghost commented Jan 8, 2026

As an addendum, this PR should be backported, but there's also the question of whether we'd want to backport a future fetchFromSavannah removal since it's not going to be functional in stable and so the question is how to communicate that, something that's going to take up too much time here.

@ghost
Copy link

ghost commented Jan 8, 2026

In that case @dschrempf can you force push removing fetchFromSavannah: remove? I have your patch saved.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 8.has: changelog This PR adds or changes release notes 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) labels Jan 8, 2026
@dschrempf
Copy link
Contributor Author

I have replaced the override with the one fixing the URL. Building works for me, even with --rebuild. I will go ahead and update the URL also on MELPA.

dschrempf added a commit to dschrempf/melpa that referenced this pull request Jan 8, 2026
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, thanks!

src = pkgs.fetchFromSavannah {
repo = "emacs/nongnu";
inherit (old.src) rev outputHash outputHashAlgo;
# TODO: Remove override when URL was updated in MELPA.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we should put the MELPA PR in this comment. But it will be removed in the next elisp bump so not a big deal.

@jian-lin jian-lin added this pull request to the merge queue Jan 8, 2026
Merged via the queue into NixOS:master with commit eda8faa Jan 8, 2026
28 of 32 checks passed
@ghost ghost mentioned this pull request Jan 8, 2026
13 tasks
@jian-lin jian-lin added the backport release-25.11 Backport PR automatically label Jan 9, 2026
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jan 9, 2026

Backport failed for release-25.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.11
git worktree add -d .worktree/backport-477666-to-release-25.11 origin/release-25.11
cd .worktree/backport-477666-to-release-25.11
git switch --create backport-477666-to-release-25.11
git cherry-pick -x efb7f2ae14222a57f3615c44444e222134287655

@AndersonTorres
Copy link
Member

AndersonTorres commented Jan 9, 2026

This issue was fixed in MELPA:

melpa/melpa@37c02f3

Good time to test #473079 by the way :)

@dschrempf dschrempf deleted the ws-butler branch January 13, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. backport release-25.11 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emacs nongnu packages: Nonexisting revision

3 participants