From 03572bd8d94947dcb60c789b36df37fe474251be Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 22 Dec 2021 17:13:49 +0200 Subject: [PATCH] uhd: 4.0.0.0 -> 4.1.0.5 Update and remove some input arguments due to changes in cmake variables upstream. Add @doronbehar as maintainer. --- pkgs/applications/radio/uhd/default.nix | 29 ++++++++++--------------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix index 9f2f39aab2c5..6ebd15a27c96 100644 --- a/pkgs/applications/radio/uhd/default.nix +++ b/pkgs/applications/radio/uhd/default.nix @@ -6,14 +6,13 @@ , pkg-config # See https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html for dependencies explanations , boost -, enableLibuhd_C_api ? true +, enableCApi ? true # requires numpy -, enableLibuhd_Python_api ? false +, enablePythonApi ? false , python3 , enableExamples ? false , enableUtils ? false -, enableLiberio ? false -, liberio +, enableSim ? false , libusb1 , enableDpdk ? false , dpdk @@ -25,7 +24,6 @@ , enableUsrp1 ? true , enableUsrp2 ? true , enableX300 ? true -, enableN230 ? true , enableN300 ? true , enableN320 ? true , enableE300 ? true @@ -41,18 +39,18 @@ stdenv.mkDerivation rec { pname = "uhd"; # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz # and xxx.yyy.zzz. Hrmpf... style keeps changing - version = "4.0.0.0"; + version = "4.1.0.5"; src = fetchFromGitHub { owner = "EttusResearch"; repo = "uhd"; rev = "v${version}"; - sha256 = "NCyiI4pIPw0nBRFdUGpgZ/x2mWz+Qm78ZGACUnSbGSs="; + sha256 = "sha256-XBq4GkLRR2SFunFRvpPOMiIbTuUkMYf8tPAoHCoveRA="; }; # Firmware images are downloaded (pre-built) from the respective release on Github uhdImagesSrc = fetchurl { url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz"; - sha256 = "Xfx0bsHUQ5+Dp+xk0sVWWP83oyXQcUH5AX4PNEE7fY4="; + sha256 = "HctHB90ikOMkrYNyWmjGE/2HvA7xXKCUezdtiqzN+1A="; }; cmakeFlags = [ @@ -61,9 +59,8 @@ stdenv.mkDerivation rec { "-DENABLE_TESTS=ON" # This installs tests as well so we delete them via postPhases "-DENABLE_EXAMPLES=${onOffBool enableExamples}" "-DENABLE_UTILS=${onOffBool enableUtils}" - "-DENABLE_LIBUHD_C_API=${onOffBool enableLibuhd_C_api}" - "-DENABLE_LIBUHD_PYTHON_API=${onOffBool enableLibuhd_Python_api}" - "-DENABLE_LIBERIO=${onOffBool enableLiberio}" + "-DENABLE_C_API=${onOffBool enableCApi}" + "-DENABLE_PYTHON_API=${onOffBool enablePythonApi}" "-DENABLE_DPDK=${onOffBool enableDpdk}" # Devices "-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}" @@ -73,7 +70,6 @@ stdenv.mkDerivation rec { "-DENABLE_USRP1=${onOffBool enableUsrp1}" "-DENABLE_USRP2=${onOffBool enableUsrp2}" "-DENABLE_X300=${onOffBool enableX300}" - "-DENABLE_N230=${onOffBool enableN230}" "-DENABLE_N300=${onOffBool enableN300}" "-DENABLE_N320=${onOffBool enableN320}" "-DENABLE_E300=${onOffBool enableE300}" @@ -87,7 +83,7 @@ stdenv.mkDerivation rec { # Python + Mako are always required for the build itself but not necessary for runtime. pythonEnv = python3.withPackages (ps: with ps; [ Mako ] - ++ optionals (enableLibuhd_Python_api) [ numpy setuptools ] + ++ optionals (enablePythonApi) [ numpy setuptools ] ++ optionals (enableUtils) [ requests six ] ); @@ -98,7 +94,7 @@ stdenv.mkDerivation rec { # 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 (!enableLibuhd_Python_api && !enableUtils) [ pythonEnv ] + ++ optionals (!enablePythonApi && !enableUtils) [ pythonEnv ] ; buildInputs = [ boost @@ -107,8 +103,7 @@ stdenv.mkDerivation rec { # However, if enableLibuhd_Python_api *or* enableUtils is on, we need # pythonEnv for runtime as well. The utilities' runtime dependencies are # handled at the environment - ++ optionals (enableLibuhd_Python_api || enableUtils) [ pythonEnv ] - ++ optionals (enableLiberio) [ liberio ] + ++ optionals (enablePythonApi || enableUtils) [ pythonEnv ] ++ optionals (enableDpdk) [ dpdk ] ; @@ -154,6 +149,6 @@ stdenv.mkDerivation rec { homepage = "https://uhd.ettus.com/"; license = licenses.gpl3Plus; platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ bjornfor fpletz tomberek ]; + maintainers = with maintainers; [ bjornfor fpletz tomberek doronbehar ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a25b0ffc122..3d71ad8bffca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15546,9 +15546,7 @@ with pkgs; uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { }; uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { }; - uhd = callPackage ../applications/radio/uhd { - boost = boost175; - }; + uhd = callPackage ../applications/radio/uhd { }; uisp = callPackage ../development/embedded/uisp { };