Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / incrtcl / default.nix
blob4558ebbd0dcf889c7b973f2d79028bf3a9b58054
1 { lib, stdenv, fetchurl, writeText, tcl }:
3 tcl.mkTclDerivation rec {
4   pname = "incrtcl";
5   version = "4.2.3";
7   src = fetchurl {
8     url    = "mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itcl${version}.tar.gz";
9     sha256 = "sha256-idOs2GXP3ZY7ECtF+K9hg5REyK6sQ0qk+666gUQPjCY=";
10   };
12   enableParallelBuilding = true;
14   patchPhase = ''
15     substituteInPlace configure --replace "\''${TCL_SRC_DIR}/generic" "${tcl}/include"
16   '';
18   postInstall = ''
19     rmdir $out/bin
20     mv $out/lib/itcl${version}/* $out/lib
21     ln -s libitcl${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
22       $out/lib/libitcl${lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
23     rmdir $out/lib/itcl${version}
24   '';
26   setupHook = writeText "setup-hook.sh" ''
27     export ITCL_LIBRARY=@out@/lib
28   '';
30   outputs = [ "out" "dev" "man" ];
32   meta = with lib; {
33     homepage    = "https://incrtcl.sourceforge.net/";
34     description = "Object Oriented Enhancements for Tcl/Tk";
35     license     = licenses.tcltk;
36     platforms   = platforms.unix;
37     maintainers = with maintainers; [ thoughtpolice ];
38   };