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