From 499adf6b0c5cd0808ade19c739d9e2bed1d5b553 Mon Sep 17 00:00:00 2001 From: Andrew Brooks Date: Fri, 30 Apr 2021 18:05:22 -0500 Subject: [PATCH] remind: Simplify package with tcl.mkTclDerivation --- pkgs/tools/misc/remind/default.nix | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/misc/remind/default.nix b/pkgs/tools/misc/remind/default.nix index 293cc136c8c..d10811ffa04 100644 --- a/pkgs/tools/misc/remind/default.nix +++ b/pkgs/tools/misc/remind/default.nix @@ -3,20 +3,18 @@ , fetchurl , tk , tcllib -, makeWrapper +, tcl , tkremind ? true }: let - inherit (lib) optional optionalString; - tclLibraries = lib.optionals tkremind [ tcllib tk ]; - tclLibPaths = lib.concatStringsSep " " - (map (p: "${p}/lib/${p.libPrefix}") tclLibraries); + inherit (lib) optional optionals optionalString; + tclLibraries = optionals tkremind [ tcllib tk ]; tkremindPatch = optionalString tkremind '' substituteInPlace scripts/tkremind --replace "exec wish" "exec ${tk}/bin/wish" ''; in -stdenv.mkDerivation rec { +tcl.mkTclDerivation rec { pname = "remind"; version = "03.03.06"; @@ -25,7 +23,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-lpoMAXDJxwODY0/aoo25GRBYWFhE4uf11pR5/ITZX1s="; }; - nativeBuildInputs = optional tkremind makeWrapper; propagatedBuildInputs = tclLibraries; postPatch = '' @@ -37,10 +34,6 @@ stdenv.mkDerivation rec { ${tkremindPatch} ''; - postInstall = optionalString tkremind '' - wrapProgram $out/bin/tkremind --set TCLLIBPATH "${tclLibPaths}" - ''; - meta = with lib; { homepage = "https://dianne.skoll.ca/projects/remind/"; description = "Sophisticated calendar and alarm program for the console";