diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-08-17 10:29:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-17 10:29:12 -0500 |
commit | 4ff7702082bad838e70140091afe7e77a9f00eca (patch) | |
tree | d99a2a14e45e448442bfe669cb21fe0edf0ae7c8 /pkgs/development/libraries | |
parent | cbabebcc2e3b884296fedf8591e04f59240b3939 (diff) | |
parent | ee92ab07bae7018486af54ef3b559bf048e331a7 (diff) | |
download | nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.tar nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.tar.gz nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.tar.bz2 nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.tar.lz nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.tar.xz nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.tar.zst nixpkgs-4ff7702082bad838e70140091afe7e77a9f00eca.zip |
Merge pull request #45183 from matthewbauer/macdevelop
Assorted darwin/macOS fixes
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/libglvnd/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/libraries/qca2/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/libraries/v8/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/v8/no-xcode.patch | 64 |
4 files changed, 21 insertions, 77 deletions
diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index 7e1a2b54968..27c1cb0e390 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -16,11 +16,18 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkgconfig python2 ]; buildInputs = [ libX11 libXext glproto ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace src/GLX/Makefile.am \ + --replace "-Wl,-Bsymbolic " "" + substituteInPlace src/EGL/Makefile.am \ + --replace "-Wl,-Bsymbolic " "" + ''; + NIX_CFLAGS_COMPILE = [ "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS" # FHS paths are added so that non-NixOS applications can find vendor files. "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"" - ]; + ] ++ lib.optional stdenv.cc.isClang "-Wno-error"; # Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268 configureFlags = stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-tls"; @@ -40,6 +47,6 @@ in stdenv.mkDerivation rec { description = "The GL Vendor-Neutral Dispatch library"; homepage = https://github.com/NVIDIA/libglvnd; license = licenses.bsd2; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/libraries/qca2/default.nix b/pkgs/development/libraries/qca2/default.nix index 568e7ce07b3..ec32c44a91f 100644 --- a/pkgs/development/libraries/qca2/default.nix +++ b/pkgs/development/libraries/qca2/default.nix @@ -10,16 +10,23 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ (stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security) qt ]; + buildInputs = [ qt ] + ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; enableParallelBuilding = true; # tells CMake to use this CA bundle file if it is accessible - preConfigure = ''export QC_CERTSTORE_PATH=/etc/ssl/certs/ca-certificates.crt''; + preConfigure = '' + export QC_CERTSTORE_PATH=/etc/ssl/certs/ca-certificates.crt + ''; # tricks CMake into using this CA bundle file if it is not accessible (in a sandbox) cmakeFlags = [ "-Dqca_CERTSTORE=/etc/ssl/certs/ca-certificates.crt" ]; + postPatch = '' + sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt + ''; + meta = with stdenv.lib; { description = "Qt Cryptographic Architecture"; license = "LGPL"; diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 099794f6623..2b9fa5cc04c 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchgit, fetchFromGitHub, gyp, readline, python, which, icu -, patchelf, coreutils, cctools +, patchelf, coreutils, xcbuild , doCheck ? false , static ? false }: @@ -124,13 +124,7 @@ stdenv.mkDerivation rec { # Patch based off of: # https://github.com/cowboyd/libv8/tree/v5.1.281.67.0/patches - patches = lib.optional (!doCheck) ./libv8-5.4.232.patch - ++ stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ]; - - prePatch = '' - chmod +w tools/gyp/pylib/gyp - chmod +w tools/gyp/pylib/gyp/xcode_emulation.py - ''; + patches = lib.optional (!doCheck) ./libv8-5.4.232.patch; postPatch = '' sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,' gypfiles/gyp_v8 @@ -157,7 +151,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which ]; buildInputs = [ readline python icu ] - ++ stdenv.lib.optional stdenv.isDarwin cctools + ++ stdenv.lib.optional stdenv.isDarwin xcbuild ++ stdenv.lib.optional stdenv.isLinux patchelf; NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow -Wno-error=unused-function -Wno-error=attributes" diff --git a/pkgs/development/libraries/v8/no-xcode.patch b/pkgs/development/libraries/v8/no-xcode.patch deleted file mode 100644 index 5562ffaf64e..00000000000 --- a/pkgs/development/libraries/v8/no-xcode.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- a/tools/gyp/pylib/gyp/xcode_emulation.py -+++ a/tools/gyp/pylib/gyp/xcode_emulation.py -@@ -473,10 +473,16 @@ - - def _XcodeSdkPath(self, sdk_root): - if sdk_root not in XcodeSettings._sdk_path_cache: -- sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path') -- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path -- if sdk_root: -- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root -+ try: -+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path') -+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path -+ if sdk_root: -+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root -+ except: -+ # if this fails it's because xcodebuild failed, which means -+ # the user is probably on a CLT-only system, where there -+ # is no valid SDK root -+ XcodeSettings._sdk_path_cache[sdk_root] = None - return XcodeSettings._sdk_path_cache[sdk_root] - - def _AppendPlatformVersionMinFlags(self, lst): -@@ -606,10 +612,11 @@ - framework_root = sdk_root - else: - framework_root = '' -- config = self.spec['configurations'][self.configname] -- framework_dirs = config.get('mac_framework_dirs', []) -- for directory in framework_dirs: -- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root)) -+ if 'SDKROOT' in self._Settings(): -+ config = self.spec['configurations'][self.configname] -+ framework_dirs = config.get('mac_framework_dirs', []) -+ for directory in framework_dirs: -+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root)) - - self.configname = None - return cflags -@@ -861,10 +868,11 @@ - sdk_root = self._SdkPath() - if not sdk_root: - sdk_root = '' -- config = self.spec['configurations'][self.configname] -- framework_dirs = config.get('mac_framework_dirs', []) -- for directory in framework_dirs: -- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) -+ if 'SDKROOT' in self._Settings(): -+ config = self.spec['configurations'][self.configname] -+ framework_dirs = config.get('mac_framework_dirs', []) -+ for directory in framework_dirs: -+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) - - platform_root = self._XcodePlatformPath(configname) - if sdk_root and platform_root and self._IsXCTest(): -@@ -1358,7 +1366,7 @@ - if version: - version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0] - else: -- raise GypError("No Xcode or CLT version detected!") -+ version = "7.0.0" - # The CLT has no build information, so we return an empty string. - version_list = [version, ''] - version = version_list[0] |