aboutsummaryrefslogtreecommitdiff
path: root/nix/kernel.nix
blob: ea8782113072c14b2d36ca61f812dc3b33fe135d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ stdenv, fetchurl, linuxKernel }:

stdenv.mkDerivation {
	name = "linux-yerba";
	src = fetchurl {
		url = "https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-7.0.11.tar.xz";
		hash = "sha256-5WyDVt2gETamBBxu+DK9Dsmb0tNd/5eDKqXsEO0BQwQ=";
	};
	buildInputs = linuxKernel.kernels.linux_7_0.buildInputs;
	preConfigure = ''
		cp ${./linux_config} .config
	'';
	buildPhase = ''
		make -j$NIX_BUILD_CORES bzImage
	'';
	installPhase = ''
		cp arch/x86/boot/bzImage $out
	'';
}