emacs: replace fetchFromSavannah with mirror (#437637)

This commit is contained in:
Lin Jian
2025-08-28 04:53:25 +08:00
committed by GitHub
3 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ lib.makeScope pkgs.newScope (
inherit lib;
inherit (pkgs)
fetchFromBitbucket
fetchurl
fetchzip
;
};
+11 -2
View File
@@ -69,6 +69,7 @@
# Boolean flags
withNativeCompilation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
noGui ? false,
srcRepo ? false,
withAcl ? false,
withAlsaLib ? false,
withAthena ? false,
@@ -199,11 +200,14 @@ mkDerivation (finalAttrs: {
];
postPatch = lib.concatStringsSep "\n" [
(lib.optionalString srcRepo ''
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
@@ -248,6 +252,11 @@ mkDerivation (finalAttrs: {
nativeBuildInputs = [
makeWrapper
pkg-config
]
++ lib.optionals (variant == "macport") [
texinfo
]
++ lib.optionals srcRepo [
autoreconfHook
texinfo
]
+5 -5
View File
@@ -1,7 +1,7 @@
{
lib,
fetchFromBitbucket,
fetchurl,
fetchzip,
}:
let
@@ -26,8 +26,8 @@ let
src =
{
"mainline" = (
fetchurl {
url = "mirror://gnu/emacs/emacs-${rev}.tar.xz";
fetchzip {
url = "mirror://gnu/emacs/${rev}.tar.xz";
inherit hash;
}
);
@@ -107,8 +107,8 @@ in
pname = "emacs";
version = "30.2";
variant = "mainline";
rev = "30.2";
hash = "sha256-s/NvGKbdJxVxM3AWYlfeL64B+dOM/oeM7Zsebe1b79k=";
rev = "emacs-30.2";
hash = "sha256-W2eZ+cNQhi/fMeRkwOqSKU7Vzvp43WUOpiwaLLNEXtg=";
patches = fetchpatch: [
(builtins.path {
name = "inhibit-lexical-cookie-warning-67916.patch";