forked from mirrors/nixpkgs
linuxManualConfig: don't require lib and stdenv arguments
Reverts 7c7c83e233
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 = ...; }`.
This commit is contained in:
parent
f677cbabe9
commit
6c563f30fe
|
@ -195,8 +195,8 @@ let
|
|||
};
|
||||
}; # 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"; };
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{ 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
|
||||
|
@ -12,10 +15,7 @@ let
|
|||
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
|
||||
|
@ -48,7 +48,7 @@ in {
|
|||
# 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
|
||||
|
@ -387,4 +387,4 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat
|
|||
++ extraMakeFlags;
|
||||
|
||||
karch = stdenv.hostPlatform.linuxArch;
|
||||
} // (optionalAttrs (pos != null) { inherit pos; }))
|
||||
} // (optionalAttrs (pos != null) { inherit pos; })))
|
||||
|
|
|
@ -593,11 +593,11 @@ in {
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue