From 7c7c83e2335c3aa6f26a4f9c905c49c430b5be09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 08:07:29 +0200 Subject: [PATCH] buildLinux: allow overriding stdenv on each call --- nixos/modules/testing/minimal-kernel.nix | 2 +- pkgs/os-specific/linux/kernel/generic.nix | 2 +- pkgs/os-specific/linux/kernel/manual-config.nix | 4 +++- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/testing/minimal-kernel.nix b/nixos/modules/testing/minimal-kernel.nix index a463cb803ad..7c2b9c05cf9 100644 --- a/nixos/modules/testing/minimal-kernel.nix +++ b/nixos/modules/testing/minimal-kernel.nix @@ -6,7 +6,7 @@ let ); origKernel = pkgs.buildLinux { - inherit (pkgs.linux) src version; + inherit (pkgs.linux) src version stdenv; inherit configfile; allowImportFromDerivation = true; kernelPatches = [ pkgs.kernelPatches.cifs_timeout_2_6_38 ]; diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index bbe86792692..379d3cad970 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -103,7 +103,7 @@ let }; kernel = buildLinux { - inherit version modDirVersion src kernelPatches; + inherit version modDirVersion src kernelPatches stdenv; configfile = configfile.nativeDrv or configfile; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 70544ff9294..8227475f1b1 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -1,4 +1,4 @@ -{ stdenv, runCommand, nettools, bc, perl, gmp, libmpc, mpfr, kmod, openssl +{ runCommand, nettools, bc, perl, gmp, libmpc, mpfr, kmod, openssl , writeTextFile, ubootChooser , hostPlatform }: @@ -14,6 +14,8 @@ let echo "}" >> $out '').outPath; in { + # Allow overriding stdenv on each buildLinux call + stdenv, # The kernel version version, # The version of the kernel module directory diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 84db868ced3..7e35bd05291 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12281,7 +12281,7 @@ with pkgs; linuxPackages_custom = { version, src, configfile }: recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig { - inherit version src configfile; + inherit version src configfile stdenv; allowImportFromDerivation = true; }));