Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e6f5583c6e0d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 61517de024cc
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jul 28, 2020

  1. libtapi: fix build, install phase and install name

    installTarget looks like a typo for installTargets. This causes a lot
    of llvm and clang to be built and installed.
    
    Clang is not intended to be an external dependency. The source bundle
    includes llvm and clang. Adding include paths and building clangBasic
    first is sufficient to use the internal clang components.
    thefloweringash committed Jul 28, 2020
    Copy the full SHA
    b418d4c View commit details

Commits on Aug 20, 2020

  1. Copy the full SHA
    630f5d3 View commit details

Commits on Sep 11, 2020

  1. Merge pull request #93912 from thefloweringash/cctools-tapi

    stdenv/darwin: enable tapi support in cctools
    matthewbauer authored Sep 11, 2020
    Copy the full SHA
    61517de View commit details
Showing with 25 additions and 16 deletions.
  1. +21 −7 pkgs/os-specific/darwin/libtapi/default.nix
  2. +2 −9 pkgs/stdenv/darwin/default.nix
  3. +2 −0 pkgs/stdenv/darwin/make-bootstrap-tools.nix
28 changes: 21 additions & 7 deletions pkgs/os-specific/darwin/libtapi/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, python3, clang_6 }:
{ lib, stdenv, fetchFromGitHub, cmake, python3, ncurses }:

stdenv.mkDerivation {
name = "libtapi-1000.10.8";
@@ -9,22 +9,36 @@ stdenv.mkDerivation {
sha256 = "1a19h39a48agvnmal99n9j1fjadiqwib7hfzmn342wmgh9z3vk0g";
};

sourceRoot = "source/src/llvm";

nativeBuildInputs = [ cmake python3 ];
buildInputs = [ clang_6.cc ];

# ncurses is required here to avoid a reference to bootstrap-tools, which is
# not allowed for the stdenv.
buildInputs = [ ncurses ];

cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];

# fixes: fatal error: 'clang/Basic/Diagnostic.h' file not found
# adapted from upstream
# https://github.com/tpoechtrager/apple-libtapi/blob/3cb307764cc5f1856c8a23bbdf3eb49dfc6bea48/build.sh#L58-L60
preConfigure = ''
cd src/llvm
INCLUDE_FIX="-I $PWD/projects/clang/include"
INCLUDE_FIX+=" -I $PWD/build/projects/clang/include"
cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="$INCLUDE_FIX")
'';

cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];
buildFlags = [ "clangBasic" "libtapi" ];

buildFlags = [ "libtapi" ];
installTargets = [ "install-libtapi" "install-tapi-headers" ];

installTarget = "install-libtapi";
postInstall = ''
install_name_tool -id $out/lib/libtapi.dylib $out/lib/libtapi.dylib
'';

meta = with lib; {
license = licenses.apsl20;
maintainers = with maintainers; [ matthewbauer ];
};

}
11 changes: 2 additions & 9 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
@@ -198,12 +198,6 @@ in rec {
python3 = super.python3Minimal;

ninja = super.ninja.override { buildDocs = false; };

darwin = super.darwin // {
cctools = super.darwin.cctools.override {
enableTapiSupport = false;
};
};
};
in with prevStage; stageFun 1 prevStage {
extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
@@ -305,7 +299,7 @@ in rec {
persistent = self: super: with prevStage; {
inherit
gnumake gzip gnused bzip2 gawk ed xz patch bash python3
ncurses libffi zlib gmp pcre gnugrep
ncurses libffi zlib gmp pcre gnugrep cmake
coreutils findutils diffutils patchutils ninja libxml2;

# Hack to make sure we don't link ncurses in bootstrap tools. The proper
@@ -330,7 +324,6 @@ in rec {
darwin = super.darwin // rec {
inherit (darwin) dyld Libsystem libiconv locale;

cctools = super.darwin.cctools.override { enableTapiSupport = false; };
CF = super.darwin.CF.override {
inherit libxml2;
python3 = prevStage.python3;
@@ -419,7 +412,7 @@ in rec {
curl.out openssl.out libssh2.out nghttp2.lib libkrb5
cc.expand-response-params libxml2.out
]) ++ (with pkgs.darwin; [
dyld Libsystem CF cctools ICU libiconv locale
dyld Libsystem CF cctools ICU libiconv locale libtapi
]);

overrides = lib.composeExtensions persistent (self: super: {
2 changes: 2 additions & 0 deletions pkgs/stdenv/darwin/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
@@ -100,6 +100,8 @@ in rec {
cp ${cctools_}/bin/$i $out/bin
done
cp -d ${darwin.libtapi}/lib/libtapi* $out/lib
cp -rd ${pkgs.darwin.CF}/Library $out
chmod -R u+w $out