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