From f6fc471adb26c78ac2d606304f60d493aba99dc0 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Thu, 4 Feb 2021 16:55:29 +0100 Subject: 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. --- default.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 default.nix (limited to 'default.nix') 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" + ) ./.; + }; +} -- cgit v1.2.3