summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ply/default.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-06-18 12:52:02 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-06-18 12:52:02 +0100
commitabc374f1273585d0114affcbbbefdfadfc4169b1 (patch)
treeb3c9233789625d36bd4bf5efbd6ec5b3c227d1b0 /pkgs/os-specific/linux/ply/default.nix
parent130082d012869ab4634a04bfef75e8a5cf08bb7b (diff)
downloadnixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.tar
nixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.tar.gz
nixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.tar.bz2
nixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.tar.lz
nixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.tar.xz
nixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.tar.zst
nixpkgs-abc374f1273585d0114affcbbbefdfadfc4169b1.zip
ply: add kernel version constraint
Diffstat (limited to 'pkgs/os-specific/linux/ply/default.nix')
-rw-r--r--pkgs/os-specific/linux/ply/default.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/ply/default.nix b/pkgs/os-specific/linux/ply/default.nix
index 9d4bdb1e27d..a9c84516ef8 100644
--- a/pkgs/os-specific/linux/ply/default.nix
+++ b/pkgs/os-specific/linux/ply/default.nix
@@ -1,9 +1,12 @@
-{ stdenv, kernel, fetchFromGitHub, autoreconfHook, yacc, flex, bison }:
+{ stdenv, kernel, fetchFromGitHub, autoreconfHook, yacc, flex, bison, p7zip }:
+
+assert kernel != null -> stdenv.lib.versionAtLeast kernel.version "4.0";
+
 let
   version = "1.0.beta1-9e810b1";
 in stdenv.mkDerivation {
   name = "ply-${version}";
-  nativeBuildInputs = [ autoreconfHook flex yacc ];
+  nativeBuildInputs = [ autoreconfHook flex yacc p7zip ];
 
   src = fetchFromGitHub {
     owner = "iovisor";
@@ -14,7 +17,9 @@ in stdenv.mkDerivation {
 
   preAutoreconf = ''
     # ply wants to install header fails to its build directory
-    xz -d < ${kernel.src} | tar -xf -
+    # use 7z to handle multiple archive formats transparently
+    7z x ${kernel.src} -so | 7z x -aoa -si -ttar
+
     configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*))
     ./autogen.sh --prefix=$out
   '';