From 368898379638a33578613b2169fa8c4205c44902 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 8 Mar 2020 22:46:45 +0100 Subject: ... --- nix/default.nix | 1 + nix/notmuch-ssh.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 nix/notmuch-ssh.nix (limited to 'nix') 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 { recv = self.callPackage ./recv.nix {}; notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; notmuch-links = self.callPackage ./notmuch-links.nix { inherit notmuch-tcp; }; + notmuch-ssh = self.callPackage ./notmuch-ssh.nix {}; persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; worktime = self.callPackage ./worktime.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