diff options
Diffstat (limited to 'nix/notmuch-ssh.nix')
-rw-r--r-- | nix/notmuch-ssh.nix | 34 |
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 | |||
8 | stdenv.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 | } | ||