diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix index 476a954f8181..873c49dd9a7c 100644 --- a/pkgs/applications/radio/uhd/default.nix +++ b/pkgs/applications/radio/uhd/default.nix @@ -11,9 +11,9 @@ # requires numpy , enablePythonApi ? false , python3 +, buildPackages , enableExamples ? false , enableUtils ? false -, enableSim ? false , libusb1 , enableDpdk ? false , dpdk @@ -34,6 +34,11 @@ let onOffBool = b: if b then "ON" else "OFF"; inherit (lib) optionals; + # Later used in pythonEnv generation. Python + mako are always required for the build itself but not necessary for runtime. + pythonEnvArg = (ps: with ps; [ mako ] + ++ optionals (enablePythonApi) [ numpy setuptools ] + ++ optionals (enableUtils) [ requests six ] + ); in stdenv.mkDerivation rec { @@ -84,22 +89,14 @@ stdenv.mkDerivation rec { ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ] ; - # Python + mako are always required for the build itself but not necessary for runtime. - pythonEnv = python3.withPackages (ps: with ps; [ mako ] - ++ optionals (enablePythonApi) [ numpy setuptools ] - ++ optionals (enableUtils) [ requests six ] - ); + pythonEnv = python3.withPackages pythonEnvArg; nativeBuildInputs = [ cmake pkg-config - python3 - ] - # If both enableLibuhd_Python_api and enableUtils are off, we don't need - # pythonEnv in buildInputs as it's a 'build' dependency and not a runtime - # dependency - ++ optionals (!enablePythonApi && !enableUtils) [ pythonEnv ] - ; + # Present both here and in buildInputs for cross compilation. + (buildPackages.python3.withPackages pythonEnvArg) + ]; buildInputs = [ boost libusb1 @@ -122,8 +119,6 @@ stdenv.mkDerivation rec { patches = [ # Disable tests that fail in the sandbox ./no-adapter-tests.patch - ] ++ lib.optionals stdenv.isAarch32 [ - ./neon.patch ]; postPhases = [ "installFirmware" "removeInstalledTests" ] diff --git a/pkgs/applications/radio/uhd/neon.patch b/pkgs/applications/radio/uhd/neon.patch deleted file mode 100644 index 18ec59c1d64b..000000000000 --- a/pkgs/applications/radio/uhd/neon.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: When building for armhf, enable NEON - NEON is part of the armhf baseline, so this will always be enabled on - armhf. -Author: Paul Tagliamonte -Bug-Debian: https://bugs.debian.org/873608 -Origin: vendor -Last-Update: 2017-08-29 - ---- uhd-3.10.2.0.orig/host/lib/convert/CMakeLists.txt -+++ uhd-3.10.2.0/host/lib/convert/CMakeLists.txt -@@ -67,6 +67,8 @@ IF(HAVE_ARM_NEON_H AND (${CMAKE_SIZEOF_V - ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/convert_neon.S - ) -+ -+ SET ( CMAKE_CXX_FLAGS "-mfpu=neon" ) - ENDIF() - - ########################################################################