about summary refs log tree commit diff
path: root/pkgs/tools/misc/remind/default.nix
diff options
context:
space:
mode:
authorKovacsics Robert (NixOS) <kovirobi@gmail.com>2016-10-18 16:28:38 +0100
committerKovacsics Robert (NixOS) <kovirobi@gmail.com>2016-10-24 11:24:04 +0100
commitb5417b3e7720b5a59eea23fa27521d257348ea6f (patch)
tree9e46518567bc882d481f301838afc1aa0249ece9 /pkgs/tools/misc/remind/default.nix
parent09e4b78b48fa9b5da00f44d2c01f0f9f16c3d406 (diff)
downloadnixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.tar
nixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.tar.gz
nixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.tar.bz2
nixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.tar.lz
nixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.tar.xz
nixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.tar.zst
nixlib-b5417b3e7720b5a59eea23fa27521d257348ea6f.zip
remind: fix tkremind
Diffstat (limited to 'pkgs/tools/misc/remind/default.nix')
-rw-r--r--pkgs/tools/misc/remind/default.nix25
1 files changed, 23 insertions, 2 deletions
diff --git a/pkgs/tools/misc/remind/default.nix b/pkgs/tools/misc/remind/default.nix
index 11d6991b89cb..dfda07fda4e4 100644
--- a/pkgs/tools/misc/remind/default.nix
+++ b/pkgs/tools/misc/remind/default.nix
@@ -1,12 +1,33 @@
-{stdenv, fetchurl} :
+{stdenv, fetchurl, tk, tcllib, makeWrapper
+, tkremind ? true
+} :
 
-stdenv.mkDerivation {
+assert tkremind -> tk != null;
+assert tkremind -> tcllib != null;
+assert tkremind -> makeWrapper != null;
+
+stdenv.mkDerivation rec {
   name = "remind-3.1.15";
   src = fetchurl {
     url = http://www.roaringpenguin.com/files/download/remind-03.01.15.tar.gz;
     sha256 = "1hcfcxz5fjzl7606prlb7dgls5kr8z3wb51h48s6qm8ang0b9nla";
   };
 
+  tclLibraries = if tkremind then [ tcllib tk ] else [];
+  tclLibPaths = stdenv.lib.concatStringsSep " "
+    (map (p: "${p}/lib/${p.libPrefix}") tclLibraries);
+
+  buildInputs = if tkremind then [ makeWrapper ] else [];
+  propagatedBuildInputs = tclLibraries;
+
+  postPatch = if tkremind then ''
+    substituteInPlace scripts/tkremind --replace "exec wish" "exec ${tk}/bin/wish"
+  '' else "";
+
+  postInstall = if tkremind then ''
+    wrapProgram $out/bin/tkremind --set TCLLIBPATH "${tclLibPaths}"
+  '' else "";
+
   meta = {
     homepage = http://www.roaringpenguin.com/products/remind;
     description = "Sophisticated calendar and alarm program for the console";