diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix index cc604b222f32e..e36142b300dd7 100644 --- a/pkgs/applications/editors/emacs/default.nix +++ b/pkgs/applications/editors/emacs/default.nix @@ -13,7 +13,7 @@ lib.makeScope pkgs.newScope ( inherit lib; inherit (pkgs) fetchFromBitbucket - fetchFromSavannah + fetchurl ; }; diff --git a/pkgs/applications/editors/emacs/make-emacs.nix b/pkgs/applications/editors/emacs/make-emacs.nix index e088d9610b707..be728c1a3a1a7 100644 --- a/pkgs/applications/editors/emacs/make-emacs.nix +++ b/pkgs/applications/editors/emacs/make-emacs.nix @@ -69,7 +69,6 @@ # Boolean flags withNativeCompilation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, noGui ? false, - srcRepo ? true, withAcl ? false, withAlsaLib ? false, withAthena ? false, @@ -200,9 +199,11 @@ mkDerivation (finalAttrs: { ]; postPatch = lib.concatStringsSep "\n" [ - (lib.optionalString srcRepo '' - rm -fr .git - '') + + # See: https://github.com/NixOS/nixpkgs/issues/170426 + '' + 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 @@ -247,11 +248,6 @@ mkDerivation (finalAttrs: { nativeBuildInputs = [ makeWrapper pkg-config - ] - ++ lib.optionals (variant == "macport") [ - texinfo - ] - ++ lib.optionals srcRepo [ autoreconfHook texinfo ] diff --git a/pkgs/applications/editors/emacs/sources.nix b/pkgs/applications/editors/emacs/sources.nix index c706d8ecc276a..38864a90e2215 100644 --- a/pkgs/applications/editors/emacs/sources.nix +++ b/pkgs/applications/editors/emacs/sources.nix @@ -1,7 +1,7 @@ { lib, fetchFromBitbucket, - fetchFromSavannah, + fetchurl, }: let @@ -26,9 +26,9 @@ let src = { "mainline" = ( - fetchFromSavannah { - repo = "emacs"; - inherit rev hash; + fetchurl { + url = "mirror://gnu/emacs/emacs-${rev}.tar.xz"; + inherit hash; } ); "macport" = ( @@ -108,7 +108,7 @@ in version = "30.2"; variant = "mainline"; rev = "30.2"; - hash = "sha256-3Lfb3HqdlXqSnwJfxe7npa4GGR9djldy8bKRpkQCdSA="; + hash = "sha256-s/NvGKbdJxVxM3AWYlfeL64B+dOM/oeM7Zsebe1b79k="; patches = fetchpatch: [ (builtins.path { name = "inhibit-lexical-cookie-warning-67916.patch";