Revert "emacs: replace fetchFromSavannah with mirror; adjust build"

This reverts commit a019344338.

This commit needs some fixes.  Compared to adding fixes, I think it is
more clear and easier to read to revert it first and re-apply this
commit together with fixes as a whole.
This commit is contained in:
Lin Jian
2025-08-28 03:10:09 +08:00
parent 82c1c23046
commit 69bda6c84d
3 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ lib.makeScope pkgs.newScope (
inherit lib;
inherit (pkgs)
fetchFromBitbucket
fetchurl
fetchFromSavannah
;
};
@@ -69,6 +69,7 @@
# Boolean flags
withNativeCompilation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
noGui ? false,
srcRepo ? true,
withAcl ? false,
withAlsaLib ? false,
withAthena ? false,
@@ -199,11 +200,9 @@ mkDerivation (finalAttrs: {
];
postPatch = lib.concatStringsSep "\n" [
# See: https://github.com/NixOS/nixpkgs/issues/170426
''
find . -type f \( -name "*.elc" -o -name "*loaddefs.el" \) -exec rm {} \;
''
(lib.optionalString srcRepo ''
rm -fr .git
'')
# 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 +247,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,
fetchFromSavannah,
}:
let
@@ -26,9 +26,9 @@ let
src =
{
"mainline" = (
fetchurl {
url = "mirror://gnu/emacs/emacs-${rev}.tar.xz";
inherit hash;
fetchFromSavannah {
repo = "emacs";
inherit rev hash;
}
);
"macport" = (
@@ -108,7 +108,7 @@ in
version = "30.2";
variant = "mainline";
rev = "30.2";
hash = "sha256-s/NvGKbdJxVxM3AWYlfeL64B+dOM/oeM7Zsebe1b79k=";
hash = "sha256-3Lfb3HqdlXqSnwJfxe7npa4GGR9djldy8bKRpkQCdSA=";
patches = fetchpatch: [
(builtins.path {
name = "inhibit-lexical-cookie-warning-67916.patch";