From c9f21862006f50937f22f51155ee81ff47399730 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 7 Mar 2020 16:27:55 +0100 Subject: bump --- nix/default.nix | 3 ++- nix/notmuch-links.nix | 24 ++++++++++++++++++++++++ nix/notmuch-tcp.nix | 22 +++++++++++++++------- 3 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 nix/notmuch-links.nix (limited to 'nix') diff --git a/nix/default.nix b/nix/default.nix index 097d092..5665a9d 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,6 +1,6 @@ self: super: -{ +rec { cliparg = self.callPackage ./cliparg.nix {}; rebuild-system = self.callPackage ./rebuild-system.nix {}; pulseaudio-ctl = self.callPackage ./pulseaudio-ctl.nix {}; @@ -8,6 +8,7 @@ self: super: rolling-directory = self.callPackage ./rolling-directory.nix {}; recv = self.callPackage ./recv.nix {}; notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; + notmuch-links = self.callPackage ./notmuch-links.nix { inherit notmuch-tcp; }; persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; worktime = self.callPackage ./worktime.nix {}; } diff --git a/nix/notmuch-links.nix b/nix/notmuch-links.nix new file mode 100644 index 0000000..67ebe3b --- /dev/null +++ b/nix/notmuch-links.nix @@ -0,0 +1,24 @@ +{ stdenv +, notmuch-tcp +, zsh, coreutils, gawk, gnused +}: + +stdenv.mkDerivation rec { + pname = "notmuch-links"; + version = "0.1"; + src = ../notmuch-links; + + phases = [ "buildPhase" "installPhase" ]; + + inherit zsh coreutils gawk gnused; + notmuchtcp = notmuch-tcp; + + buildPhase = '' + substituteAll $src notmuch-links + ''; + + installPhase = '' + install -m 0755 -D -t $out/bin \ + notmuch-links + ''; +} diff --git a/nix/notmuch-tcp.nix b/nix/notmuch-tcp.nix index 59d2e39..1a1947b 100644 --- a/nix/notmuch-tcp.nix +++ b/nix/notmuch-tcp.nix @@ -1,22 +1,30 @@ { stdenv -, zsh, socat, nettools, coreutils +, python38 }: stdenv.mkDerivation rec { pname = "notmuch-tcp"; - version = "0.1"; - src = ../notmuch-tcp; + version = "1.0"; + src = [../notmuch-tcp-client ../notmuch-tcp-server]; - phases = [ "buildPhase" "installPhase" ]; + phases = [ "unpackPhase" "buildPhase" "installPhase" ]; - inherit zsh socat nettools coreutils; + python = python38; + + unpackPhase = '' + for srcFile in $src; do + cp $srcFile $(stripHash $srcFile) + done + ''; buildPhase = '' - substituteAll $src notmuch-tcp + substituteAllInPlace notmuch-tcp-client + substituteAllInPlace notmuch-tcp-server ''; installPhase = '' install -m 0755 -D -t $out/bin \ - notmuch-tcp + notmuch-tcp-client notmuch-tcp-server + ln -s notmuch-tcp-client $out/bin/notmuch-tcp ''; } -- cgit v1.2.3