get rid of nasty CC stuff
This commit is contained in:
parent
0577499d74
commit
6f949b2e87
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
configurePhase =
|
configurePhase =
|
||||||
if stdenv.isDarwin
|
if stdenv.isDarwin
|
||||||
then ''
|
then ''
|
||||||
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC=clang )
|
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC="$CC" )
|
||||||
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' )
|
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' )
|
||||||
'' else ''
|
'' else ''
|
||||||
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" )
|
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" )
|
||||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation (rec {
|
|||||||
++ (if cxx then [ "--enable-cxx" ]
|
++ (if cxx then [ "--enable-cxx" ]
|
||||||
else [ "--disable-cxx" ])
|
else [ "--disable-cxx" ])
|
||||||
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
||||||
++ optional stdenv.isDarwin "ABI=64 CC=clang"
|
++ optional stdenv.isDarwin "ABI=64"
|
||||||
++ optional stdenv.is64bit "--with-pic"
|
++ optional stdenv.is64bit "--with-pic"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -78,8 +78,6 @@ stdenv.mkDerivation rec {
|
|||||||
-translationdir $out/share/${name}/translations
|
-translationdir $out/share/${name}/translations
|
||||||
"
|
"
|
||||||
'' + optionalString stdenv.isDarwin ''
|
'' + optionalString stdenv.isDarwin ''
|
||||||
export CXX=clang++
|
|
||||||
export CC=clang
|
|
||||||
sed -i 's/QMAKE_CC = gcc/QMAKE_CC = clang/' mkspecs/common/g++-base.conf
|
sed -i 's/QMAKE_CC = gcc/QMAKE_CC = clang/' mkspecs/common/g++-base.conf
|
||||||
sed -i 's/QMAKE_CXX = g++/QMAKE_CXX = clang++/' mkspecs/common/g++-base.conf
|
sed -i 's/QMAKE_CXX = g++/QMAKE_CXX = clang++/' mkspecs/common/g++-base.conf
|
||||||
'';
|
'';
|
||||||
|
@ -15,9 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
configureFlags = if static then "" else "--shared";
|
configureFlags = if static then "" else "--shared";
|
||||||
|
|
||||||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
preConfigure = ''
|
||||||
export CC=clang
|
|
||||||
'' + ''
|
|
||||||
if test -n "$crossConfig"; then
|
if test -n "$crossConfig"; then
|
||||||
export CC=$crossConfig-gcc
|
export CC=$crossConfig-gcc
|
||||||
configureFlags=${if static then "" else "--shared"}
|
configureFlags=${if static then "" else "--shared"}
|
||||||
|
@ -7,6 +7,7 @@ stdenv.mkDerivation {
|
|||||||
url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz;
|
url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz;
|
||||||
md5 = "02188ca68da27c4175d6e9f3da732101";
|
md5 = "02188ca68da27c4175d6e9f3da732101";
|
||||||
};
|
};
|
||||||
|
preBuild = ''
|
||||||
buildFlags = stdenv.lib.optional stdenv.isDarwin [ "CC=clang" ];
|
export buildFlags=CC="$CC" # for darwin
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,6 @@ stdenv.mkDerivation rec {
|
|||||||
postUnpack =
|
postUnpack =
|
||||||
'' export CPATH="${bzip2}/include"
|
'' export CPATH="${bzip2}/include"
|
||||||
export LIBRARY_PATH="${bzip2}/lib"
|
export LIBRARY_PATH="${bzip2}/lib"
|
||||||
export CXX=/usr/bin/clang++
|
|
||||||
export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
@ -34,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||||||
--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}
|
--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}
|
||||||
--disable-init-state
|
--disable-init-state
|
||||||
--enable-gc
|
--enable-gc
|
||||||
CFLAGS=-O3
|
CFLAGS=-O3 CXXFLAGS=-O3
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = "profiledir=$(out)/etc/profile.d";
|
makeFlags = "profiledir=$(out)/etc/profile.d";
|
||||||
@ -68,14 +66,10 @@ stdenv.mkDerivation rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Powerful package manager that makes package management reliable and reproducible";
|
# due to builder args bug; see
|
||||||
longDescription = ''
|
# https://github.com/NixOS/nix/commit/b224ac15201c57b40ea855f5a98b1bd166c1c7f6
|
||||||
Nix is a powerful package manager for Linux and other Unix systems that
|
broken = stdenv.isDarwin;
|
||||||
makes package management reliable and reproducible. It provides atomic
|
description = "The Nix Deployment System";
|
||||||
upgrades and rollbacks, side-by-side installation of multiple versions of
|
|
||||||
a package, multi-user package management and easy setup of build
|
|
||||||
environments.
|
|
||||||
'';
|
|
||||||
homepage = http://nixos.org/;
|
homepage = http://nixos.org/;
|
||||||
license = stdenv.lib.licenses.lgpl2Plus;
|
license = stdenv.lib.licenses.lgpl2Plus;
|
||||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||||
|
@ -37,7 +37,7 @@ stdenv.mkDerivation {
|
|||||||
prefix=$out
|
prefix=$out
|
||||||
MANDIR=$out/share/man/man1
|
MANDIR=$out/share/man/man1
|
||||||
${systemFlags}
|
${systemFlags}
|
||||||
CC=clang
|
CC="$CC"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user