about summary refs log tree commit diff
path: root/users/Profpatsch/httzip/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2023-07-12T20·51+0200
committerProfpatsch <mail@profpatsch.de>2023-07-14T08·03+0000
commitc266f5133fb8da2d5f4ed0321675b06cc41755c0 (patch)
treef84be340c20eb7169027fa2469d2af514056d108 /users/Profpatsch/httzip/default.nix
parentb4cfddfc800c19b011e2c8f4d2126f692f1225c9 (diff)
feat(users/Profpatsch): init httzip r/6425
A streaming webserver which serves directories as .zip recursively.
Because everything sucks and this is the best way to get dirs
delivered to people.

Change-Id: I451885cfc5082db12ac32eb0a4bfb04bc983d3c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8953
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/Profpatsch/httzip/default.nix')
-rw-r--r--users/Profpatsch/httzip/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/users/Profpatsch/httzip/default.nix b/users/Profpatsch/httzip/default.nix
new file mode 100644
index 000000000000..c4c00ffb457d
--- /dev/null
+++ b/users/Profpatsch/httzip/default.nix
@@ -0,0 +1,40 @@
+{ depot, pkgs, lib, ... }:
+
+let
+
+  httzip = pkgs.haskellPackages.mkDerivation {
+    pname = "httzip";
+    version = "0.1.0";
+
+    src = depot.users.Profpatsch.exactSource ./. [
+      ./httzip.cabal
+      ./Httzip.hs
+    ];
+
+    libraryHaskellDepends = [
+      pkgs.haskellPackages.pa-prelude
+      pkgs.haskellPackages.warp
+      pkgs.haskellPackages.wai
+      pkgs.haskellPackages.wai-conduit
+      pkgs.haskellPackages.conduit-extra
+      pkgs.haskellPackages.conduit
+    ];
+
+    isExecutable = true;
+    isLibrary = false;
+    license = lib.licenses.mit;
+  };
+
+  bins = depot.nix.getBins httzip [ "httzip" ];
+
+in
+depot.nix.writeExecline "httzip-wrapped" { } [
+  "importas"
+  "-ui"
+  "PATH"
+  "PATH"
+  "export"
+  "PATH"
+  "${pkgs.zip}/bin"
+  bins.httzip
+]