summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-modes/elpa-packages.nix
blob: 7fc8a06644f9d44475f92e20107c3ec94d5a8b77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*

# Updating

To update the list of packages from ELPA,

1. Clone https://github.com/ttuegel/emacs2nix
2. Run `./elpa-packages.sh` from emacs2nix
3. Copy the new elpa-packages.json file into Nixpkgs
4. `git commit -m "elpa-packages $(date -Idate)"`

*/

{ fetchurl, lib, stdenv, texinfo }:

self:

  let

    imported = import ./elpa-generated.nix {
      inherit (self) callPackage;
    };

    super = removeAttrs imported [ "dash" ];

    elpaBuild = import ../../../build-support/emacs/elpa.nix {
      inherit fetchurl lib stdenv texinfo;
      inherit (self) emacs;
    };

    markBroken = pkg: pkg.override {
      elpaBuild = args: self.elpaBuild (args // {
        meta = (args.meta or {}) // { broken = true; };
      });
    };

    overrides = {
      # These packages require emacs-25
      el-search = markBroken super.el-search;
      iterators = markBroken super.iterators;
      midi-kbd = markBroken super.midi-kbd;
      stream = markBroken super.stream;
    };

    elpaPackages = super // overrides;

  in elpaPackages // { inherit elpaBuild elpaPackages; }