···11# requires numpy
12, enablePythonApi ? false
13, python3
014, enableExamples ? false
15, enableUtils ? false
16-, enableSim ? false
17, libusb1
18, enableDpdk ? false
19, dpdk
···34let
35 onOffBool = b: if b then "ON" else "OFF";
36 inherit (lib) optionals;
0000037in
3839stdenv.mkDerivation rec {
···84 ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
85 ;
8687- # Python + mako are always required for the build itself but not necessary for runtime.
88- pythonEnv = python3.withPackages (ps: with ps; [ mako ]
89- ++ optionals (enablePythonApi) [ numpy setuptools ]
90- ++ optionals (enableUtils) [ requests six ]
91- );
9293 nativeBuildInputs = [
94 cmake
95 pkg-config
96- python3
97- ]
98- # If both enableLibuhd_Python_api and enableUtils are off, we don't need
99- # pythonEnv in buildInputs as it's a 'build' dependency and not a runtime
100- # dependency
101- ++ optionals (!enablePythonApi && !enableUtils) [ pythonEnv ]
102- ;
103 buildInputs = [
104 boost
105 libusb1
···122 patches = [
123 # Disable tests that fail in the sandbox
124 ./no-adapter-tests.patch
125- ] ++ lib.optionals stdenv.isAarch32 [
126- ./neon.patch
127 ];
128129 postPhases = [ "installFirmware" "removeInstalledTests" ]
···11# requires numpy
12, enablePythonApi ? false
13, python3
14+, buildPackages
15, enableExamples ? false
16, enableUtils ? false
017, libusb1
18, enableDpdk ? false
19, dpdk
···34let
35 onOffBool = b: if b then "ON" else "OFF";
36 inherit (lib) optionals;
37+ # Later used in pythonEnv generation. Python + mako are always required for the build itself but not necessary for runtime.
38+ pythonEnvArg = (ps: with ps; [ mako ]
39+ ++ optionals (enablePythonApi) [ numpy setuptools ]
40+ ++ optionals (enableUtils) [ requests six ]
41+ );
42in
4344stdenv.mkDerivation rec {
···89 ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
90 ;
9192+ pythonEnv = python3.withPackages pythonEnvArg;
00009394 nativeBuildInputs = [
95 cmake
96 pkg-config
97+ # Present both here and in buildInputs for cross compilation.
98+ (buildPackages.python3.withPackages pythonEnvArg)
99+ ];
0000100 buildInputs = [
101 boost
102 libusb1
···119 patches = [
120 # Disable tests that fail in the sandbox
121 ./no-adapter-tests.patch
00122 ];
123124 postPhases = [ "installFirmware" "removeInstalledTests" ]
-19
pkgs/applications/radio/uhd/neon.patch
···1-Description: When building for armhf, enable NEON
2- NEON is part of the armhf baseline, so this will always be enabled on
3- armhf.
4-Author: Paul Tagliamonte <paultag@debian.org>
5-Bug-Debian: https://bugs.debian.org/873608
6-Origin: vendor
7-Last-Update: 2017-08-29
8-9---- uhd-3.10.2.0.orig/host/lib/convert/CMakeLists.txt
10-+++ uhd-3.10.2.0/host/lib/convert/CMakeLists.txt
11-@@ -67,6 +67,8 @@ IF(HAVE_ARM_NEON_H AND (${CMAKE_SIZEOF_V
12- ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
13- ${CMAKE_CURRENT_SOURCE_DIR}/convert_neon.S
14- )
15-+
16-+ SET ( CMAKE_CXX_FLAGS "-mfpu=neon" )
17- ENDIF()
18-19- ########################################################################