magic-vlsi: fix darwin
Signed-off-by: Qiming Chu <cchuqiming@gmail.com>
This commit is contained in:
parent
678ffaca3c
commit
fdb85c6dd4
@ -7,11 +7,13 @@
|
|||||||
m4,
|
m4,
|
||||||
cairo,
|
cairo,
|
||||||
libX11,
|
libX11,
|
||||||
|
mesa,
|
||||||
mesa_glu,
|
mesa_glu,
|
||||||
ncurses,
|
ncurses,
|
||||||
tcl,
|
tcl,
|
||||||
tcsh,
|
tcsh,
|
||||||
tk,
|
tk,
|
||||||
|
fixDarwinDylibNames,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -26,15 +28,20 @@ stdenv.mkDerivation rec {
|
|||||||
leaveDotGit = true;
|
leaveDotGit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs =
|
||||||
|
[
|
||||||
python3
|
python3
|
||||||
git
|
git
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
fixDarwinDylibNames
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cairo
|
cairo
|
||||||
libX11
|
libX11
|
||||||
m4
|
m4
|
||||||
|
mesa
|
||||||
mesa_glu
|
mesa_glu
|
||||||
ncurses
|
ncurses
|
||||||
tcl
|
tcl
|
||||||
@ -73,7 +80,16 @@ stdenv.mkDerivation rec {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
# Fix dylib paths on macOS
|
||||||
|
install_name_tool -add_rpath ${mesa.out}/lib $out/lib/magic/tcl/tclmagic.dylib
|
||||||
|
install_name_tool -add_rpath ${mesa_glu.out}/lib $out/lib/magic/tcl/tclmagic.dylib
|
||||||
|
install_name_tool -add_rpath ${mesa.out}/lib $out/lib/magic/tcl/magicexec
|
||||||
|
install_name_tool -add_rpath ${mesa_glu.out}/lib $out/lib/magic/tcl/magicexec
|
||||||
|
'';
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
|
env.NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
|
||||||
|
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "VLSI layout tool written in Tcl";
|
description = "VLSI layout tool written in Tcl";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user