mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 12:22:37 +03:00
melpa-packages 2015-12-14
This commit is contained in:
parent
1210eafb8e
commit
4e99a11653
43714
pkgs/applications/editors/emacs-modes/melpa-packages.json
Normal file
43714
pkgs/applications/editors/emacs-modes/melpa-packages.json
Normal file
File diff suppressed because it is too large
Load Diff
42
pkgs/applications/editors/emacs-modes/melpa-packages.nix
Normal file
42
pkgs/applications/editors/emacs-modes/melpa-packages.nix
Normal file
@ -0,0 +1,42 @@
|
||||
pkgs: with pkgs;
|
||||
|
||||
let
|
||||
|
||||
inherit (stdenv.lib) makeScope mapAttrs;
|
||||
|
||||
json = builtins.readFile ./melpa-stable-packages.json;
|
||||
manifest = builtins.fromJSON json;
|
||||
|
||||
mkPackage = self: name: recipe:
|
||||
let drv =
|
||||
{ melpaBuild, 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;
|
||||
in melpaBuild {
|
||||
pname = name;
|
||||
inherit (recipe) version;
|
||||
inherit src;
|
||||
deps =
|
||||
let lookupDep = d:
|
||||
self."${d}" or (abort "emacs-${name}: missing dependency ${d}");
|
||||
in map lookupDep recipe.deps;
|
||||
meta = {
|
||||
homepage = "http://melpa.org/#/${name}";
|
||||
license = stdenv.lib.licenses.free;
|
||||
};
|
||||
};
|
||||
in self.callPackage drv {};
|
||||
|
||||
packages = self:
|
||||
let
|
||||
melpaPackages = mapAttrs (mkPackage self) manifest;
|
||||
|
||||
melpaBuild = import ../../../build-support/emacs/melpa.nix {
|
||||
inherit (pkgs) lib stdenv fetchurl texinfo;
|
||||
inherit (self) emacs;
|
||||
};
|
||||
in melpaPackages // { inherit melpaBuild melpaPackages; };
|
||||
|
||||
in makeScope pkgs.newScope packages
|
Loading…
Reference in New Issue
Block a user