Merge pull request #28664 from NeQuissimus/ply_folder_kernel

ply: Allow building for git-fetched kernels

authored by Jörg Thalheim and committed by GitHub 18036996 d25134b1

+11 -3
+11 -3
pkgs/os-specific/linux/ply/default.nix
··· 16 16 }; 17 17 18 18 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 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 22 30 23 31 configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*)) 24 32 ./autogen.sh --prefix=$out