diff options
author | Profpatsch <mail@profpatsch.de> | 2020-07-03 13:11:03 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-07-06 20:13:42 +0200 |
commit | 97f05263ef490a063a33733d7ea607411a097df8 (patch) | |
tree | f1617705e22437c908459e1de059993bcab09ed3 /pkgs/profpatsch/default.nix | |
parent | e409df3861f48de44d0e37277ce007e348a7a0dc (diff) |
pkgs/profpatsch/xdg-open: Prepare decoding http urls
I want to be able to open http(s) links that are e.g. images directly in the right application. Aka web urls should be transparent, instead of always opening everthing in the browser. This adds some silly ways of connecting to the server and parsing out the headers, in order to fetch the content-type.
Diffstat (limited to 'pkgs/profpatsch/default.nix')
-rw-r--r-- | pkgs/profpatsch/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix index c3f0d7e2..999382c0 100644 --- a/pkgs/profpatsch/default.nix +++ b/pkgs/profpatsch/default.nix @@ -220,10 +220,17 @@ in rec { rust-deps = (import ./rust-deps.nix { inherit (pkgs) buildRustCrate; }); - inherit (import ./xdg-open { inherit pkgs getBins importDhall2 writeExecline dhall buildDhallPackage writeRustSimple el-exec; }) + inherit (import ./xdg-open { inherit pkgs getBins importDhall2 writeExecline dhall buildDhallPackage runExeclineLocal netencode-rs writeRustSimple record-get el-exec; }) xdg-open + config Prelude + httparse + get-http-content-type + read-headers-and-follow-redirect mini-url + assert-printf + as-stdin + printenv ; inherit (import ./netencode { inherit pkgs writeRustSimpleLib writeRustSimple el-semicolon el-exec; }) |