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: 54a370ff5f21
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a24031317ae7
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 22, 2017

  1. ios-cross: Just properly use the cc-wrapper

    No other downstream derivations are needed anymore.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    f43ae98 View commit details

Commits on Jun 23, 2017

  1. Merge pull request #26798 from obsidiansystems/ios-cross-stdenv

    ios-cross: Just properly use the cc-wrapper
    Ericson2314 authored Jun 23, 2017
    Copy the full SHA
    a240313 View commit details
Showing with 8 additions and 29 deletions.
  1. +8 −29 pkgs/os-specific/darwin/ios-cross/default.nix
37 changes: 8 additions & 29 deletions pkgs/os-specific/darwin/ios-cross/default.nix
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
, stdenv
, coreutils
, gnugrep
, targetPlatform
, hostPlatform, targetPlatform
}:

/* As of this writing, known-good prefix/arch/simulator triples:
@@ -28,14 +28,14 @@ let

sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${sdkType}.platform/Developer/SDKs/iPhone${sdkType}${sdkVer}.sdk";

/* TODO: Properly integrate with gcc-cross-wrapper */
wrapper = import ../../../build-support/cc-wrapper {
inherit stdenv coreutils gnugrep;
in (import ../../../build-support/cc-wrapper {
inherit stdenv coreutils gnugrep runCommand;
nativeTools = false;
nativeLibc = false;
inherit binutils;
libc = runCommand "empty-libc" {} "mkdir -p $out/{lib,include}";
cc = clang;
inherit (clang) cc;
inherit hostPlatform targetPlatform;
extraBuildCommands = ''
if ! [ -d ${sdk} ]; then
echo "You must have ${sdkVer} of the iPhone${sdkType} sdk installed at ${sdk}" >&2
@@ -49,27 +49,6 @@ let
# Purposefully overwrite libc-ldflags-before, cctools ld doesn't know dynamic-linker and cc-wrapper doesn't do cross-compilation well enough to adjust
echo "-arch ${arch} -L${sdk}/usr/lib ${lib.optionalString simulator "-L${sdk}/usr/lib/system "}-i${if simulator then "os_simulator" else "phoneos"}_version_min 7.0.0" > $out/nix-support/libc-ldflags-before
'';
};
in {
cc = runCommand "${prefix}-cc" { passthru = { inherit sdkType sdkVer sdk; }; } ''
mkdir -p $out/bin
ln -sv ${wrapper}/bin/clang $out/bin/${prefix}-cc
mkdir -p $out/nix-support
echo ${llvm} > $out/nix-support/propagated-native-build-inputs
cat > $out/nix-support/setup-hook <<EOF
if test "\$dontSetConfigureCross" != "1"; then
configureFlags="\$configureFlags --host=${prefix}"
fi
EOF
fixupPhase
'';

binutils = runCommand "${prefix}-binutils" {} ''
mkdir -p $out/bin
ln -sv ${wrapper}/bin/ld $out/bin/${prefix}-ld
for prog in ar nm ranlib; do
ln -s ${binutils}/bin/$prog $out/bin/${prefix}-$prog
done
fixupPhase
'';
}
}) // {
inherit sdkType sdkVer sdk;
}