From b8ff9a4c507c78a2b32b36ff328035568d364701 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 14 Aug 2025 23:26:41 +0300 Subject: [PATCH] gnuradio.pkgs.mkDerivation: nixfmt --- .../gnuradio-modules/mkDerivation.nix | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/pkgs/development/gnuradio-modules/mkDerivation.nix b/pkgs/development/gnuradio-modules/mkDerivation.nix index b18e24b6a2bc..7a3b32563d10 100644 --- a/pkgs/development/gnuradio-modules/mkDerivation.nix +++ b/pkgs/development/gnuradio-modules/mkDerivation.nix @@ -8,37 +8,38 @@ mkDerivation: args: let -# Common validation and processing logic -processArgs = args: -# Check if it's supposed to not get built for the current gnuradio version -if (builtins.hasAttr "disabled" args) && args.disabled then - let - name = args.name or "${args.pname}"; - in - throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}" -else + # Common validation and processing logic + processArgs = + args: + # Check if it's supposed to not get built for the current gnuradio version + if (builtins.hasAttr "disabled" args) && args.disabled then + let + name = args.name or "${args.pname}"; + in + throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}" + else -if builtins.hasAttr "disabledForGRafter" args then - throw '' - `disabledForGRafter` is superseded by `disabled`. - Use `disabled = gnuradioAtLeast "${args.disabledForGRafter}";` instead. - '' -else + if builtins.hasAttr "disabledForGRafter" args then + throw '' + `disabledForGRafter` is superseded by `disabled`. + Use `disabled = gnuradioAtLeast "${args.disabledForGRafter}";` instead. + '' + else - let - args_ = { - enableParallelBuilding = args.enableParallelBuilding or true; - nativeBuildInputs = (args.nativeBuildInputs or [ ]); - # We add gnuradio and volk itself by default - most gnuradio based packages - # will not consider it a dependency worth mentioning and it will almost - # always be needed - buildInputs = (args.buildInputs or [ ]) ++ [ - unwrapped - unwrapped.volk - ]; - }; - in - args // args_; + let + args_ = { + enableParallelBuilding = args.enableParallelBuilding or true; + nativeBuildInputs = (args.nativeBuildInputs or [ ]); + # We add gnuradio and volk itself by default - most gnuradio based packages + # will not consider it a dependency worth mentioning and it will almost + # always be needed + buildInputs = (args.buildInputs or [ ]) ++ [ + unwrapped + unwrapped.volk + ]; + }; + in + args // args_; in if builtins.isFunction args then