aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-02-04 16:55:29 +0100
committerXinglu Chen <public@yoctocell.xyz>2021-02-04 17:02:18 +0100
commitf6fc471adb26c78ac2d606304f60d493aba99dc0 (patch)
treed763fbdc6dcfc58ea1459baf6de1540568f35a0b /default.nix
parent85ed63ed6c8750a51e18085544774b729711a39a (diff)
Make repository a nix flake
Make git-email.el a nix flake for an easier installation process for Nix users. It currently exposes two packages: - git-email-full -- This includes all the optional libraries - git-email -- This only includes the core `git-email.el` library They both get the source from directory from the git repository, meaning they will get updates as soon as a commit is made. * default.nix: Add file. * flake.lock: Add file. * flake.nix: Add file.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..9fa551a
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,29 @@
+{ lib, nix-gitignore, emacsPackages }:
+let
+ inherit (emacsPackages) trivialBuild;
+ flakeRoot = toString ../.;
+in
+lib.recurseIntoAttrs rec {
+
+ git-email-full = trivialBuild rec {
+ pname = "git-email-full";
+ version = "git";
+ src = nix-gitignore.gitignoreSource (flakeRoot + ".gitignore") ./.;
+ packageRequires = with emacsPackages; [
+ magit
+ transient
+ notmuch
+ ];
+ };
+
+ git-email = trivialBuild rec {
+ pname = "git-email";
+ version = "git";
+ src = builtins.filterSource
+ (path: type:
+ baseNameOf path != "git-email-magit.el" &&
+ baseNameOf path != "git-email-notmuch.el" &&
+ baseNameOf path != "git-email-gnus.el"
+ ) ./.;
+ };
+}