about summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2022-04-27 07:09:19 +1200
committeradisbladis <adisbladis@gmail.com>2022-04-27 07:20:33 +1200
commit54e795706d9fa90004ed1274af639a717f04a2aa (patch)
treea7178ed330dd0f366f3266bc373b73d4c8d6d1e2 /pkgs/applications/editors/emacs
parenta5282b8bfc8ba84ce2f7ec6da470d16f579a1419 (diff)
downloadnixlib-54e795706d9fa90004ed1274af639a717f04a2aa.tar
nixlib-54e795706d9fa90004ed1274af639a717f04a2aa.tar.gz
nixlib-54e795706d9fa90004ed1274af639a717f04a2aa.tar.bz2
nixlib-54e795706d9fa90004ed1274af639a717f04a2aa.tar.lz
nixlib-54e795706d9fa90004ed1274af639a717f04a2aa.tar.xz
nixlib-54e795706d9fa90004ed1274af639a717f04a2aa.tar.zst
nixlib-54e795706d9fa90004ed1274af639a717f04a2aa.zip
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.
Diffstat (limited to 'pkgs/applications/editors/emacs')
-rw-r--r--pkgs/applications/editors/emacs/28.nix2
-rw-r--r--pkgs/applications/editors/emacs/generic.nix8
2 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/applications/editors/emacs/28.nix b/pkgs/applications/editors/emacs/28.nix
index e66917ab93f0..948fa52c0797 100644
--- a/pkgs/applications/editors/emacs/28.nix
+++ b/pkgs/applications/editors/emacs/28.nix
@@ -1,5 +1,5 @@
 import ./generic.nix (rec {
   version = "28.1";
-  sha256 = "sha256-KLGz0JkDegiPCkyiUdfnJi6rXqFneqv/psRCaWGtdeE=";
+  sha256 = "sha256-D33wnlxhx0LyG9WZaQDj2II3tG0HcJdZTC4dSA3lrgY=";
   patches = _: [ ];
 })
diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix
index 637f5b543cb6..b1c8a8d6cc9b 100644
--- a/pkgs/applications/editors/emacs/generic.nix
+++ b/pkgs/applications/editors/emacs/generic.nix
@@ -13,6 +13,7 @@
 , sigtool, jansson, harfbuzz, sqlite, nixosTests
 , dontRecurseIntoAttrs, emacsPackagesFor
 , libgccjit, targetPlatform, makeWrapper # native-comp params
+, fetchFromSavannah
 , systemd ? null
 , withX ? !stdenv.isDarwin
 , withNS ? stdenv.isDarwin
@@ -23,7 +24,7 @@
 , withSQLite3 ? false
 , withCsrc ? true
 , withWebP ? false
-, srcRepo ? false, autoreconfHook ? null, texinfo ? null
+, srcRepo ? true, autoreconfHook ? null, texinfo ? null
 , siteStart ? ./site-start.el
 , nativeComp ? false
 , withAthena ? false
@@ -59,8 +60,9 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
 
   patches = patches fetchpatch;
 
-  src = fetchurl {
-    url = "mirror://gnu/emacs/${name}.tar.xz";
+  src = fetchFromSavannah {
+    repo = "emacs";
+    rev = version;
     inherit sha256;
   };