2015-12-17 13:12:49 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
# 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)"`
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2015-12-17 02:39:45 +00:00
|
|
|
{ fetchurl, lib, stdenv, texinfo }:
|
2015-12-06 15:27:19 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2015-12-17 02:39:45 +00:00
|
|
|
inherit (lib) makeScope mapAttrs;
|
2015-12-06 15:27:19 +00:00
|
|
|
|
|
|
|
json = builtins.readFile ./elpa-packages.json;
|
|
|
|
manifest = builtins.fromJSON json;
|
|
|
|
|
|
|
|
mkPackage = self: name: recipe:
|
|
|
|
let drv =
|
|
|
|
{ elpaBuild, stdenv, fetchurl }:
|
2015-12-15 17:57:51 +00:00
|
|
|
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;
|
2015-12-06 15:27:19 +00:00
|
|
|
in elpaBuild {
|
|
|
|
pname = name;
|
|
|
|
inherit (recipe) version;
|
|
|
|
inherit src;
|
2015-12-22 12:55:10 +00:00
|
|
|
packageRequires =
|
2015-12-15 17:57:51 +00:00
|
|
|
let lookupDep = d: self."${d}" or null;
|
2015-12-06 15:27:19 +00:00
|
|
|
in map lookupDep recipe.deps;
|
|
|
|
meta = {
|
|
|
|
homepage = "http://elpa.gnu.org/packages/${name}.html";
|
|
|
|
license = stdenv.lib.licenses.free;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in self.callPackage drv {};
|
|
|
|
|
2015-12-15 17:57:51 +00:00
|
|
|
in
|
2015-12-06 15:27:19 +00:00
|
|
|
|
2015-12-15 17:57:51 +00:00
|
|
|
self:
|
2015-12-06 15:27:19 +00:00
|
|
|
|
2015-12-15 17:57:51 +00:00
|
|
|
let
|
|
|
|
super = mapAttrs (mkPackage self) manifest;
|
|
|
|
|
|
|
|
elpaBuild = import ../../../build-support/emacs/melpa.nix {
|
2015-12-17 02:39:45 +00:00
|
|
|
inherit fetchurl lib stdenv texinfo;
|
2015-12-15 17:57:51 +00:00
|
|
|
inherit (self) emacs;
|
|
|
|
};
|
|
|
|
|
|
|
|
markBroken = pkg: pkg.override {
|
|
|
|
elpaBuild = args: self.elpaBuild (args // {
|
|
|
|
meta = (args.meta or {}) // { broken = true; };
|
|
|
|
});
|
|
|
|
};
|
2015-12-16 14:13:46 +00:00
|
|
|
|
|
|
|
elpaPackages = super // {
|
|
|
|
ace-window = markBroken super.ace-window;
|
|
|
|
ada-mode = markBroken super.ada-mode;
|
|
|
|
beacon = markBroken super.beacon;
|
|
|
|
bug-hunter = markBroken super.bug-hunter;
|
|
|
|
company-math = markBroken super.company-math;
|
|
|
|
company-statistics = markBroken super.company-statistics;
|
|
|
|
context-coloring = markBroken super.context-coloring;
|
|
|
|
dict-tree = markBroken super.dict-tree;
|
|
|
|
el-search = markBroken super.el-search;
|
|
|
|
ergoemacs-mode = markBroken super.ergoemacs-mode;
|
|
|
|
exwm = markBroken super.exwm;
|
|
|
|
gnugo = markBroken super.gnugo;
|
|
|
|
iterators = markBroken super.iterators;
|
2015-12-16 14:24:35 +00:00
|
|
|
midi-kbd = markBroken super.midi-kbd;
|
2015-12-16 14:13:46 +00:00
|
|
|
stream = markBroken super.stream;
|
|
|
|
tNFA = markBroken super.tNFA;
|
|
|
|
trie = markBroken super.trie;
|
|
|
|
xelb = markBroken super.xelb;
|
|
|
|
};
|
|
|
|
in elpaPackages // { inherit elpaBuild elpaPackages; }
|