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
|
2023-08-25 03:19:25 +00:00
|
|
|
# and then add this at the start your `early-init.el`:
|
2015-05-24 14:08:07 +00:00
|
|
|
/*
|
|
|
|
;; 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")
|
|
|
|
*/
|
|
|
|
|
2021-08-04 14:13:46 +00:00
|
|
|
{
|
|
|
|
pkgs',
|
|
|
|
emacs',
|
|
|
|
makeScope,
|
|
|
|
makeOverridable,
|
|
|
|
dontRecurseIntoAttrs,
|
|
|
|
}:
|
2014-01-20 23:57:04 +00:00
|
|
|
|
2015-12-15 17:57:51 +00:00
|
|
|
let
|
|
|
|
|
2023-06-04 16:53:00 +00:00
|
|
|
mkElpaDevelPackages =
|
|
|
|
{ pkgs, lib }:
|
|
|
|
import ../applications/editors/emacs/elisp-packages/elpa-devel-packages.nix {
|
2024-07-29 03:46:22 +00:00
|
|
|
inherit (pkgs) pkgs buildPackages;
|
2023-06-04 16:53:00 +00:00
|
|
|
inherit lib;
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:03:41 +00:00
|
|
|
mkElpaPackages =
|
|
|
|
{ pkgs, lib }:
|
|
|
|
import ../applications/editors/emacs/elisp-packages/elpa-packages.nix {
|
2024-07-29 03:46:22 +00:00
|
|
|
inherit (pkgs) pkgs buildPackages;
|
2021-02-24 14:01:08 +00:00
|
|
|
inherit lib;
|
2015-12-17 02:43:43 +00:00
|
|
|
};
|
|
|
|
|
2024-07-30 08:43:45 +00:00
|
|
|
mkNongnuDevelPackages =
|
|
|
|
{ pkgs, lib }:
|
|
|
|
import ../applications/editors/emacs/elisp-packages/nongnu-devel-packages.nix {
|
2024-09-14 04:57:24 +00:00
|
|
|
inherit (pkgs) pkgs buildPackages;
|
2024-07-30 08:43:45 +00:00
|
|
|
inherit lib;
|
|
|
|
};
|
|
|
|
|
2021-08-06 21:26:09 +00:00
|
|
|
mkNongnuPackages =
|
|
|
|
{ pkgs, lib }:
|
|
|
|
import ../applications/editors/emacs/elisp-packages/nongnu-packages.nix {
|
2024-09-14 04:57:24 +00:00
|
|
|
inherit (pkgs) pkgs buildPackages;
|
2021-06-14 02:53:49 +00:00
|
|
|
inherit lib;
|
|
|
|
};
|
|
|
|
|
2019-08-03 19:48:11 +00:00
|
|
|
# Contains both melpa stable & unstable
|
2021-05-20 23:03:41 +00:00
|
|
|
melpaGeneric =
|
2024-05-30 16:52:11 +00:00
|
|
|
{ pkgs, lib }:
|
2019-08-04 20:44:07 +00:00
|
|
|
import ../applications/editors/emacs/elisp-packages/melpa-packages.nix {
|
2021-02-24 14:25:48 +00:00
|
|
|
inherit lib pkgs;
|
|
|
|
};
|
|
|
|
|
2024-07-29 03:46:22 +00:00
|
|
|
mkManualPackages =
|
|
|
|
{ pkgs, lib }:
|
|
|
|
import ../applications/editors/emacs/elisp-packages/manual-packages.nix {
|
|
|
|
inherit lib pkgs;
|
|
|
|
};
|
|
|
|
|
2024-05-30 16:52:11 +00:00
|
|
|
emacsWithPackages =
|
2021-05-20 23:03:41 +00:00
|
|
|
{ pkgs, lib }:
|
2024-05-30 16:52:11 +00:00
|
|
|
pkgs.callPackage ../applications/editors/emacs/build-support/wrapper.nix {
|
2021-02-24 14:25:48 +00:00
|
|
|
inherit (pkgs.xorg) lndir;
|
|
|
|
inherit lib;
|
|
|
|
};
|
|
|
|
|
2024-12-10 19:26:33 +00:00
|
|
|
in
|
2021-02-24 14:25:48 +00:00
|
|
|
makeScope pkgs'.newScope (
|
2024-12-10 19:26:33 +00:00
|
|
|
self:
|
2021-02-24 14:25:48 +00:00
|
|
|
makeOverridable (
|
2024-12-10 19:26:33 +00:00
|
|
|
{
|
2021-02-24 14:25:48 +00:00
|
|
|
pkgs ? pkgs',
|
|
|
|
lib ? pkgs.lib,
|
|
|
|
elpaDevelPackages ? mkElpaDevelPackages { inherit pkgs lib; } self,
|
|
|
|
elpaPackages ? mkElpaPackages { inherit pkgs lib; } self,
|
2024-07-30 08:43:45 +00:00
|
|
|
nongnuDevelPackages ? mkNongnuDevelPackages { inherit pkgs lib; } self,
|
2021-08-06 21:26:09 +00:00
|
|
|
nongnuPackages ? mkNongnuPackages { inherit pkgs lib; } self,
|
2021-02-24 14:25:48 +00:00
|
|
|
melpaStablePackages ? melpaGeneric { inherit pkgs lib; } "stable" self,
|
|
|
|
melpaPackages ? melpaGeneric { inherit pkgs lib; } "unstable" self,
|
|
|
|
manualPackages ? mkManualPackages { inherit pkgs lib; } self,
|
2024-12-10 19:26:33 +00:00
|
|
|
}:
|
|
|
|
(
|
2021-02-24 14:25:48 +00:00
|
|
|
{ }
|
|
|
|
// elpaDevelPackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2021-02-24 14:25:48 +00:00
|
|
|
inherit elpaDevelPackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
2019-08-04 20:44:07 +00:00
|
|
|
// elpaPackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2021-02-24 14:25:48 +00:00
|
|
|
inherit elpaPackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
2024-07-30 08:43:45 +00:00
|
|
|
// nongnuDevelPackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2024-07-30 08:43:45 +00:00
|
|
|
inherit nongnuDevelPackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
2021-06-14 02:53:49 +00:00
|
|
|
// nongnuPackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2021-06-14 02:53:49 +00:00
|
|
|
inherit nongnuPackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
2019-08-04 20:44:07 +00:00
|
|
|
// melpaStablePackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2019-08-04 20:44:07 +00:00
|
|
|
inherit melpaStablePackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
2019-08-04 20:44:07 +00:00
|
|
|
// melpaPackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2019-08-04 20:44:07 +00:00
|
|
|
inherit melpaPackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
2020-04-27 11:01:10 +00:00
|
|
|
// manualPackages
|
2024-12-10 19:26:33 +00:00
|
|
|
// {
|
2020-04-27 11:01:10 +00:00
|
|
|
inherit manualPackages;
|
2024-12-10 19:26:33 +00:00
|
|
|
}
|
|
|
|
// {
|
|
|
|
|
2022-12-18 00:39:44 +00:00
|
|
|
# Propagate overridden scope
|
2021-08-04 14:13:46 +00:00
|
|
|
emacs = emacs'.overrideAttrs (old: {
|
2021-02-24 14:25:48 +00:00
|
|
|
passthru = (old.passthru or { }) // {
|
|
|
|
pkgs = dontRecurseIntoAttrs self;
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-05-30 16:52:11 +00:00
|
|
|
trivialBuild = pkgs.callPackage ../applications/editors/emacs/build-support/trivial.nix {
|
2021-02-24 14:25:48 +00:00
|
|
|
inherit (self) emacs;
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
|
2021-02-24 14:25:48 +00:00
|
|
|
elpaBuild = pkgs.callPackage ../applications/editors/emacs/build-support/elpa.nix {
|
|
|
|
inherit (self) emacs;
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
|
2024-05-30 16:52:11 +00:00
|
|
|
melpaBuild = pkgs.callPackage ../applications/editors/emacs/build-support/melpa.nix {
|
2021-02-24 14:25:48 +00:00
|
|
|
inherit (self) emacs;
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
|
2021-08-04 14:13:46 +00:00
|
|
|
emacsWithPackages = emacsWithPackages { inherit pkgs lib; } self;
|
2021-02-24 14:25:48 +00:00
|
|
|
withPackages = emacsWithPackages { inherit pkgs lib; } self;
|
2024-12-10 19:26:33 +00:00
|
|
|
|
|
|
|
}
|
2021-08-04 14:13:46 +00:00
|
|
|
// {
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2021-02-24 16:03:54 +00:00
|
|
|
# Package specific priority overrides goes here
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-06-22 05:36:25 +00:00
|
|
|
# EXWM is not tagged very often, prefer it from elpa devel.
|
|
|
|
inherit (elpaDevelPackages) exwm;
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2021-02-24 16:03:54 +00:00
|
|
|
# Telega uploads packages incompatible with stable tdlib to melpa
|
|
|
|
# Prefer the one from melpa stable
|
|
|
|
inherit (melpaStablePackages) telega;
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2019-08-04 20:44:07 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
) { }
|
2024-12-10 19:26:33 +00:00
|
|
|
)
|