9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
57 lines
1.5 KiB
Nix
57 lines
1.5 KiB
Nix
{ stdenv, lib, src, pkg-config, tcl, libXft, patches ? []
|
|
, enableAqua ? stdenv.isDarwin, darwin
|
|
, ... }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "tk-${tcl.version}";
|
|
|
|
inherit src patches;
|
|
|
|
outputs = [ "out" "man" "dev" ];
|
|
|
|
setOutputFlags = false;
|
|
|
|
preConfigure = ''
|
|
configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
|
|
cd unix
|
|
'';
|
|
|
|
postInstall = ''
|
|
ln -s $out/bin/wish* $out/bin/wish
|
|
cp ../{unix,generic}/*.h $out/include
|
|
ln -s $out/lib/libtk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary}
|
|
''
|
|
+ stdenv.lib.optionalString (stdenv.isDarwin) ''
|
|
cp ../macosx/*.h $out/include
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--enable-threads"
|
|
"--with-tcl=${tcl}/lib"
|
|
] ++ stdenv.lib.optional stdenv.is64bit "--enable-64bit"
|
|
++ stdenv.lib.optional enableAqua "--enable-aqua";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = lib.optional enableAqua (with darwin.apple_sdk.frameworks; [ Cocoa ]);
|
|
|
|
propagatedBuildInputs = [ tcl libXft ];
|
|
|
|
doCheck = false; # fails. can't find itself
|
|
|
|
inherit tcl;
|
|
|
|
passthru = rec {
|
|
inherit (tcl) release version;
|
|
libPrefix = "tk${tcl.release}";
|
|
libdir = "lib/${libPrefix}";
|
|
};
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
|
|
homepage = "https://www.tcl.tk/";
|
|
license = licenses.tcltk;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ lovek323 vrthra ];
|
|
};
|
|
}
|