From 368898379638a33578613b2169fa8c4205c44902 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 8 Mar 2020 22:46:45 +0100 Subject: ... --- nix/notmuch-ssh.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 nix/notmuch-ssh.nix (limited to 'nix/notmuch-ssh.nix') 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 @@ +{ stdenv +, python38 +, zsh +, notmuch +, openssh +}: + +stdenv.mkDerivation rec { + pname = "notmuch-ssh"; + version = "1.0"; + src = [../notmuch-ssh-client ../notmuch-ssh-server]; + + phases = [ "unpackPhase" "buildPhase" "installPhase" ]; + + python = python38.withPackages (ps: with ps; [pyxdg configparser]); + inherit zsh notmuch openssh; + + unpackPhase = '' + for srcFile in $src; do + cp $srcFile $(stripHash $srcFile) + done + ''; + + buildPhase = '' + substituteAllInPlace notmuch-ssh-client + substituteAllInPlace notmuch-ssh-server + ''; + + installPhase = '' + install -m 0755 -D -t $out/bin \ + notmuch-ssh-client notmuch-ssh-server + ln -s notmuch-ssh-client $out/bin/notmuch-ssh + ''; +} -- cgit v1.2.3