2015-02-09 03:29:48 +03:00
|
|
|
# package.el-based emacs packages
|
2015-05-24 17:08:07 +03:00
|
|
|
|
|
|
|
## FOR USERS
|
2014-01-21 03:57:04 +04:00
|
|
|
#
|
2015-12-17 15:56:28 +03:00
|
|
|
# Recommended: simply use `emacsWithPackages` with the packages you want.
|
2014-01-21 03:57:04 +04:00
|
|
|
#
|
2015-12-17 15:56:28 +03:00
|
|
|
# Alterative: use `emacs`, install everything to a system or user profile
|
|
|
|
# and then add this at the start your `init.el`:
|
2015-05-24 17:08:07 +03:00
|
|
|
/*
|
|
|
|
(require 'package)
|
|
|
|
|
|
|
|
;; optional. makes unpure packages archives unavailable
|
|
|
|
(setq package-archives nil)
|
|
|
|
|
|
|
|
;; optional. use this if you install emacs packages to the system profile
|
|
|
|
(add-to-list 'package-directory-list "/run/current-system/sw/share/emacs/site-lisp/elpa")
|
|
|
|
|
|
|
|
;; optional. use this if you install emacs packages to user profiles (with nix-env)
|
|
|
|
(add-to-list 'package-directory-list "~/.nix-profile/share/emacs/site-lisp/elpa")
|
|
|
|
|
|
|
|
(package-initialize)
|
|
|
|
*/
|
|
|
|
|
|
|
|
## FOR CONTRIBUTORS
|
2014-01-21 03:57:04 +04:00
|
|
|
#
|
2015-05-24 17:08:07 +03:00
|
|
|
# When adding a new package here please note that
|
2016-01-16 20:06:48 +03:00
|
|
|
# * please use `elpaBuild` for pre-built package.el packages and
|
|
|
|
# `melpaBuild` or `trivialBuild` if the package must actually
|
|
|
|
# be built from the source.
|
2015-05-24 17:08:07 +03:00
|
|
|
# * lib.licenses are `with`ed on top of the file here
|
|
|
|
# * both trivialBuild and melpaBuild will automatically derive a
|
|
|
|
# `meta` with `platforms` and `homepage` set to something you are
|
|
|
|
# unlikely to want to override for most packages
|
2015-02-09 03:29:48 +03:00
|
|
|
|
2019-06-16 22:59:06 +03:00
|
|
|
{ lib, newScope, stdenv, fetchurl, fetchFromGitHub, runCommand, writeText
|
2014-01-21 03:57:04 +04:00
|
|
|
|
2016-01-20 21:53:11 +03:00
|
|
|
, emacs, texinfo, lndir, makeWrapper
|
2014-01-21 03:57:04 +04:00
|
|
|
, trivialBuild
|
|
|
|
, melpaBuild
|
|
|
|
|
|
|
|
, external
|
2019-08-04 19:55:15 +03:00
|
|
|
, pkgs
|
2018-07-20 22:54:05 +03:00
|
|
|
}:
|
2014-01-21 03:57:04 +04:00
|
|
|
|
2015-12-15 20:57:51 +03:00
|
|
|
let
|
|
|
|
|
2019-08-04 23:44:07 +03:00
|
|
|
mkElpaPackages = import ../applications/editors/emacs-modes/elpa-packages.nix {
|
2019-06-16 22:59:06 +03:00
|
|
|
inherit lib stdenv texinfo;
|
2015-12-17 05:43:43 +03:00
|
|
|
};
|
|
|
|
|
2019-08-03 22:48:11 +03:00
|
|
|
# Contains both melpa stable & unstable
|
|
|
|
melpaGeneric = import ../applications/editors/emacs-modes/melpa-packages.nix {
|
2019-08-04 19:55:15 +03:00
|
|
|
inherit external lib pkgs;
|
2015-12-17 05:43:43 +03:00
|
|
|
};
|
2019-08-04 23:44:07 +03:00
|
|
|
mkMelpaStablePackages = melpaGeneric "stable";
|
|
|
|
mkMelpaPackages = melpaGeneric "unstable";
|
2015-12-17 05:43:43 +03:00
|
|
|
|
2019-08-18 12:58:17 +03:00
|
|
|
mkOrgPackages = import ../applications/editors/emacs-modes/org-packages.nix {
|
|
|
|
inherit lib;
|
|
|
|
};
|
2016-05-08 01:50:58 +03:00
|
|
|
|
2016-08-19 23:09:41 +03:00
|
|
|
emacsWithPackages = import ../build-support/emacs/wrapper.nix {
|
2019-09-18 23:28:24 +03:00
|
|
|
inherit lib lndir makeWrapper runCommand;
|
2015-12-17 05:53:12 +03:00
|
|
|
};
|
|
|
|
|
2019-08-05 02:26:29 +03:00
|
|
|
mkManualPackages = import ../applications/editors/emacs-modes/manual-packages.nix {
|
|
|
|
inherit external lib pkgs;
|
2015-12-15 20:57:51 +03:00
|
|
|
};
|
2015-12-06 22:17:41 +03:00
|
|
|
|
2019-08-04 23:44:07 +03:00
|
|
|
in lib.makeScope newScope (self: lib.makeOverridable ({
|
|
|
|
elpaPackages ? mkElpaPackages self
|
|
|
|
, melpaStablePackages ? mkMelpaStablePackages self
|
|
|
|
, melpaPackages ? mkMelpaPackages self
|
|
|
|
, orgPackages ? mkOrgPackages self
|
|
|
|
, manualPackages ? mkManualPackages self
|
|
|
|
}: ({}
|
|
|
|
// elpaPackages // { inherit elpaPackages; }
|
|
|
|
// melpaStablePackages // { inherit melpaStablePackages; }
|
|
|
|
// melpaPackages // { inherit melpaPackages; }
|
|
|
|
// orgPackages // { inherit orgPackages; }
|
2020-04-27 14:01:10 +03:00
|
|
|
// manualPackages // { inherit manualPackages; }
|
2019-08-04 23:44:07 +03:00
|
|
|
// {
|
|
|
|
inherit emacs melpaBuild trivialBuild;
|
|
|
|
emacsWithPackages = emacsWithPackages self;
|
|
|
|
})
|
|
|
|
) {})
|