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.
This commit is contained in:
parent
09b6b04569
commit
371e2622c0
@ -19,7 +19,7 @@ stdenv.mkDerivation {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
ln -s $out/bin/wish* $out/bin/wish
|
ln -s $out/bin/wish* $out/bin/wish
|
||||||
cp ../{unix,generic}/*.h $out/include
|
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) ''
|
+ stdenv.lib.optionalString (stdenv.isDarwin) ''
|
||||||
cp ../macosx/*.h $out/include
|
cp ../macosx/*.h $out/include
|
||||||
|
Loading…
x
Reference in New Issue
Block a user