diff options
author | Doron Behar <doron.behar@gmail.com> | 2021-10-21 23:59:37 +0300 |
---|---|---|
committer | Doron Behar <doron.behar@gmail.com> | 2021-10-23 23:01:21 +0300 |
commit | d6fa3fef68b1081c65ebb642b4dfa56d1c1162db (patch) | |
tree | b412ba2e378db8dcaf5f354aff887ae6c16e9299 /pkgs/applications/radio/gnuradio/wrapper.nix | |
parent | 18eb4531cd291303e6ade31f07a4e72a8cadcc82 (diff) |
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.
Diffstat (limited to 'pkgs/applications/radio/gnuradio/wrapper.nix')
-rw-r--r-- | pkgs/applications/radio/gnuradio/wrapper.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index 58205f388f25..4cbccbd51819 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 [ |