diff options
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/default.nix | 1 | ||||
| -rw-r--r-- | nix/notmuch-ssh.nix | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/nix/default.nix b/nix/default.nix index 5665a9d..af5f4b7 100644 --- a/nix/default.nix +++ b/nix/default.nix | |||
| @@ -9,6 +9,7 @@ rec { | |||
| 9 | recv = self.callPackage ./recv.nix {}; | 9 | recv = self.callPackage ./recv.nix {}; |
| 10 | notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; | 10 | notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; |
| 11 | notmuch-links = self.callPackage ./notmuch-links.nix { inherit notmuch-tcp; }; | 11 | notmuch-links = self.callPackage ./notmuch-links.nix { inherit notmuch-tcp; }; |
| 12 | notmuch-ssh = self.callPackage ./notmuch-ssh.nix {}; | ||
| 12 | persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; | 13 | persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; |
| 13 | worktime = self.callPackage ./worktime.nix {}; | 14 | worktime = self.callPackage ./worktime.nix {}; |
| 14 | } | 15 | } |
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 | } | ||
