Skip to content

Commit

Permalink
buildLinux: allow overriding stdenv on each call
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Aug 20, 2017
1 parent 0a4d102 commit 7c7c83e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/testing/minimal-kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/kernel/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let
};

kernel = buildLinux {
inherit version modDirVersion src kernelPatches;
inherit version modDirVersion src kernelPatches stdenv;

configfile = configfile.nativeDrv or configfile;

Expand Down
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/kernel/manual-config.nix
Original file line number Diff line number Diff line change
@@ -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
}:
Expand All @@ -14,6 +14,8 @@ let
echo "}" >> $out
'').outPath;
in {
# Allow overriding stdenv on each buildLinux call
stdenv,

This comment has been minimized.

Copy link
@elitak

elitak Aug 25, 2017

Contributor

Is there a reason why stdenv doesn't have the obvious default value? Why break all existing invocations?

This comment has been minimized.

Copy link
@vcunat

vcunat Aug 25, 2017

Author Member

I had that in one working version but later just pushed this "simpler" one. I don't recall any particular reason.

# The kernel version
version,
# The version of the kernel module directory
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}));

Expand Down

0 comments on commit 7c7c83e

Please sign in to comment.