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

Commits on Dec 31, 2020

  1. nix: fix closure bloat on nix

    The conditional preventing closure bloat unfortunately didn't apply for
    the `nix` attribute, which is at 2.3.10 (not 2.4.*, what this did check
    for).
    
    Due to the somewhat funny 2.4pre* version strings used for nixUnstable
    not being understood by lib.versionOlder, we also need to explicitly add
    a check for that.
    flokli committed Dec 31, 2020
    Copy the full SHA
    3199943 View commit details

Commits on Jan 1, 2021

  1. Merge pull request #108069 from flokli/nix-fix-closurebloat-cross

    nix: fix closure bloat on `nix`
    flokli authored Jan 1, 2021
    Copy the full SHA
    4bc3f83 View commit details
Showing with 9 additions and 4 deletions.
  1. +9 −4 pkgs/tools/package-management/nix/default.nix
13 changes: 9 additions & 4 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
@@ -33,7 +33,6 @@ common =
version = lib.getVersion name;

is24 = lib.versionAtLeast version "2.4pre";
isExactly24 = lib.versionAtLeast version "2.4" && lib.versionOlder version "2.4";

VERSION_SUFFIX = suffix;

@@ -93,9 +92,15 @@ common =
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
''}
'' +
# For Nix 2.4, patch around an issue where the Nix configure step pulls in the
# build system's bash and other utilities when cross-compiling
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly24) ''
# On all versions before c9f51e87057652db0013289a95deffba495b35e7,
# released with 2.3.8, we need to patch around an issue where the Nix
# configure step pulls in the build system's bash and other utilities
# when cross-compiling.
lib.optionalString (
stdenv.buildPlatform != stdenv.hostPlatform &&
(lib.versionOlder "2.3.8" (lib.traceVal version) && !is24)
# The additional is24 condition is required as versionOlder doesn't understand nixUnstable version strings
) ''
mkdir tmp/
substitute corepkgs/config.nix.in tmp/config.nix.in \
--subst-var-by bash ${bash}/bin/bash \