aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix')
-rw-r--r--nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix117
1 files changed, 46 insertions, 71 deletions
diff --git a/nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix
index 838e57343c4..e15da80b3b1 100644
--- a/nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix
+++ b/nixpkgs/pkgs/applications/editors/emacs-modes/melpa-packages.nix
@@ -16,7 +16,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
dontConfigure = pkg: if pkg != null then pkg.override (args: {
melpaBuild = drv: args.melpaBuild (drv // {
- configureScript = "true";
+ dontConfigure = true;
});
}) else null;
@@ -26,6 +26,17 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
});
}) else null;
+ externalSrc = pkg : epkg : if pkg != null then pkg.override (args : {
+ melpaBuild = drv : args.melpaBuild (drv // {
+ inherit (epkg) src version;
+
+ propagatedUserEnvPkgs = [ epkg ];
+ });
+ }) else null;
+
+ fix-rtags = pkg : if pkg != null then dontConfigure (externalSrc pkg external.rtags)
+ else null;
+
generateMelpa = lib.makeOverridable ({
archiveJson ? ./recipes-archive-melpa.json
}: let
@@ -36,7 +47,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
overrides = rec {
shared = rec {
# Expects bash to be at /bin/bash
- ac-rtags = markBroken super.ac-rtags;
+ ac-rtags = fix-rtags super.ac-rtags;
airline-themes = super.airline-themes.override {
inherit (self.melpaPackages) powerline;
@@ -52,17 +63,11 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
# part of a larger package
caml = dontConfigure super.caml;
- cmake-mode = super.cmake-mode.overrideAttrs (attrs: {
- buildInputs = (attrs.buildInputs or []) ++ [
- external.openssl
- ];
- nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [
- external.pkgconfig
- ];
- });
+ # part of a larger package
+ # upstream issue: missing package version
+ cmake-mode = dontConfigure super.cmake-mode;
- # Expects bash to be at /bin/bash
- company-rtags = markBroken super.company-rtags;
+ company-rtags = fix-rtags super.company-rtags;
easy-kill-extras = super.easy-kill-extras.override {
inherit (self.melpaPackages) easy-kill;
@@ -85,6 +90,15 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
stripDebugList = [ "share" ];
});
+ # https://github.com/syl20bnr/evil-escape/pull/86
+ evil-escape = super.evil-escape.overrideAttrs (attrs: {
+ postPatch = ''
+ substituteInPlace evil-escape.el \
+ --replace ' ;;; evil' ';;; evil'
+ '';
+ packageRequires = with self; [ evil ];
+ });
+
evil-magit = super.evil-magit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
@@ -95,8 +109,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
inherit (self.melpaPackages) ess ctable popup;
};
- # Expects bash to be at /bin/bash
- flycheck-rtags = markBroken super.flycheck-rtags;
+ flycheck-rtags = fix-rtags super.flycheck-rtags;
pdf-tools = super.pdf-tools.overrideAttrs(old: {
nativeBuildInputs = [ external.pkgconfig ];
@@ -110,11 +123,8 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
});
# Build same version as Haskell package
- hindent = super.hindent.overrideAttrs (attrs: {
- version = external.hindent.version;
- src = external.hindent.src;
+ hindent = (externalSrc super.hindent external.hindent).overrideAttrs (attrs: {
packageRequires = [ self.haskell-mode ];
- propagatedUserEnvPkgs = [ external.hindent ];
});
irony = super.irony.overrideAttrs (old: {
@@ -147,8 +157,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
HOME = "/tmp";
});
- # Expects bash to be at /bin/bash
- ivy-rtags = markBroken super.ivy-rtags;
+ ivy-rtags = fix-rtags super.ivy-rtags;
magit = super.magit.overrideAttrs (attrs: {
# searches for Git at build time
@@ -209,6 +218,8 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
# part of a larger package
notmuch = dontConfigure super.notmuch;
+ rtags = dontConfigure (externalSrc super.rtags external.rtags);
+
shm = super.shm.overrideAttrs (attrs: {
propagatedUserEnvPkgs = [ external.structured-haskell-mode ];
});
@@ -277,10 +288,6 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
# upstream issue: missing file header
bufshow = markBroken super.bufshow;
- # part of a larger package
- # upstream issue: missing package version
- cmake-mode = dontConfigure super.cmake-mode;
-
# upstream issue: missing file header
connection = markBroken super.connection;
@@ -308,8 +315,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
# upstream issue: doesn't build
eterm-256color = markBroken super.eterm-256color;
- # Expects bash to be at /bin/bash
- helm-rtags = markBroken super.helm-rtags;
+ helm-rtags = fix-rtags super.helm-rtags;
# upstream issue: missing file header
qiita = markBroken super.qiita;
@@ -353,8 +359,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
- # Expects bash to be at /bin/bash
- helm-rtags = markBroken super.helm-rtags;
+ helm-rtags = fix-rtags super.helm-rtags;
orgit =
(super.orgit.overrideAttrs (attrs: {
@@ -385,52 +390,22 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
- vterm = let
- emacsSources = pkgs.stdenv.mkDerivation {
- name = self.emacs.name + "-sources";
- src = self.emacs.src;
-
- dontConfigure = true;
- dontBuild = true;
- doCheck = false;
- fixupPhase = ":";
-
- installPhase = ''
- mkdir -p $out
- cp -a * $out
- '';
-
- };
-
- libvterm = pkgs.libvterm-neovim.overrideAttrs(old: rec {
- pname = "libvterm-neovim";
- version = "2019-04-27";
- name = pname + "-" + version;
- src = pkgs.fetchFromGitHub {
- owner = "neovim";
- repo = "libvterm";
- rev = "89675ffdda615ffc3f29d1c47a933f4f44183364";
- sha256 = "0l9ixbj516vl41v78fi302ws655xawl7s94gmx1kb3fmfgamqisy";
- };
- });
-
- in pkgs.stdenv.mkDerivation {
- inherit (super.vterm) name version src;
-
- nativeBuildInputs = [ pkgs.cmake ];
- buildInputs = [ self.emacs libvterm ];
-
+ vterm = super.vterm.overrideAttrs(old: {
+ buildInputs = old.buildInputs ++ [ self.emacs pkgs.cmake pkgs.libvterm-neovim ];
cmakeFlags = [
- "-DEMACS_SOURCE=${emacsSources}"
- "-DUSE_SYSTEM_LIBVTERM=True"
+ "-DEMACS_SOURCE=${self.emacs.src}"
+ "-DUSE_SYSTEM_LIBVTERM=ON"
];
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install ../*.el $out/share/emacs/site-lisp
- install ../*.so $out/share/emacs/site-lisp
+ # we need the proper out directory to exist, so we do this in the
+ # postInstall instead of postBuild
+ postInstall = ''
+ pushd source/build >/dev/null
+ make
+ install -m444 -t $out/share/emacs/site-lisp/elpa/vterm-** ../*.so
+ popd > /dev/null
+ rm -rf $out/share/emacs/site-lisp/elpa/vterm-**/{CMake*,build,*.c,*.h}
'';
- };
+ });
# Legacy alias
emacs-libvterm = unstable.vterm;