about summary refs log tree commit diff
path: root/pkgs/development/interpreters/tcl/generic.nix
blob: a472ccaafbf2dc404fd254148cdfe1dfb8e2ed73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ stdenv

# Version specific stuff
, release, version, src
, ...
}:

stdenv.mkDerivation rec {
  name = "tcl-${version}";

  inherit src;

  outputs = [ "out" "man" ];

  setOutputFlags = false;

  preConfigure = ''
    # Note: using $out instead of $man to prevent a runtime dependency on $man.
    configureFlagsArray+=(--mandir=$out/share/man --enable-man-symlinks)

    # Don't install tzdata because NixOS already has a more up-to-date copy.
    configureFlagsArray+=(--with-tzdata=no)

    cd unix
  '';

  enableParallelBuilding = true;

  postInstall = ''
    make install-private-headers
    ln -s $out/bin/tclsh${release} $out/bin/tclsh
  '';

  meta = with stdenv.lib; {
    description = "The Tcl scription language";
    homepage = http://www.tcl.tk/;
    license = licenses.tcltk;
    platforms = platforms.all;
    maintainers = with maintainers; [ wkennington vrthra ];
  };

  passthru = rec {
    inherit release version;
    libPrefix = "tcl${release}";
    libdir = "lib/${libPrefix}";
  };
}