Unverified Commit 2e702756 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

emacs: replace `fetchFromSavannah` with mirror; adjust build (#436020)

parents 7d6a5647 a0193443
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ lib.makeScope pkgs.newScope (
      inherit lib;
      inherit (pkgs)
        fetchFromBitbucket
        fetchFromSavannah
        fetchurl
        ;
    };

+5 −9
Original line number Diff line number Diff line
@@ -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
  ]
+5 −5
Original line number Diff line number Diff line
{
  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";