Merge branch 'elpa-packages'
This commit is contained in:
commit
916f86745e
1337
pkgs/applications/editors/emacs-modes/elpa-packages.json
Normal file
1337
pkgs/applications/editors/emacs-modes/elpa-packages.json
Normal file
File diff suppressed because it is too large
Load Diff
42
pkgs/applications/editors/emacs-modes/elpa-packages.nix
Normal file
42
pkgs/applications/editors/emacs-modes/elpa-packages.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
pkgs: with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (stdenv.lib) makeScope mapAttrs;
|
||||||
|
|
||||||
|
json = builtins.readFile ./elpa-packages.json;
|
||||||
|
manifest = builtins.fromJSON json;
|
||||||
|
|
||||||
|
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;
|
||||||
|
in elpaBuild {
|
||||||
|
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://elpa.gnu.org/packages/${name}.html";
|
||||||
|
license = stdenv.lib.licenses.free;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in self.callPackage drv {};
|
||||||
|
|
||||||
|
packages = self:
|
||||||
|
let
|
||||||
|
elpaPackages = mapAttrs (mkPackage self) manifest;
|
||||||
|
|
||||||
|
elpaBuild = import ../../../build-support/emacs/melpa.nix {
|
||||||
|
inherit (pkgs) lib stdenv fetchurl texinfo;
|
||||||
|
inherit (self) emacs;
|
||||||
|
};
|
||||||
|
in elpaPackages // { inherit elpaBuild elpaPackages; };
|
||||||
|
|
||||||
|
in makeScope pkgs.newScope packages
|
@ -29,6 +29,19 @@ in
|
|||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "emacs-${pname}${optionalString (version != null) "-${version}"}";
|
name = "emacs-${pname}${optionalString (version != null) "-${version}"}";
|
||||||
|
|
||||||
|
unpackCmd = ''
|
||||||
|
case "$curSrc" in
|
||||||
|
*.el)
|
||||||
|
cp $curSrc $pname.el
|
||||||
|
chmod +w $pname.el
|
||||||
|
sourceRoot="."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_defaultUnpack "$curSrc"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = [emacs texinfo] ++ packageRequires ++ buildInputs;
|
buildInputs = [emacs texinfo] ++ packageRequires ++ buildInputs;
|
||||||
propagatedBuildInputs = packageRequires;
|
propagatedBuildInputs = packageRequires;
|
||||||
propagatedUserEnvPkgs = packageRequires;
|
propagatedUserEnvPkgs = packageRequires;
|
||||||
|
@ -8,7 +8,7 @@ let
|
|||||||
snd = l: head (tail l);
|
snd = l: head (tail l);
|
||||||
trd = l: head (tail (tail l));
|
trd = l: head (tail (tail l));
|
||||||
path_ = reverseList (splitString "/" url);
|
path_ = reverseList (splitString "/" url);
|
||||||
path = if head path_ == "" then tail path_ else path_;
|
path = [ (removeSuffix "/" (head path_)) ] ++ (tail path_);
|
||||||
in
|
in
|
||||||
# ../repo/trunk -> repo
|
# ../repo/trunk -> repo
|
||||||
if fst path == "trunk" then snd path
|
if fst path == "trunk" then snd path
|
||||||
|
@ -11613,7 +11613,7 @@ let
|
|||||||
emacsPackagesNgGen = emacs: callPackage ./emacs-packages.nix {
|
emacsPackagesNgGen = emacs: callPackage ./emacs-packages.nix {
|
||||||
overrides = (config.emacsPackageOverrides or (p: {})) pkgs;
|
overrides = (config.emacsPackageOverrides or (p: {})) pkgs;
|
||||||
|
|
||||||
inherit emacs;
|
inherit emacs elpaPackages;
|
||||||
|
|
||||||
trivialBuild = callPackage ../build-support/emacs/trivial.nix {
|
trivialBuild = callPackage ../build-support/emacs/trivial.nix {
|
||||||
inherit emacs;
|
inherit emacs;
|
||||||
@ -11632,6 +11632,10 @@ let
|
|||||||
|
|
||||||
emacs24PackagesNg = recurseIntoAttrs (emacsPackagesNgGen emacs24);
|
emacs24PackagesNg = recurseIntoAttrs (emacsPackagesNgGen emacs24);
|
||||||
|
|
||||||
|
elpaPackages =
|
||||||
|
let imported = import ../applications/editors/emacs-modes/elpa-packages.nix pkgs;
|
||||||
|
in recurseIntoAttrs (imported.override (super: self: { inherit emacs; }));
|
||||||
|
|
||||||
emacsWithPackages = callPackage ../build-support/emacs/wrapper.nix { };
|
emacsWithPackages = callPackage ../build-support/emacs/wrapper.nix { };
|
||||||
emacs24WithPackages = emacsWithPackages.override { emacs = emacs24; };
|
emacs24WithPackages = emacsWithPackages.override { emacs = emacs24; };
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
, lib, stdenv, fetchurl, fetchgit, fetchFromGitHub, fetchhg
|
, lib, stdenv, fetchurl, fetchgit, fetchFromGitHub, fetchhg
|
||||||
|
|
||||||
, emacs
|
, emacs, elpaPackages
|
||||||
, trivialBuild
|
, trivialBuild
|
||||||
, melpaBuild
|
, melpaBuild
|
||||||
|
|
||||||
@ -44,9 +44,7 @@
|
|||||||
|
|
||||||
with lib.licenses;
|
with lib.licenses;
|
||||||
|
|
||||||
let self = _self // overrides;
|
let packagesFun = super: self: with self; {
|
||||||
callPackage = lib.callPackageWith (self // removeAttrs args ["overrides" "external"]);
|
|
||||||
_self = with self; {
|
|
||||||
|
|
||||||
inherit emacs;
|
inherit emacs;
|
||||||
|
|
||||||
@ -2025,4 +2023,6 @@ let self = _self // overrides;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}; in self
|
};
|
||||||
|
|
||||||
|
in elpaPackages.override packagesFun
|
||||||
|
Loading…
x
Reference in New Issue
Block a user