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: 82f3cd631c12
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a22797d356f5
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 28, 2018

  1. {cc,bintools}-wrapper: also replace . in config

    Some configs will have dots for version numbers. To normalize we can
    just use _ again.
    matthewbauer committed Jul 28, 2018
    Copy the full SHA
    96ce1e0 View commit details
  2. systems: fix netbsd triple parsing

    binutils expects x86_64-unknown-netbsd<version> (only 3 parts!). Any other combo seems to fail.
    
    Also handle darwin versions similarly.
    
    /cc @Ericson2314
    matthewbauer committed Jul 28, 2018
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a22797d View commit details
Showing with 8 additions and 10 deletions.
  1. +6 −4 lib/systems/parse.nix
  2. +1 −3 pkgs/build-support/bintools-wrapper/default.nix
  3. +1 −3 pkgs/build-support/cc-wrapper/default.nix
10 changes: 6 additions & 4 deletions lib/systems/parse.nix
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
with lib.lists;
with lib.types;
with lib.attrsets;
with lib.strings;
with (import ./inspect.nix { inherit lib; }).predicates;

let
@@ -179,9 +180,6 @@ rec {
} // { # aliases
# 'darwin' is the kernel for all of them. We choose macOS by default.
darwin = kernels.macos;
# TODO(@Ericson2314): Handle these Darwin version suffixes more generally.
darwin10 = kernels.macos;
darwin14 = kernels.macos;
watchos = kernels.ios;
tvos = kernels.ios;
win32 = kernels.windows;
@@ -269,6 +267,8 @@ rec {
then { cpu = elemAt l 0; kernel = elemAt l 1; abi = elemAt l 2; }
else if (elemAt l 2 == "mingw32") # autotools breaks on -gnu for window
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; abi = "gnu"; }
else if hasPrefix "netbsd" (elemAt l 2)
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
else throw "Target specification with 3 components is ambiguous";
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
}.${toString (length l)}
@@ -295,7 +295,9 @@ rec {
else if isDarwin parsed then vendors.apple
else if isWindows parsed then vendors.pc
else vendors.unknown;
kernel = getKernel args.kernel;
kernel = if hasPrefix "darwin" args.kernel then getKernel "darwin"
else if hasPrefix "netbsd" args.kernel then getKernel "netbsd"
else getKernel args.kernel;
abi =
/**/ if args ? abi then getAbi args.abi
else if isLinux parsed then
4 changes: 1 addition & 3 deletions pkgs/build-support/bintools-wrapper/default.nix
Original file line number Diff line number Diff line change
@@ -43,10 +43,8 @@ let
# The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
coreutils_bin = if nativeTools then "" else getBin coreutils;

dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config;

# See description in cc-wrapper.
infixSalt = dashlessTarget;
infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;

# The dynamic linker has different names on different platforms. This is a
# shell glob that ought to match it.
4 changes: 1 addition & 3 deletions pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
@@ -45,14 +45,12 @@ let
default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools && cc ? gcc)
"-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)";

dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config;

# The "infix salt" is a arbitrary string added in the middle of env vars
# defined by cc-wrapper's hooks so that multiple cc-wrappers can be used
# without interfering. For the moment, it is defined as the target triple,
# adjusted to be a valid bash identifier. This should be considered an
# unstable implementation detail, however.
infixSalt = dashlessTarget;
infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;

expand-response-params =
if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null"