···16 };
1718 preAutoreconf = ''
19- # ply wants to install header fails to its build directory
20- # use 7z to handle multiple archive formats transparently
21- 7z x ${kernel.src} -so | 7z x -aoa -si -ttar
000000002223 configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*))
24 ./autogen.sh --prefix=$out
···16 };
1718 preAutoreconf = ''
19+ # If kernel sources are a folder (i.e. fetched from git), we just copy them in
20+ # Since they are owned by uid 0 and read-only, we need to fix permissions
21+ if [ -d ${kernel.src} ]; then
22+ cp -r ${kernel.src} linux-${kernel.version}
23+ chown -R $(whoami): linux-${kernel.version}
24+ chmod -R a+w linux-${kernel.version}
25+ else
26+ # ply wants to install header files to its build directory
27+ # use 7z to handle multiple archive formats transparently
28+ 7z x ${kernel.src} -so | 7z x -aoa -si -ttar
29+ fi
3031 configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*))
32 ./autogen.sh --prefix=$out