2015-02-09 00:29:48 +00:00
|
|
|
# package.el-based emacs packages
|
2015-05-24 14:08:07 +00:00
|
|
|
|
|
|
|
## FOR USERS
|
2014-01-20 23:57:04 +00:00
|
|
|
#
|
2015-12-17 12:56:28 +00:00
|
|
|
# Recommended: simply use `emacsWithPackages` with the packages you want.
|
2014-01-20 23:57:04 +00:00
|
|
|
#
|
2020-12-22 11:56:57 +00:00
|
|
|
# Alternative: use `emacs`, install everything to a system or user profile
|
2015-12-17 12:56:28 +00:00
|
|
|
# and then add this at the start your `init.el`:
|
2015-05-24 14:08:07 +00: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-20 23:57:04 +00:00
|
|
|
#
|
2015-05-24 14:08:07 +00:00
|
|
|
# When adding a new package here please note that
|
2016-01-16 17:06:48 +00: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 14:08:07 +00: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 00:29:48 +00:00
|
|
|
|
2021-02-24 14:01:08 +00:00
|
|
|
{ pkgs, lib ? pkgs.lib, emacs }:
|
2014-01-20 23:57:04 +00:00
|
|
|
|
2015-12-15 17:57:51 +00:00
|
|
|
let
|
|
|
|
|
2021-02-24 13:54:25 +00:00
|
|
|
trivialBuild = pkgs.callPackage ../build-support/emacs/trivial.nix {
|
|
|
|
inherit emacs;
|
|
|
|
};
|
|
|
|
|
|
|
|
melpaBuild = pkgs.callPackage ../build-support/emacs/melpa.nix {
|
|
|
|
inherit emacs;
|
|
|
|
};
|
|
|
|
|
2019-08-04 20:44:07 +00:00
|
|
|
mkElpaPackages = import ../applications/editors/emacs-modes/elpa-packages.nix {
|
2021-02-24 14:01:08 +00:00
|
|
|
inherit (pkgs) stdenv texinfo writeText;
|
|
|
|
inherit lib;
|
2015-12-17 02:43:43 +00:00
|
|
|
};
|
|
|
|
|
2019-08-03 19:48:11 +00:00
|
|
|
# Contains both melpa stable & unstable
|
|
|
|
melpaGeneric = import ../applications/editors/emacs-modes/melpa-packages.nix {
|
2021-02-24 13:37:34 +00:00
|
|
|
inherit lib pkgs;
|
2015-12-17 02:43:43 +00:00
|
|
|
};
|
2019-08-04 20:44:07 +00:00
|
|
|
mkMelpaStablePackages = melpaGeneric "stable";
|
|
|
|
mkMelpaPackages = melpaGeneric "unstable";
|
2015-12-17 02:43:43 +00:00
|
|
|
|
2019-08-18 09:58:17 +00:00
|
|
|
mkOrgPackages = import ../applications/editors/emacs-modes/org-packages.nix {
|
|
|
|
inherit lib;
|
|
|
|
};
|
2016-05-07 22:50:58 +00:00
|
|
|
|
2016-08-19 20:09:41 +00:00
|
|
|
emacsWithPackages = import ../build-support/emacs/wrapper.nix {
|
2021-02-24 14:01:08 +00:00
|
|
|
inherit (pkgs) lndir makeWrapper runCommand;
|
|
|
|
inherit lib;
|
2015-12-17 02:53:12 +00:00
|
|
|
};
|
|
|
|
|
2019-08-04 23:26:29 +00:00
|
|
|
mkManualPackages = import ../applications/editors/emacs-modes/manual-packages.nix {
|
2021-02-24 13:37:34 +00:00
|
|
|
inherit lib pkgs;
|
2015-12-15 17:57:51 +00:00
|
|
|
};
|
2015-12-06 19:17:41 +00:00
|
|
|
|
2021-02-24 14:01:08 +00:00
|
|
|
in lib.makeScope pkgs.newScope (self: lib.makeOverridable ({
|
2019-08-04 20:44:07 +00:00
|
|
|
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 11:01:10 +00:00
|
|
|
// manualPackages // { inherit manualPackages; }
|
2019-08-04 20:44:07 +00:00
|
|
|
// {
|
|
|
|
inherit emacs melpaBuild trivialBuild;
|
|
|
|
emacsWithPackages = emacsWithPackages self;
|
2020-12-18 03:24:41 +00:00
|
|
|
withPackages = emacsWithPackages self;
|
2019-08-04 20:44:07 +00:00
|
|
|
})
|
|
|
|
) {})
|