about summary refs log tree commit diff
path: root/users/Profpatsch/read-http.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/read-http.nix')
-rw-r--r--users/Profpatsch/read-http.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/users/Profpatsch/read-http.nix b/users/Profpatsch/read-http.nix
new file mode 100644
index 000000000000..aff1fa8662e1
--- /dev/null
+++ b/users/Profpatsch/read-http.nix
@@ -0,0 +1,17 @@
+{ depot, pkgs, ... }:
+
+let
+
+  # reads a http request (stdin), and writes all headers to stdout, as netencoded dict
+  read-http = depot.users.Profpatsch.writers.rustSimple {
+    name = "read-http";
+    dependencies = [
+      depot.users.Profpatsch.rust-crates.ascii
+      depot.users.Profpatsch.rust-crates.httparse
+      depot.users.Profpatsch.netencode.netencode-rs
+      depot.users.Profpatsch.arglib.netencode.rust
+      depot.users.Profpatsch.execline.exec-helpers
+    ];
+  } (builtins.readFile ./read-http.rs);
+
+in read-http