summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-modes/elpa-packages.nix
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-12-15 11:57:51 -0600
committerThomas Tuegel <ttuegel@gmail.com>2015-12-17 07:23:50 -0600
commit8e655250bdde40150f0c8c059f6d8f5483805dec (patch)
tree49f3a80c0b14986aa32c72a28a39ddd009b08c49 /pkgs/applications/editors/emacs-modes/elpa-packages.nix
parent4e99a11653fc91fd5adf7d2738ac4fd1e4eef810 (diff)
downloadnixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.tar
nixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.tar.gz
nixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.tar.bz2
nixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.tar.lz
nixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.tar.xz
nixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.tar.zst
nixpkgs-8e655250bdde40150f0c8c059f6d8f5483805dec.zip
emacsPackagesNg: add all of MELPA
Diffstat (limited to 'pkgs/applications/editors/emacs-modes/elpa-packages.nix')
-rw-r--r--pkgs/applications/editors/emacs-modes/elpa-packages.nix42
1 files changed, 27 insertions, 15 deletions
diff --git a/pkgs/applications/editors/emacs-modes/elpa-packages.nix b/pkgs/applications/editors/emacs-modes/elpa-packages.nix
index 3cf37c26280..6c48969a9ef 100644
--- a/pkgs/applications/editors/emacs-modes/elpa-packages.nix
+++ b/pkgs/applications/editors/emacs-modes/elpa-packages.nix
@@ -10,17 +10,20 @@ let
   mkPackage = self: name: recipe:
     let drv =
           { elpaBuild, stdenv, fetchurl }:
-          let fetch = { inherit fetchurl; }."${recipe.fetch.tag}"
-                or (abort "emacs-${name}: unknown fetcher '${recipe.fetch.tag}'");
-              args = builtins.removeAttrs recipe.fetch [ "tag" ];
-              src = fetch args;
+          let
+            unknownFetcher =
+              abort "emacs-${name}: unknown fetcher '${recipe.fetch.tag}'";
+            fetch =
+              { inherit fetchurl; }."${recipe.fetch.tag}"
+              or unknownFetcher;
+            args = builtins.removeAttrs recipe.fetch [ "tag" ];
+            src = fetch args;
           in elpaBuild {
             pname = name;
             inherit (recipe) version;
             inherit src;
             deps =
-              let lookupDep = d:
-                    self."${d}" or (abort "emacs-${name}: missing dependency ${d}");
+              let lookupDep = d: self."${d}" or null;
               in map lookupDep recipe.deps;
             meta = {
               homepage = "http://elpa.gnu.org/packages/${name}.html";
@@ -29,14 +32,23 @@ let
           };
     in self.callPackage drv {};
 
-  packages = self:
-    let
-      elpaPackages = mapAttrs (mkPackage self) manifest;
+in
 
-      elpaBuild = import ../../../build-support/emacs/melpa.nix {
-        inherit (pkgs) lib stdenv fetchurl texinfo;
-        inherit (self) emacs;
-      };
-    in elpaPackages // { inherit elpaBuild elpaPackages; };
+self:
 
-in makeScope pkgs.newScope packages
+  let
+    super = mapAttrs (mkPackage self) manifest;
+
+    elpaBuild = import ../../../build-support/emacs/melpa.nix {
+      inherit (pkgs) lib stdenv fetchurl texinfo;
+      inherit (self) emacs;
+    };
+
+    builtin = null;
+
+    markBroken = pkg: pkg.override {
+      elpaBuild = args: self.elpaBuild (args // {
+        meta = (args.meta or {}) // { broken = true; };
+      });
+    };
+  in super // { inherit elpaBuild; elpaPackage = super; }