Merge pull request #28664 from NeQuissimus/ply_folder_kernel

ply: Allow building for git-fetched kernels
This commit is contained in:
Jörg Thalheim 2017-08-29 06:39:42 +01:00 committed by GitHub
commit 18036996a5

View file

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