summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/default.nix3
-rw-r--r--nix/notmuch-links.nix24
-rw-r--r--nix/notmuch-tcp.nix22
3 files changed, 41 insertions, 8 deletions
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 @@
1self: super: 1self: super:
2 2
3{ 3rec {
4 cliparg = self.callPackage ./cliparg.nix {}; 4 cliparg = self.callPackage ./cliparg.nix {};
5 rebuild-system = self.callPackage ./rebuild-system.nix {}; 5 rebuild-system = self.callPackage ./rebuild-system.nix {};
6 pulseaudio-ctl = self.callPackage ./pulseaudio-ctl.nix {}; 6 pulseaudio-ctl = self.callPackage ./pulseaudio-ctl.nix {};
@@ -8,6 +8,7 @@ self: super:
8 rolling-directory = self.callPackage ./rolling-directory.nix {}; 8 rolling-directory = self.callPackage ./rolling-directory.nix {};
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 persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; 12 persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {};
12 worktime = self.callPackage ./worktime.nix {}; 13 worktime = self.callPackage ./worktime.nix {};
13} 14}
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 @@
1{ stdenv
2, notmuch-tcp
3, zsh, coreutils, gawk, gnused
4}:
5
6stdenv.mkDerivation rec {
7 pname = "notmuch-links";
8 version = "0.1";
9 src = ../notmuch-links;
10
11 phases = [ "buildPhase" "installPhase" ];
12
13 inherit zsh coreutils gawk gnused;
14 notmuchtcp = notmuch-tcp;
15
16 buildPhase = ''
17 substituteAll $src notmuch-links
18 '';
19
20 installPhase = ''
21 install -m 0755 -D -t $out/bin \
22 notmuch-links
23 '';
24}
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 @@
1{ stdenv 1{ stdenv
2, zsh, socat, nettools, coreutils 2, python38
3}: 3}:
4 4
5stdenv.mkDerivation rec { 5stdenv.mkDerivation rec {
6 pname = "notmuch-tcp"; 6 pname = "notmuch-tcp";
7 version = "0.1"; 7 version = "1.0";
8 src = ../notmuch-tcp; 8 src = [../notmuch-tcp-client ../notmuch-tcp-server];
9 9
10 phases = [ "buildPhase" "installPhase" ]; 10 phases = [ "unpackPhase" "buildPhase" "installPhase" ];
11 11
12 inherit zsh socat nettools coreutils; 12 python = python38;
13
14 unpackPhase = ''
15 for srcFile in $src; do
16 cp $srcFile $(stripHash $srcFile)
17 done
18 '';
13 19
14 buildPhase = '' 20 buildPhase = ''
15 substituteAll $src notmuch-tcp 21 substituteAllInPlace notmuch-tcp-client
22 substituteAllInPlace notmuch-tcp-server
16 ''; 23 '';
17 24
18 installPhase = '' 25 installPhase = ''
19 install -m 0755 -D -t $out/bin \ 26 install -m 0755 -D -t $out/bin \
20 notmuch-tcp 27 notmuch-tcp-client notmuch-tcp-server
28 ln -s notmuch-tcp-client $out/bin/notmuch-tcp
21 ''; 29 '';
22} 30}