remind: Simplify package with tcl.mkTclDerivation
This commit is contained in:
parent
87c5626e41
commit
499adf6b0c
1 changed files with 4 additions and 11 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue