emacs: Build from git instead of tarball to fix native compilation

Quoting @collares from #170426:
> The difference between the two versions is that one is built from the
> tarball, while the other is built from Git. The tarball includes
> byte-compiled (.elc) files but not native-compiled (.eln)
> files. The build notices the .elc files and does not rebuild them,
> but native-compilation is a side-effect of byte-compilation and so
> the .eln files aren't built either.
This commit is contained in:
adisbladis 2022-04-27 07:09:19 +12:00
parent a5282b8bfc
commit 54e795706d
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import ./generic.nix (rec { import ./generic.nix (rec {
version = "28.1"; version = "28.1";
sha256 = "sha256-KLGz0JkDegiPCkyiUdfnJi6rXqFneqv/psRCaWGtdeE="; sha256 = "sha256-D33wnlxhx0LyG9WZaQDj2II3tG0HcJdZTC4dSA3lrgY=";
patches = _: [ ]; patches = _: [ ];
}) })

View File

@ -13,6 +13,7 @@
, sigtool, jansson, harfbuzz, sqlite, nixosTests , sigtool, jansson, harfbuzz, sqlite, nixosTests
, dontRecurseIntoAttrs, emacsPackagesFor , dontRecurseIntoAttrs, emacsPackagesFor
, libgccjit, targetPlatform, makeWrapper # native-comp params , libgccjit, targetPlatform, makeWrapper # native-comp params
, fetchFromSavannah
, systemd ? null , systemd ? null
, withX ? !stdenv.isDarwin , withX ? !stdenv.isDarwin
, withNS ? stdenv.isDarwin , withNS ? stdenv.isDarwin
@ -23,7 +24,7 @@
, withSQLite3 ? false , withSQLite3 ? false
, withCsrc ? true , withCsrc ? true
, withWebP ? false , withWebP ? false
, srcRepo ? false, autoreconfHook ? null, texinfo ? null , srcRepo ? true, autoreconfHook ? null, texinfo ? null
, siteStart ? ./site-start.el , siteStart ? ./site-start.el
, nativeComp ? false , nativeComp ? false
, withAthena ? false , withAthena ? false
@ -59,8 +60,9 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
patches = patches fetchpatch; patches = patches fetchpatch;
src = fetchurl { src = fetchFromSavannah {
url = "mirror://gnu/emacs/${name}.tar.xz"; repo = "emacs";
rev = version;
inherit sha256; inherit sha256;
}; };