From dca6f19b7067891239e601ff7fe783eaf85f26ea Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Tue, 29 Oct 2019 07:51:11 -0400 Subject: emacs-*-rtags: use upstream package names Split `emacs-rtags` into `rtags` and `*-rtags` following the upstream (melpa) package names. --- .../editors/emacs-modes/manual-packages.nix | 15 ---------- .../editors/emacs-modes/melpa-packages.nix | 35 ++++++++++++---------- 2 files changed, 20 insertions(+), 30 deletions(-) (limited to 'pkgs/applications/editors/emacs-modes') diff --git a/pkgs/applications/editors/emacs-modes/manual-packages.nix b/pkgs/applications/editors/emacs-modes/manual-packages.nix index fd62ea18b713..df94a7a650a5 100644 --- a/pkgs/applications/editors/emacs-modes/manual-packages.nix +++ b/pkgs/applications/editors/emacs-modes/manual-packages.nix @@ -104,21 +104,6 @@ icicles = callPackage ./icicles { }; - rtags = melpaBuild { - inherit (external.rtags) version src meta; - - pname = "rtags"; - - dontConfigure = true; - - propagatedUserEnvPkgs = [ external.rtags ]; - recipe = pkgs.writeText "recipe" '' - (rtags - :repo "andersbakken/rtags" :fetcher github - :files ("src/*.el")) - ''; - }; - lib-requires = callPackage ./lib-requires { }; diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index 0ad7b02befad..f5291955a129 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -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; @@ -61,8 +72,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac ]; }); - # 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; @@ -104,8 +114,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 ]; @@ -119,11 +128,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: { @@ -156,8 +162,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 @@ -218,6 +223,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 ]; }); @@ -317,8 +324,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; @@ -362,8 +368,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: { -- cgit 1.4.1