diff options
author | hannesweisbach <hannesweisbach@users.noreply.github.com> | 2020-08-15 17:37:13 +0200 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2020-08-15 17:37:13 +0200 |
commit | 371e2622c055878c24c40379c95f0f3c10f14086 (patch) | |
tree | dd15dd893d995c850c4e21531f23ecf0b55a7198 /pkgs/development/libraries/tk | |
parent | 09b6b045693372a5b89d0434344ad4dd632e742a (diff) |
tk: fix build on darwin
Installing libtk on macOS 10.15.5 resulted in a following warning: warning: skipping dangling symlink '/nix/store/3whl4256v6qf15dsm1d5mf0lzhfh6w06-user-environment/lib/libtk.so' which was caused by the following code in generic.nix of the tk derivation: ln -s $out/lib/libtk${super.tcl.release}.so $out/lib/libtk.so Shared libraries on macOS are suffixed `.dylib' not 'so' so libtk${version}.so does not actually exist. Consequently a symlink from libtk.dylib is never created and linking against tk fails.
Diffstat (limited to 'pkgs/development/libraries/tk')
-rw-r--r-- | pkgs/development/libraries/tk/generic.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix index 745be0be922fa..1cbf4026cb882 100644 --- a/pkgs/development/libraries/tk/generic.nix +++ b/pkgs/development/libraries/tk/generic.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { postInstall = '' ln -s $out/bin/wish* $out/bin/wish cp ../{unix,generic}/*.h $out/include - ln -s $out/lib/libtk${tcl.release}.so $out/lib/libtk.so + 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 |