summaryrefslogtreecommitdiff
path: root/nix/notmuch-ssh.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2020-03-08 22:46:45 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2020-03-08 22:46:45 +0100
commit368898379638a33578613b2169fa8c4205c44902 (patch)
tree6285ca782f83dc9fb2fe29dec1b113636b633182 /nix/notmuch-ssh.nix
parentc75b6f1cb45ccbb41af696a2c1bf8176d7bd921e (diff)
downloadutils-368898379638a33578613b2169fa8c4205c44902.tar
utils-368898379638a33578613b2169fa8c4205c44902.tar.gz
utils-368898379638a33578613b2169fa8c4205c44902.tar.bz2
utils-368898379638a33578613b2169fa8c4205c44902.tar.xz
utils-368898379638a33578613b2169fa8c4205c44902.zip
...
Diffstat (limited to 'nix/notmuch-ssh.nix')
-rw-r--r--nix/notmuch-ssh.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nix/notmuch-ssh.nix b/nix/notmuch-ssh.nix
new file mode 100644
index 0000000..6d8bb6c
--- /dev/null
+++ b/nix/notmuch-ssh.nix
@@ -0,0 +1,34 @@
1{ stdenv
2, python38
3, zsh
4, notmuch
5, openssh
6}:
7
8stdenv.mkDerivation rec {
9 pname = "notmuch-ssh";
10 version = "1.0";
11 src = [../notmuch-ssh-client ../notmuch-ssh-server];
12
13 phases = [ "unpackPhase" "buildPhase" "installPhase" ];
14
15 python = python38.withPackages (ps: with ps; [pyxdg configparser]);
16 inherit zsh notmuch openssh;
17
18 unpackPhase = ''
19 for srcFile in $src; do
20 cp $srcFile $(stripHash $srcFile)
21 done
22 '';
23
24 buildPhase = ''
25 substituteAllInPlace notmuch-ssh-client
26 substituteAllInPlace notmuch-ssh-server
27 '';
28
29 installPhase = ''
30 install -m 0755 -D -t $out/bin \
31 notmuch-ssh-client notmuch-ssh-server
32 ln -s notmuch-ssh-client $out/bin/notmuch-ssh
33 '';
34}