From a0912e7093b74b930bb290252dd424c7911a1fb8 Mon Sep 17 00:00:00 2001 From: Ruslan Babayev Date: Tue, 31 May 2016 22:39:40 -0700 Subject: [PATCH] dpdk: make primary output usable as RTE_SDK --- pkgs/os-specific/linux/dpdk/default.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 94e18ea894e5..96f51ebec2b4 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -33,8 +33,25 @@ stdenv.mkDerivation rec { ''; installPhase = '' - mkdir $out - cp -pr x86_64-native-linuxapp-gcc/{lib,include} $out/ + install -m 0755 -d $out/lib + install -m 0644 ${RTE_TARGET}/lib/*.a $out/lib + + install -m 0755 -d $out/include + install -m 0644 ${RTE_TARGET}/include/*.h $out/include + + install -m 0755 -d $out/include/generic + install -m 0644 ${RTE_TARGET}/include/generic/*.h $out/include/generic + + install -m 0755 -d $out/include/exec-env + install -m 0644 ${RTE_TARGET}/include/exec-env/*.h $out/include/exec-env + + install -m 0755 -d $out/${RTE_TARGET} + install -m 0644 ${RTE_TARGET}/.config $out/${RTE_TARGET} + + install -m 0755 -d $out/${RTE_TARGET}/include + install -m 0644 ${RTE_TARGET}/include/rte_config.h $out/${RTE_TARGET}/include + + cp -pr mk scripts $out/ mkdir -p $kmod/lib/modules/${kernel.modDirVersion}/kernel/drivers/net cp ${RTE_TARGET}/kmod/*.ko $kmod/lib/modules/${kernel.modDirVersion}/kernel/drivers/net