emacs: replace fetchFromSavannah with mirror

This commit re-apply a019344338 with
fixes and minor improvements.

Refs: #427024 #435964
Co-authored-by: Lin Jian <me@linj.tech>
This commit is contained in:
Jasi
2025-08-28 03:33:28 +08:00
committed by Lin Jian
co-authored by Lin Jian
parent 69bda6c84d
commit 4a2ad8134b
3 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ lib.makeScope pkgs.newScope (
inherit lib;
inherit (pkgs)
fetchFromBitbucket
fetchFromSavannah
fetchzip
;
};
@@ -69,7 +69,7 @@
# Boolean flags
withNativeCompilation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
noGui ? false,
srcRepo ? true,
srcRepo ? false,
withAcl ? false,
withAlsaLib ? false,
withAthena ? false,
@@ -204,6 +204,11 @@ mkDerivation (finalAttrs: {
rm -fr .git
'')
# See: https://github.com/NixOS/nixpkgs/issues/170426
(lib.optionalString (!srcRepo) ''
find . -type f \( -name "*.elc" -o -name "*loaddefs.el" \) -exec rm {} \;
'')
# Add the name of the wrapped gvfsd
# This used to be carried as a patch but it often got out of sync with
# upstream and was hard to maintain for emacs-overlay.
+6 -6
View File
@@ -1,7 +1,7 @@
{
lib,
fetchFromBitbucket,
fetchFromSavannah,
fetchzip,
}:
let
@@ -26,9 +26,9 @@ let
src =
{
"mainline" = (
fetchFromSavannah {
repo = "emacs";
inherit rev hash;
fetchzip {
url = "mirror://gnu/emacs/${rev}.tar.xz";
inherit hash;
}
);
"macport" = (
@@ -107,8 +107,8 @@ in
pname = "emacs";
version = "30.2";
variant = "mainline";
rev = "30.2";
hash = "sha256-3Lfb3HqdlXqSnwJfxe7npa4GGR9djldy8bKRpkQCdSA=";
rev = "emacs-30.2";
hash = "sha256-W2eZ+cNQhi/fMeRkwOqSKU7Vzvp43WUOpiwaLLNEXtg=";
patches = fetchpatch: [
(builtins.path {
name = "inhibit-lexical-cookie-warning-67916.patch";