about summary refs log tree commit diff
path: root/users/wpcarro/emacs/pkgs/cycle/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-07-30T04·12-0700
committerclbot <clbot@tvl.fyi>2022-07-30T04·26+0000
commitd1ab0c7cbcda92114cce4d51b36aac5f07d26e4d (patch)
tree631c5ca2a5268394ecedada1db24a7937a7a341b /users/wpcarro/emacs/pkgs/cycle/default.nix
parent65fb82097bc35a8b06da6b8a1c4b36c0c459932d (diff)
feat(wpcarro/emacs): Package cycle.el r/4349
This will likely break a few things since I've changed the names of a few
functions to reflect their mutative APIs.

Change-Id: If6279999fba50813b68e66d7713c12afd209eb90
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6004
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/emacs/pkgs/cycle/default.nix')
-rw-r--r--users/wpcarro/emacs/pkgs/cycle/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/users/wpcarro/emacs/pkgs/cycle/default.nix b/users/wpcarro/emacs/pkgs/cycle/default.nix
new file mode 100644
index 000000000000..00c4a87dc9d7
--- /dev/null
+++ b/users/wpcarro/emacs/pkgs/cycle/default.nix
@@ -0,0 +1,34 @@
+{ pkgs, depot, ... }:
+
+let
+  cycle = pkgs.callPackage
+    ({ emacsPackages }:
+      emacsPackages.trivialBuild {
+        pname = "cycle";
+        version = "1.0.0";
+        src = ./cycle.el;
+        packageRequires =
+          (with emacsPackages; [
+            dash
+          ]) ++
+          (with depot.users.wpcarro.emacs.pkgs; [
+            list
+            maybe
+            struct
+          ]);
+      })
+    { };
+
+  emacs = (pkgs.emacsPackagesFor pkgs.emacs28).emacsWithPackages (epkgs: [
+    epkgs.dash
+    depot.users.wpcarro.emacs.pkgs.maybe
+    cycle
+  ]);
+in
+cycle.overrideAttrs (_old: {
+  doCheck = true;
+  checkPhase = ''
+    ${emacs}/bin/emacs -batch \
+      -l ert -l ${./tests.el} -f ert-run-tests-batch-and-exit
+  '';
+})