emacs: Factor out expression to a generic build
This commit is contained in:
parent
d1fdc67c53
commit
967259e6b4
3 changed files with 19 additions and 11 deletions
8
pkgs/applications/editors/emacs/27.nix
Normal file
8
pkgs/applications/editors/emacs/27.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import ./generic.nix (rec {
|
||||||
|
version = "27.1";
|
||||||
|
sha256 = "0h9f2wpmp6rb5rfwvqwv1ia1nw86h74p7hnz3vb3gjazj67i4k2a";
|
||||||
|
patches = [
|
||||||
|
./clean-env.patch
|
||||||
|
./tramp-detect-wrapped-gvfsd.patch
|
||||||
|
];
|
||||||
|
})
|
|
@ -1,3 +1,11 @@
|
||||||
|
{
|
||||||
|
version
|
||||||
|
, sha256
|
||||||
|
, versionModifier ? ""
|
||||||
|
, pname ? "emacs"
|
||||||
|
, name ? "emacs-${version}${versionModifier}"
|
||||||
|
, patches ? [ ]
|
||||||
|
}:
|
||||||
{ stdenv, lib, fetchurl, fetchpatch, ncurses, xlibsWrapper, libXaw, libXpm
|
{ stdenv, lib, fetchurl, fetchpatch, ncurses, xlibsWrapper, libXaw, libXpm
|
||||||
, Xaw3d, libXcursor, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
, Xaw3d, libXcursor, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
||||||
, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
|
, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
|
||||||
|
@ -32,25 +40,17 @@ assert withXwidgets -> withGTK3 && webkitgtk != null;
|
||||||
|
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "27.1";
|
|
||||||
versionModifier = "";
|
|
||||||
name = "emacs-${version}${versionModifier}";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
inherit name version;
|
inherit pname version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/emacs/${name}.tar.xz";
|
url = "mirror://gnu/emacs/${name}.tar.xz";
|
||||||
sha256 = "0h9f2wpmp6rb5rfwvqwv1ia1nw86h74p7hnz3vb3gjazj67i4k2a";
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
patches = [
|
|
||||||
./clean-env.patch
|
|
||||||
./tramp-detect-wrapped-gvfsd.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = lib.concatStringsSep "\n" [
|
postPatch = lib.concatStringsSep "\n" [
|
||||||
(lib.optionalString srcRepo ''
|
(lib.optionalString srcRepo ''
|
||||||
rm -fr .git
|
rm -fr .git
|
|
@ -19882,7 +19882,7 @@ in
|
||||||
emacsPackages = emacs27Packages;
|
emacsPackages = emacs27Packages;
|
||||||
emacs-nox = emacs27-nox;
|
emacs-nox = emacs27-nox;
|
||||||
|
|
||||||
emacs27 = callPackage ../applications/editors/emacs {
|
emacs27 = callPackage ../applications/editors/emacs/27.nix {
|
||||||
# use override to enable additional features
|
# use override to enable additional features
|
||||||
libXaw = xorg.libXaw;
|
libXaw = xorg.libXaw;
|
||||||
Xaw3d = null;
|
Xaw3d = null;
|
||||||
|
|
Loading…
Reference in a new issue