1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{ stdenv, fetchurl, flex, bison, ncurses, elfutils, bc, cpio, rsync, gmp, libmpc, mpfr, zlib, python3, gnutar, gzip, patch, xz, which, gcc }:
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 = [ stdenv fetchurl flex bison ncurses elfutils bc cpio rsync gmp libmpc mpfr zlib python3 gnutar gzip patch xz which gcc ];
preConfigure = ''
cp ${./linux_config} .config
'';
buildPhase = ''
make -j$NIX_BUILD_CORES bzImage
'';
installPhase = ''
cp arch/x86/boot/bzImage $out
'';
}
|