Skip to content

Commit

Permalink
fix some packages on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
gridaphobe committed Aug 22, 2014
1 parent fc9565d commit 1753a20
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 5 deletions.
1 change: 0 additions & 1 deletion pkgs/development/compilers/llvm/3.4/llvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@ in stdenv.mkDerivation rec {
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ shlevy lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all;
# broken = stdenv.isDarwin;
};
}
2 changes: 2 additions & 0 deletions pkgs/development/compilers/ocaml/4.01.0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
sha256 = "b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a";
};

patches = [ ./fix-clang-build-on-osx.diff ];

prefixKey = "-prefix ";
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11lib
"-x11include" x11inc ];
Expand Down
20 changes: 20 additions & 0 deletions pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/configure b/configure
index d45e88f..25d872b 100755
--- a/configure
+++ b/configure
@@ -322,7 +322,14 @@ case "$bytecc,$target" in
bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
mathlib="";;
*,*-*-darwin*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ # On recent version of OSX, gcc is a symlink to clang
+ if $bytecc --version | grep -q clang; then
+ # -fno-defer-pop is not supported by clang, and make recent
+ # versions of clang to fail
+ bytecccompopts="$gcc_warnings"
+ else
+ bytecccompopts="-fno-defer-pop $gcc_warnings"
+ fi
mathlib=""
mkexe="$mkexe -Wl,-no_compact_unwind"
# Tell gcc that we can use 32-bit code addresses for threaded code
1 change: 1 addition & 0 deletions pkgs/development/tools/misc/sloccount/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ stdenv.mkDerivation rec {

configurePhase = ''
sed -i "makefile" -"es|PREFIX[[:blank:]]*=.*$|PREFIX = $out|g"
sed -i "makefile" -"es|gcc|$CC|g"
'';

doCheck = true;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shells/fish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
description = "Smart and user-friendly command line shell";
homepage = "http://fishshell.com/";
license = licenses.gpl2;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ ocharles ];
};
}
2 changes: 2 additions & 0 deletions pkgs/tools/compression/bzip2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ stdenv.mkDerivation {
sharedLibrary =
!stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;

patchPhase = stdenv.lib.optionalString stdenv.isDarwin "substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang'";

preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'";

makeFlags = if linkStatic then "LDFLAGS=-static" else "";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/networking/isync/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
license = [ "GPLv2+" ];

maintainers = with stdenv.lib.maintainers; [ the-kenny viric ];
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
};
}
2 changes: 1 addition & 1 deletion pkgs/tools/typesetting/tex/tex4ht/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
cd src
for f in tex4ht t4ht htcmd ; do
# -DENVFILE="$out/share/texmf-nix/tex4ht/base/unix/tex4ht.env"
gcc -o $f $f.c -I${tetex}/include -L${tetex}/lib -DHAVE_DIRENT_H -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea
$CC -o $f $f.c -I${tetex}/include -L${tetex}/lib -DHAVE_DIRENT_H -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea
done
cd -
'';
Expand Down
1 change: 0 additions & 1 deletion pkgs/tools/typesetting/tex/texlive/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ rec {
setupHook = ./setup-hook.sh;

doMainBuild = fullDepEntry ( stdenv.lib.optionalString stdenv.isDarwin ''
export MACOSX_DEPLOYMENT_TARGET=10.9
export DYLD_LIBRARY_PATH="${poppler}/lib"
'' + ''
mkdir -p $out
Expand Down

0 comments on commit 1753a20

Please sign in to comment.