diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2019-11-24 20:14:07 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2019-11-24 20:14:07 +0100 |
commit | f55aa62c7dd25d44b37985ef5f109eb8212f5ae7 (patch) | |
tree | 9d286ec3dc4bab784cf771cb891b524b60a3583c | |
parent | f28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c (diff) | |
download | utils-f55aa62c7dd25d44b37985ef5f109eb8212f5ae7.tar utils-f55aa62c7dd25d44b37985ef5f109eb8212f5ae7.tar.gz utils-f55aa62c7dd25d44b37985ef5f109eb8212f5ae7.tar.bz2 utils-f55aa62c7dd25d44b37985ef5f109eb8212f5ae7.tar.xz utils-f55aa62c7dd25d44b37985ef5f109eb8212f5ae7.zip |
fix paths
-rw-r--r-- | nix/notmuch-tcp.nix | 4 | ||||
-rwxr-xr-x | notmuch-tcp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nix/notmuch-tcp.nix b/nix/notmuch-tcp.nix index 438a086..59d2e39 100644 --- a/nix/notmuch-tcp.nix +++ b/nix/notmuch-tcp.nix | |||
@@ -1,5 +1,5 @@ | |||
1 | { stdenv | 1 | { stdenv |
2 | , zsh, socat, nettools | 2 | , zsh, socat, nettools, coreutils |
3 | }: | 3 | }: |
4 | 4 | ||
5 | stdenv.mkDerivation rec { | 5 | stdenv.mkDerivation rec { |
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec { | |||
9 | 9 | ||
10 | phases = [ "buildPhase" "installPhase" ]; | 10 | phases = [ "buildPhase" "installPhase" ]; |
11 | 11 | ||
12 | inherit zsh socat nettools; | 12 | inherit zsh socat nettools coreutils; |
13 | 13 | ||
14 | buildPhase = '' | 14 | buildPhase = '' |
15 | substituteAll $src notmuch-tcp | 15 | substituteAll $src notmuch-tcp |
diff --git a/notmuch-tcp b/notmuch-tcp index 71680d0..57da3f5 100755 --- a/notmuch-tcp +++ b/notmuch-tcp | |||
@@ -1,9 +1,9 @@ | |||
1 | #!@zsh@/bin/zsh | 1 | #!@zsh@/bin/zsh |
2 | 2 | ||
3 | NOTMUCH_TCP=${NOTMUCH_TCP:-2010} | 3 | NOTMUCH_TCP=${NOTMUCH_TCP:-2010} |
4 | HOST=${HOST:-$(@nettools/bin/hostname -s)} | 4 | HOST=${HOST:-$(@nettools@/bin/hostname -s)} |
5 | NOTMUCH_HOST=${NOTMUCH_HOST:-odin.asgard.yggdrasil} | 5 | NOTMUCH_HOST=${NOTMUCH_HOST:-odin.asgard.yggdrasil} |
6 | 6 | ||
7 | cd ~/.notmuch-tcp | 7 | cd ~/.notmuch-tcp |
8 | 8 | ||
9 | @socat@/bin/socat STDIO,ignoreeof openssl:${NOTMUCH_HOST}:${NOTMUCH_TCP},verify=1,cafile=ca.pem,certificate=${HOST}.pem,key=${HOST}.key <<(print "${(@q)@}"; inp=$(cat); printf "%d\n" $(wc -c <<<"${inp}"); cat <<<"${inp}") | 9 | @socat@/bin/socat STDIO,ignoreeof openssl:${NOTMUCH_HOST}:${NOTMUCH_TCP},verify=1,cafile=ca.pem,certificate=${HOST}.pem,key=${HOST}.key <<(print "${(@q)@}"; inp=$(cat); printf "%d\n" $(@coreutils@/bin/wc -c <<<"${inp}"); @coreutils@/bin/cat <<<"${inp}") |