about summary refs log tree commit diff
path: root/users/grfn/pkgs/notmuch-extract-patch.nix
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2022-06-14T14·15-0400
committerclbot <clbot@tvl.fyi>2022-07-11T14·44+0000
commit539d69f565f0f3ada8a08ebc5a199b97dbc89b73 (patch)
treea00de4b7a6073ae454bff948728cd956b7643dd8 /users/grfn/pkgs/notmuch-extract-patch.nix
parenta37f0eed21617fd914c84cca35761bad802a989d (diff)
feat(grfn/home): Add binding for extracting patch from email r/4286
Change-Id: Id568f8b479cebe547e1ad8a309ccfa395bf99b83
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5935
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: grfn <grfn@gws.fyi>
Diffstat (limited to 'users/grfn/pkgs/notmuch-extract-patch.nix')
-rw-r--r--users/grfn/pkgs/notmuch-extract-patch.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/users/grfn/pkgs/notmuch-extract-patch.nix b/users/grfn/pkgs/notmuch-extract-patch.nix
new file mode 100644
index 000000000000..54dad260a041
--- /dev/null
+++ b/users/grfn/pkgs/notmuch-extract-patch.nix
@@ -0,0 +1,18 @@
+{ pkgs, ... }:
+
+let
+  inherit (pkgs) lib;
+  src = pkgs.fetchurl {
+    url = "https://raw.githubusercontent.com/aaptel/notmuch-extract-patch/f732a53e12a7c91a06755ebfab2007adc9b3063b/notmuch-extract-patch";
+    sha256 = "0nawkl04sj7psw6ikzay7kydj3dhd0fkwghcsf5rzaw4bmp4kbax";
+  };
+
+in
+pkgs.runCommandNoCC "notmuch-extract-patch"
+{
+  buildInputs = [ pkgs.python3 ];
+} ''
+  mkdir -p $out/bin
+  install -m 755 ${src} $out/bin/notmuch-extract-patch
+  patchShebangs $out/bin
+''