From d6fa3fef68b1081c65ebb642b4dfa56d1c1162db Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 21 Oct 2021 23:59:37 +0300 Subject: gnuradio: Make hasFeature function simpler It always needs the `features` attribute of it's derivation as a last argument, so let's make it do it by it's own. --- pkgs/applications/radio/gnuradio/wrapper.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/applications/radio/gnuradio/wrapper.nix') diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index 58205f388f25d..4cbccbd51819c 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -41,7 +41,7 @@ let ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages) ++ lib.flatten (lib.mapAttrsToList ( feat: info: ( - if unwrapped.hasFeature feat unwrapped.features then + if unwrapped.hasFeature feat then (if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else []) else [] @@ -55,8 +55,8 @@ let ] # Emulating wrapGAppsHook & wrapQtAppsHook working together ++ lib.optionals ( - (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) - || (unwrapped.hasFeature "gr-qtgui" unwrapped.features) + (unwrapped.hasFeature "gnuradio-companion") + || (unwrapped.hasFeature "gr-qtgui") ) [ "--prefix" "XDG_DATA_DIRS" ":" "$out/share" "--prefix" "XDG_DATA_DIRS" ":" "$out/share/gsettings-schemas/${name}" @@ -66,7 +66,7 @@ let # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1764890.html "--prefix" "PATH" ":" "${lib.getBin glib}/bin" ] - ++ lib.optionals (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) [ + ++ lib.optionals (unwrapped.hasFeature "gnuradio-companion") [ "--set" "GDK_PIXBUF_MODULE_FILE" "${librsvg}/${gdk-pixbuf.moduleDir}.cache" "--prefix" "GIO_EXTRA_MODULES" ":" "${lib.getLib dconf}/lib/gio/modules" "--prefix" "XDG_DATA_DIRS" ":" "${unwrapped.gtk}/share" @@ -89,7 +89,7 @@ let ++ lib.optionals (extraPackages != []) [ "--prefix" "GRC_BLOCKS_PATH" ":" "${lib.makeSearchPath "share/gnuradio/grc/blocks" extraPackages}" ] - ++ lib.optionals (unwrapped.hasFeature "gr-qtgui" unwrapped.features) + ++ lib.optionals (unwrapped.hasFeature "gr-qtgui") # 3.7 builds with qt4 (if lib.versionAtLeast unwrapped.versionAttr.major "3.8" then [ -- cgit 1.4.1