diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2017-08-29 06:39:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-29 06:39:42 +0100 |
commit | 18036996a50a460da19aaee1c80286c8595274f7 (patch) | |
tree | 3662ea5eedfeabf36860c9258187c5ba24136954 | |
parent | d25134b196ea6dba3c55da33fac48fad18184747 (diff) | |
parent | 56beae4db6c00b493c1dcdabd7a63721bb852e77 (diff) | |
download | nixlib-18036996a50a460da19aaee1c80286c8595274f7.tar nixlib-18036996a50a460da19aaee1c80286c8595274f7.tar.gz nixlib-18036996a50a460da19aaee1c80286c8595274f7.tar.bz2 nixlib-18036996a50a460da19aaee1c80286c8595274f7.tar.lz nixlib-18036996a50a460da19aaee1c80286c8595274f7.tar.xz nixlib-18036996a50a460da19aaee1c80286c8595274f7.tar.zst nixlib-18036996a50a460da19aaee1c80286c8595274f7.zip |
Merge pull request #28664 from NeQuissimus/ply_folder_kernel
ply: Allow building for git-fetched kernels
-rw-r--r-- | pkgs/os-specific/linux/ply/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/ply/default.nix b/pkgs/os-specific/linux/ply/default.nix index a9c84516ef84..8ae731892768 100644 --- a/pkgs/os-specific/linux/ply/default.nix +++ b/pkgs/os-specific/linux/ply/default.nix @@ -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 |