linuxManualConfig: don't require lib and stdenv arguments

Reverts https://github.com/NixOS/nixpkgs/commit/7c7c83e2335c3aa6f26a4f9c905c49c430b5be09 which was
only needed for the minimal-kernel.nix test module and clutters the call site.

stdenv can still be overridden with `linuxManualConfig.override { stdenv = ...; }`.

Changed files
+11 -11
pkgs
os-specific
top-level
+2 -2
pkgs/os-specific/linux/kernel/generic.nix
···
};
}; # end of configfile derivation
-
kernel = (callPackage ./manual-config.nix { inherit buildPackages; }) (basicArgs // {
-
inherit kernelPatches randstructSeed lib stdenv extraMakeFlags extraMeta configfile;
+
kernel = (callPackage ./manual-config.nix { inherit lib stdenv buildPackages; }) (basicArgs // {
+
inherit kernelPatches randstructSeed extraMakeFlags extraMeta configfile;
pos = builtins.unsafeGetAttrPos "version" args;
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
+7 -7
pkgs/os-specific/linux/kernel/manual-config.nix
···
-
{ lib, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
+
{ lib, stdenv, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
, libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole
}:
let
+
lib_ = lib;
+
stdenv_ = stdenv;
+
readConfig = configfile: import (runCommand "config.nix" {} ''
echo "{" > "$out"
while IFS='=' read key val; do
···
done < "${configfile}"
echo "}" >> $out
'').outPath;
-
in {
-
lib,
-
# Allow overriding stdenv on each buildLinux call
-
stdenv,
+
in lib.makeOverridable ({
# The kernel version
version,
# Position of the Linux build expression
···
# Whether to utilize the controversial import-from-derivation feature to parse the config
allowImportFromDerivation ? false,
# ignored
-
features ? null,
+
features ? null, lib ? lib_, stdenv ? stdenv_,
}:
let
···
++ extraMakeFlags;
karch = stdenv.hostPlatform.linuxArch;
-
} // (optionalAttrs (pos != null) { inherit pos; }))
+
} // (optionalAttrs (pos != null) { inherit pos; })))
+2 -2
pkgs/top-level/linux-kernels.nix
···
linux_hardkernel_latest = packages.hardkernel_4_14;
};
-
manualConfig = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});
+
manualConfig = callPackage ../os-specific/linux/kernel/manual-config.nix {};
customPackage = { version, src, modDirVersion ? lib.versions.pad 3 version, configfile, allowImportFromDerivation ? true }:
recurseIntoAttrs (packagesFor (manualConfig {
-
inherit version src modDirVersion configfile lib stdenv allowImportFromDerivation;
+
inherit version src modDirVersion configfile allowImportFromDerivation;
}));
# Derive one of the default .config files