uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
61
pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
Normal file
61
pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ targetPlatform
|
||||
, clang-unwrapped
|
||||
, binutils-unwrapped
|
||||
, runCommand
|
||||
|
||||
, wrapBintoolsWith
|
||||
, wrapCCWith
|
||||
, buildIosSdk, targetIosSdkPkgs
|
||||
, xcode
|
||||
, lib
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
minSdkVersion = targetPlatform.minSdkVersion or "9.0";
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
sdk = rec {
|
||||
name = "ios-sdk";
|
||||
type = "derivation";
|
||||
outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk";
|
||||
|
||||
platform = targetPlatform.xcodePlatform;
|
||||
version = targetPlatform.sdkVer;
|
||||
};
|
||||
|
||||
binutils = wrapBintoolsWith {
|
||||
libc = targetIosSdkPkgs.libraries;
|
||||
bintools = binutils-unwrapped;
|
||||
};
|
||||
|
||||
clang = (wrapCCWith {
|
||||
cc = clang-unwrapped;
|
||||
bintools = binutils;
|
||||
libc = targetIosSdkPkgs.libraries;
|
||||
extraPackages = [ "${sdk}/System" ];
|
||||
extraBuildCommands = ''
|
||||
tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp
|
||||
mv cc-cflags.tmp $out/nix-support/cc-cflags
|
||||
echo "-target ${targetPlatform.config}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags
|
||||
${lib.optionalString (lib.versionAtLeast sdk.version "14") "echo -isystem ${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 >> $out/nix-support/cc-cflags"}
|
||||
'';
|
||||
}) // {
|
||||
inherit sdk;
|
||||
};
|
||||
|
||||
libraries = let sdk = buildIosSdk; in runCommand "libSystem-prebuilt" {
|
||||
passthru = {
|
||||
inherit sdk;
|
||||
};
|
||||
} ''
|
||||
if ! [ -d ${sdk} ]; then
|
||||
echo "You must have version ${sdk.version} of the ${sdk.platform} sdk installed at ${sdk}" >&2
|
||||
exit 1
|
||||
fi
|
||||
ln -s ${sdk}/usr $out
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue