From 4f2573e8750bf8c223cb9d9fddf8933d690f10bd Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 23 Feb 2021 18:08:16 +0200 Subject: [PATCH 01/61] uhd: 3.15.0.0 -> 4.0.0.0 --- pkgs/applications/radio/uhd/3.5.nix | 159 ++++++++++++++++++++++++ pkgs/applications/radio/uhd/default.nix | 17 +-- pkgs/top-level/all-packages.nix | 3 + 3 files changed, 171 insertions(+), 8 deletions(-) create mode 100644 pkgs/applications/radio/uhd/3.5.nix diff --git a/pkgs/applications/radio/uhd/3.5.nix b/pkgs/applications/radio/uhd/3.5.nix new file mode 100644 index 000000000000..d913927a7b99 --- /dev/null +++ b/pkgs/applications/radio/uhd/3.5.nix @@ -0,0 +1,159 @@ +{ lib +, stdenv +, fetchurl +, fetchFromGitHub +, cmake +, 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 +# requires numpy +, enableLibuhd_Python_api ? false +, python3 +, enableExamples ? false +, enableUtils ? false +, enableLiberio ? false +, liberio +, libusb1 +, enableDpdk ? false +, dpdk +# Devices +, enableOctoClock ? true +, enableMpmd ? true +, enableB100 ? true +, enableB200 ? true +, enableUsrp1 ? true +, enableUsrp2 ? true +, enableX300 ? true +, enableN230 ? true +, enableN300 ? true +, enableN320 ? true +, enableE300 ? true +, enableE320 ? true +}: + +let + onOffBool = b: if b then "ON" else "OFF"; + inherit (lib) optionals; +in + +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 = "3.15.0.0"; + + src = fetchFromGitHub { + owner = "EttusResearch"; + repo = "uhd"; + rev = "v${version}"; + sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf"; + }; + # 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 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp"; + }; + + cmakeFlags = [ + "-DENABLE_LIBUHD=ON" + "-DENABLE_USB=ON" + "-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_DPDK=${onOffBool enableDpdk}" + # Devices + "-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}" + "-DENABLE_MPMD=${onOffBool enableMpmd}" + "-DENABLE_B100=${onOffBool enableB100}" + "-DENABLE_B200=${onOffBool enableB200}" + "-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}" + "-DENABLE_E320=${onOffBool enableE320}" + ] + # TODO: Check if this still needed + # ABI differences GCC 7.1 + # /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector::iterator {aka __gnu_cxx::__normal_iterator >}' changed in GCC 7.1 + ++ [ (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 (enableLibuhd_Python_api) [ numpy setuptools ] + ++ optionals (enableUtils) [ requests six ] + ); + + nativeBuildInputs = [ + cmake + pkg-config + ] + # 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 ] + ; + buildInputs = [ + boost + libusb1 + ] + # 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 (enableDpdk) [ dpdk ] + ; + + doCheck = true; + + # Build only the host software + preConfigure = "cd host"; + # TODO: Check if this still needed, perhaps relevant: + # https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html#build_instructions_unix_arm + patches = if stdenv.isAarch32 then ./neon.patch else null; + + postPhases = [ "installFirmware" "removeInstalledTests" ] + ++ optionals (enableUtils) [ "moveUdevRules" ] + ; + + # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images` + installFirmware = '' + mkdir -p "$out/share/uhd/images" + tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images" + ''; + + # -DENABLE_TESTS=ON installs the tests, we don't need them in the output + removeInstalledTests = '' + rm -r $out/lib/uhd/tests + ''; + + # Moves the udev rules to the standard location, needed only if utils are + # enabled + moveUdevRules = '' + mkdir -p $out/lib/udev/rules.d + mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/ + ''; + + meta = with lib; { + description = "USRP Hardware Driver (for Software Defined Radio)"; + longDescription = '' + The USRP Hardware Driver (UHD) software is the hardware driver for all + USRP (Universal Software Radio Peripheral) devices. + + USRP devices are designed and sold by Ettus Research, LLC and its parent + company, National Instruments. + ''; + homepage = "https://uhd.ettus.com/"; + license = licenses.gpl3Plus; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ bjornfor fpletz tomberek ]; + }; +} diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix index bafb2f637df4..9f2f39aab2c5 100644 --- a/pkgs/applications/radio/uhd/default.nix +++ b/pkgs/applications/radio/uhd/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , fetchFromGitHub , cmake @@ -8,14 +9,14 @@ , enableLibuhd_C_api ? true # requires numpy , enableLibuhd_Python_api ? false -, python3 ? null +, python3 , enableExamples ? false , enableUtils ? false , enableLiberio ? false -, liberio ? null -, libusb1 ? null +, liberio +, libusb1 , enableDpdk ? false -, dpdk ? null +, dpdk # Devices , enableOctoClock ? true , enableMpmd ? true @@ -40,18 +41,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 = "3.15.0.0"; + version = "4.0.0.0"; src = fetchFromGitHub { owner = "EttusResearch"; repo = "uhd"; rev = "v${version}"; - sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf"; + sha256 = "NCyiI4pIPw0nBRFdUGpgZ/x2mWz+Qm78ZGACUnSbGSs="; }; # 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 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp"; + sha256 = "Xfx0bsHUQ5+Dp+xk0sVWWP83oyXQcUH5AX4PNEE7fY4="; }; cmakeFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8038e97d9e3..c5fb1cafbc1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13141,6 +13141,7 @@ in uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { }; + uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { }; uhd = callPackage ../applications/radio/uhd { }; uisp = callPackage ../development/tools/misc/uisp { }; @@ -22358,6 +22359,8 @@ in gnuradio3_7-unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix { inherit (darwin.apple_sdk.frameworks) CoreAudio; python = python2; + # Incompatible with uhd4+ + uhd = uhd3_5; }; # A build without gui components and other utilites not needed if gnuradio is # used as a c++ library. From 7690f9a312e49e56b6df443169e5bf2ea420e0a7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 24 Feb 2021 23:03:45 +0200 Subject: [PATCH 02/61] gnuradio, uhd: Use boost17x gnss-sdr needs it: https://github.com/boostorg/format/issues/67 . uhd and gnuradio need to use the same boost version to avoid incompatibilities issues. icu is needed from some reason with boost17x. --- pkgs/applications/radio/gnuradio/default.nix | 18 ++++++++++++++++-- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 9bc1511968be..f8fc1fa10f85 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -24,6 +24,8 @@ , gsl , cppzmq , zeromq +# Needed only if qt-gui is disabled, from some reason +, icu # GUI related , gtk3 , pango @@ -60,7 +62,10 @@ let boost log4cpp mpir - ]; + ] + # when gr-qtgui is disabled, icu needs to be included, otherwise + # building with boost 1.7x fails + ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; pythonNative = with python.pkgs; [ Mako six @@ -160,7 +165,9 @@ let cmakeEnableFlag = "GR_TRELLIS"; }; gr-uhd = { - runtime = [ uhd ]; + runtime = [ + uhd + ]; cmakeEnableFlag = "GR_UHD"; }; gr-utils = { @@ -265,6 +272,13 @@ let url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff"; sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4="; }) + # Needed to use boost 1.7x, see: + # https://github.com/gnuradio/gnuradio/issues/3720 + # https://github.com/gnuradio/gnuradio/pull/3967 + (fetchpatch { + url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff"; + sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v"; + }) ]; in diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c5fb1cafbc1b..97da2fa1699e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13142,7 +13142,9 @@ in uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { }; uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { }; - uhd = callPackage ../applications/radio/uhd { }; + uhd = callPackage ../applications/radio/uhd { + boost = boost17x; + }; uisp = callPackage ../development/tools/misc/uisp { }; @@ -22337,6 +22339,7 @@ in gnuradio-unwrapped = callPackage ../applications/radio/gnuradio { inherit (darwin.apple_sdk.frameworks) CoreAudio; python = python3; + boost = boost17x; }; # A build without gui components and other utilites not needed for end user # libraries From 917f7efdc566170dc7268aa91b02255c5826552e Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 9 Mar 2021 20:53:45 -0500 Subject: [PATCH 03/61] kodiPlugins: rename to kodiPackages --- pkgs/applications/video/kodi/plugins.nix | 142 ++++++++++++----------- pkgs/applications/video/kodi/wrapper.nix | 12 +- pkgs/top-level/aliases.nix | 3 +- pkgs/top-level/all-packages.nix | 4 +- 4 files changed, 85 insertions(+), 76 deletions(-) diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix index 3aea028e9f04..17c3bde3f5bd 100644 --- a/pkgs/applications/video/kodi/plugins.nix +++ b/pkgs/applications/video/kodi/plugins.nix @@ -8,31 +8,31 @@ with lib; let self = rec { - pluginDir = "/share/kodi/addons"; + addonDir = "/share/kodi/addons"; rel = "Matrix"; kodi = kodiPlain; # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix - toKodiPlugin = drv: drv.overrideAttrs(oldAttrs: { + toKodiAddon = drv: drv.overrideAttrs(oldAttrs: { # Use passthru in order to prevent rebuilds when possible. passthru = (oldAttrs.passthru or {})// { - kodiPluginFor = kodi; - requiredKodiPlugins = requiredKodiPlugins drv.propagatedBuildInputs; + kodiAddonFor = kodi; + requiredKodiAddons = requiredKodiAddons drv.propagatedBuildInputs; }; }); - # Check whether a derivation provides a Kodi plugin. - hasKodiPlugin = drv: drv ? kodiPluginFor && drv.kodiPluginFor == kodi; + # Check whether a derivation provides a Kodi addon. + hasKodiAddon = drv: drv ? kodiAddonFor && drv.kodiAddonFor == kodi; - # Get list of required Kodi plugins given a list of derivations. - requiredKodiPlugins = drvs: let - modules = filter hasKodiPlugin drvs; - in unique (modules ++ concatLists (catAttrs "requiredKodiPlugins" modules)); + # Get list of required Kodi addons given a list of derivations. + requiredKodiAddons = drvs: let + modules = filter hasKodiAddon drvs; + in unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules)); - kodiWithPlugins = func: callPackage ./wrapper.nix { + kodiWithAddons = func: callPackage ./wrapper.nix { inherit kodi; - plugins = requiredKodiPlugins (func self); + addons = requiredKodiAddons (func self); }; kodi-platform = stdenv.mkDerivation rec { @@ -51,9 +51,13 @@ let self = rec { buildInputs = [ kodiPlain libcec_platform tinyxml ]; }; - mkKodiPlugin = { plugin, namespace, version, sourceDir ? null, ... }@args: - toKodiPlugin (stdenv.mkDerivation ({ - name = "kodi-plugin-${plugin}-${version}"; + buildKodiAddon = + { name ? "${attrs.pname}-${attrs.version}" + , namespace + , sourceDir ? null + , ... } @ attrs: + toKodiAddon (stdenv.mkDerivation ({ + name = "kodi-" + name; dontStrip = true; @@ -61,18 +65,23 @@ let self = rec { installPhase = '' ${if sourceDir == null then "" else "cd $src/$sourceDir"} - d=$out${pluginDir}/${namespace} + d=$out${addonDir}/${namespace} mkdir -p $d sauce="." [ -d ${namespace} ] && sauce=${namespace} cp -R "$sauce/"* $d ''; - } // args)); + } // attrs)); - mkKodiABIPlugin = { plugin, namespace, version, extraBuildInputs ? [], - extraRuntimeDependencies ? [], extraInstallPhase ? "", ... }@args: - toKodiPlugin (stdenv.mkDerivation ({ - name = "kodi-plugin-${plugin}-${version}"; + buildKodiBinaryAddon = + { name ? "${attrs.pname}-${attrs.version}" + , namespace + , version + , extraBuildInputs ? [] + , extraRuntimeDependencies ? [] + , extraInstallPhase ? "", ... } @ attrs: + toKodiAddon (stdenv.mkDerivation ({ + name = "kodi-" + name; dontStrip = true; @@ -86,25 +95,25 @@ let self = rec { "-DOVERRIDE_PATHS=1" ]; - # kodi checks for plugin .so libs existance in the addon folder (share/...) + # kodi checks for addon .so libs existance in the addon folder (share/...) # and the non-wrapped kodi lib/... folder before even trying to dlopen # them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use installPhase = let n = namespace; in '' make install - ln -s $out/lib/addons/${n}/${n}.so.${version} $out${pluginDir}/${n}/${n}.so.${version} + ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version} ${extraInstallPhase} ''; - } // args)); + } // attrs)); - advanced-launcher = mkKodiPlugin rec { + advanced-launcher = buildKodiAddon rec { - plugin = "advanced-launcher"; + pname = "advanced-launcher"; namespace = "plugin.program.advanced.launcher"; version = "2.5.8"; src = fetchFromGitHub { owner = "edwtjo"; - repo = plugin; + repo = pname; rev = version; sha256 = "142vvgs37asq5m54xqhjzqvgmb0xlirvm0kz6lxaqynp0vvgrkx2"; }; @@ -127,9 +136,9 @@ let self = rec { }; - advanced-emulator-launcher = mkKodiPlugin rec { + advanced-emulator-launcher = buildKodiAddon rec { - plugin = "advanced-emulator-launcher"; + pname = "advanced-emulator-launcher"; namespace = "plugin.program.advanced.emulator.launcher"; version = "0.9.6"; @@ -175,8 +184,8 @@ let self = rec { }; mkController = controller: { - ${controller} = mkKodiPlugin rec { - plugin = pname + "-" + controller; + ${controller} = buildKodiAddon rec { + pname = pname + "-" + controller; namespace = "game.controller." + controller; sourceDir = "addons/" + namespace; inherit version src meta; @@ -209,23 +218,22 @@ let self = rec { broken = true; # requires port to python3 }; in { - service = mkKodiPlugin { - plugin = pname + "-service"; + service = buildKodiAddon { + pname = pname + "-service"; version = "1.2.1"; namespace = "service.hyper.launcher"; inherit src meta; }; - plugin = mkKodiPlugin { - plugin = pname; + plugin = buildKodiAddon { namespace = "plugin.hyper.launcher"; - inherit version src meta; + inherit pname version src meta; }; }; - joystick = mkKodiABIPlugin rec { + joystick = buildKodiBinaryAddon rec { + pname = namespace; namespace = "peripheral.joystick"; version = "1.7.1"; - plugin = namespace; src = fetchFromGitHub { owner = "xbmc"; @@ -243,8 +251,8 @@ let self = rec { extraBuildInputs = [ tinyxml udev ]; }; - simpleplugin = mkKodiPlugin rec { - plugin = "simpleplugin"; + simpleplugin = buildKodiAddon rec { + pname = "simpleplugin"; namespace = "script.module.simpleplugin"; version = "2.3.2"; @@ -263,16 +271,16 @@ let self = rec { }; }; - svtplay = mkKodiPlugin rec { + svtplay = buildKodiAddon rec { - plugin = "svtplay"; + pname = "svtplay"; namespace = "plugin.video.svtplay"; version = "5.1.12"; src = fetchFromGitHub { - name = plugin + "-" + version + ".tar.gz"; + name = pname + "-" + version + ".tar.gz"; owner = "nilzen"; - repo = "xbmc-" + plugin; + repo = "xbmc-" + pname; rev = "v${version}"; sha256 = "04j1nhm7mh9chs995lz6bv1vsq5xzk7a7c0lmk4bnfv8jrfpj0w6"; }; @@ -292,10 +300,10 @@ let self = rec { }; - steam-controller = mkKodiABIPlugin rec { + steam-controller = buildKodiBinaryAddon rec { + pname = namespace; namespace = "peripheral.steamcontroller"; version = "0.11.0"; - plugin = namespace; src = fetchFromGitHub { owner = "kodi-game"; @@ -314,9 +322,9 @@ let self = rec { }; - steam-launcher = mkKodiPlugin { + steam-launcher = buildKodiAddon { - plugin = "steam-launcher"; + pname = "steam-launcher"; namespace = "script.steam.launcher"; version = "3.5.1"; @@ -343,8 +351,8 @@ let self = rec { }; }; - pdfreader = mkKodiPlugin rec { - plugin = "pdfreader"; + pdfreader = buildKodiAddon rec { + pname = "pdfreader"; namespace = "plugin.image.pdf"; version = "2.0.2"; @@ -362,9 +370,9 @@ let self = rec { }; }; - pvr-hts = mkKodiABIPlugin rec { + pvr-hts = buildKodiBinaryAddon rec { - plugin = "pvr-hts"; + pname = "pvr-hts"; namespace = "pvr.hts"; version = "8.2.2"; @@ -384,9 +392,9 @@ let self = rec { }; - pvr-hdhomerun = mkKodiABIPlugin rec { + pvr-hdhomerun = buildKodiBinaryAddon rec { - plugin = "pvr-hdhomerun"; + pname = "pvr-hdhomerun"; namespace = "pvr.hdhomerun"; version = "7.1.0"; @@ -408,9 +416,9 @@ let self = rec { }; - pvr-iptvsimple = mkKodiABIPlugin rec { + pvr-iptvsimple = buildKodiBinaryAddon rec { - plugin = "pvr-iptvsimple"; + pname = "pvr-iptvsimple"; namespace = "pvr.iptvsimple"; version = "7.4.2"; @@ -432,9 +440,9 @@ let self = rec { extraBuildInputs = [ zlib pugixml ]; }; - osmc-skin = mkKodiPlugin rec { + osmc-skin = buildKodiAddon rec { - plugin = "osmc-skin"; + pname = "osmc-skin"; namespace = "skin.osmc"; version = "18.0.0"; @@ -454,8 +462,8 @@ let self = rec { }; }; - yatp = python3Packages.toPythonModule (mkKodiPlugin rec { - plugin = "yatp"; + yatp = python3Packages.toPythonModule (buildKodiAddon rec { + pname = "yatp"; namespace = "plugin.video.yatp"; version = "3.3.2"; @@ -482,9 +490,9 @@ let self = rec { }; }); - inputstream-adaptive = mkKodiABIPlugin rec { + inputstream-adaptive = buildKodiBinaryAddon rec { - plugin = "inputstream-adaptive"; + pname = "inputstream-adaptive"; namespace = "inputstream.adaptive"; version = "2.6.7"; @@ -500,7 +508,7 @@ let self = rec { extraRuntimeDependencies = [ glib nspr nss stdenv.cc.cc.lib ]; extraInstallPhase = let n = namespace; in '' - ln -s $out/lib/addons/${n}/libssd_wv.so $out/${pluginDir}/${n}/libssd_wv.so + ln -s $out/lib/addons/${n}/libssd_wv.so $out/${addonDir}/${n}/libssd_wv.so ''; meta = { @@ -511,10 +519,10 @@ let self = rec { }; }; - vfs-sftp = mkKodiABIPlugin rec { + vfs-sftp = buildKodiBinaryAddon rec { + pname = namespace; namespace = "vfs.sftp"; version = "2.0.0"; - plugin = namespace; src = fetchFromGitHub { owner = "xbmc"; @@ -533,10 +541,10 @@ let self = rec { extraBuildInputs = [ openssl libssh zlib ]; }; - vfs-libarchive = mkKodiABIPlugin rec { + vfs-libarchive = buildKodiBinaryAddon rec { + pname = namespace; namespace = "vfs.libarchive"; version = "2.0.0"; - plugin = namespace; src = fetchFromGitHub { owner = "xbmc"; diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix index 80a36df3de74..d4844703b6b8 100644 --- a/pkgs/applications/video/kodi/wrapper.nix +++ b/pkgs/applications/video/kodi/wrapper.nix @@ -1,11 +1,11 @@ -{ lib, makeWrapper, buildEnv, kodi, plugins }: +{ lib, makeWrapper, buildEnv, kodi, addons }: let drvName = builtins.parseDrvName kodi.name; in buildEnv { - name = "${drvName.name}-with-plugins-${drvName.version}"; + name = "${drvName.name}-with-addons-${drvName.version}"; - paths = [ kodi ] ++ plugins; + paths = [ kodi ] ++ addons; pathsToLink = [ "/share" ]; buildInputs = [ makeWrapper ]; @@ -15,16 +15,16 @@ in buildEnv { for exe in kodi{,-standalone} do makeWrapper ${kodi}/bin/$exe $out/bin/$exe \ - --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath plugins} \ + --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath addons} \ --prefix KODI_HOME : $out/share/kodi \ --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath (lib.concatMap - (plugin: plugin.extraRuntimeDependencies or []) plugins)}" + (plugin: plugin.extraRuntimeDependencies or []) addons)}" done ''; meta = kodi.meta // { description = kodi.meta.description - + " (with plugins: ${lib.concatMapStringsSep ", " (x: x.name) plugins})"; + + " (with addons: ${lib.concatMapStringsSep ", " (x: x.name) addons})"; }; } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6036e4216836..2bb4dde49dc5 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -780,7 +780,8 @@ mapAliases ({ xara = throw "xara has been removed from nixpkgs. Unmaintained since 2006"; # added 2020-06-24 xbmc = kodi; # added 2018-04-25 xbmcPlain = kodiPlain; # added 2018-04-25 - xbmcPlugins = kodiPlugins; # added 2018-04-25 + xbmcPlugins = kodiPackages; # added 2018-04-25 + kodiPlugins = kodiPackages; # added 2021-03-09; xmonad_log_applet_gnome3 = xmonad_log_applet; # added 2018-05-01 xmpppy = throw "xmpppy has been removed from nixpkgs as it is unmaintained and python2-only"; pyIRCt = throw "pyIRCt has been removed from nixpkgs as it is unmaintained and python2-only"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 72fdc8cbbc4e..76962613328b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26172,7 +26172,7 @@ in wrapKodi = { kodi }: callPackage ../applications/video/kodi/wrapper.nix { inherit kodi; - plugins = let inherit (lib) optional optionals; in with kodiPlugins; + addons = let inherit (lib) optional optionals; in with kodiPackages; ([] ++ optional (config.kodi.enableAdvancedLauncher or false) advanced-launcher ++ optional (config.kodi.enableAdvancedEmulatorLauncher or false) @@ -26264,7 +26264,7 @@ in useGbm = true; }; - kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {}); + kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {}); kodi = wrapKodi { kodi = kodiPlain; From 3a70d376fe2eee71d0266141528d5aab2524db46 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 9 Mar 2021 21:16:31 -0500 Subject: [PATCH 04/61] kodiPackages: rename plugins.nix to packages.nix --- pkgs/applications/video/kodi/{plugins.nix => packages.nix} | 0 pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/applications/video/kodi/{plugins.nix => packages.nix} (100%) diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/packages.nix similarity index 100% rename from pkgs/applications/video/kodi/plugins.nix rename to pkgs/applications/video/kodi/packages.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 76962613328b..23a90d2b0453 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26264,7 +26264,7 @@ in useGbm = true; }; - kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {}); + kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/packages.nix {}); kodi = wrapKodi { kodi = kodiPlain; From f8f037b51d7d98c901e2e686a8af71389ea22f69 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 9 Mar 2021 22:26:59 -0500 Subject: [PATCH 05/61] kodiPlain: rename default.nix to unwrapped.nix --- pkgs/applications/video/kodi/{default.nix => unwrapped.nix} | 0 pkgs/top-level/all-packages.nix | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename pkgs/applications/video/kodi/{default.nix => unwrapped.nix} (100%) diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/unwrapped.nix similarity index 100% rename from pkgs/applications/video/kodi/default.nix rename to pkgs/applications/video/kodi/unwrapped.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23a90d2b0453..558d68501113 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26254,13 +26254,13 @@ in gtk = gtk2; }; - kodiPlain = callPackage ../applications/video/kodi { }; + kodiPlain = callPackage ../applications/video/kodi/unwrapped.nix { }; - kodiPlainWayland = callPackage ../applications/video/kodi { + kodiPlainWayland = callPackage ../applications/video/kodi/unwrapped.nix { useWayland = true; }; - kodiGBM = callPackage ../applications/video/kodi { + kodiGBM = callPackage ../applications/video/kodi/unwrapped.nix { useGbm = true; }; From 587a8b28370ea46b8fdc3bd74d8017e2681e9982 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 9 Mar 2021 22:47:47 -0500 Subject: [PATCH 06/61] kodi: drop wrapKodi function and disregard config.kodi.* options --- pkgs/applications/video/kodi/packages.nix | 13 ++---- pkgs/top-level/aliases.nix | 3 ++ pkgs/top-level/all-packages.nix | 49 +++-------------------- 3 files changed, 12 insertions(+), 53 deletions(-) diff --git a/pkgs/applications/video/kodi/packages.nix b/pkgs/applications/video/kodi/packages.nix index 17c3bde3f5bd..1bcbaaa4b166 100644 --- a/pkgs/applications/video/kodi/packages.nix +++ b/pkgs/applications/video/kodi/packages.nix @@ -1,5 +1,5 @@ { lib, stdenv, callPackage, fetchFromGitHub -, cmake, kodiPlain, libcec_platform, tinyxml, pugixml +, cmake, kodi, libcec_platform, tinyxml, pugixml , steam, udev, libusb1, jsoncpp, libhdhomerun, zlib , python3Packages, expat, glib, nspr, nss, openssl , libssh, libarchive, lzma, bzip2, lz4, lzo }: @@ -11,7 +11,7 @@ let self = rec { addonDir = "/share/kodi/addons"; rel = "Matrix"; - kodi = kodiPlain; + inherit kodi; # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix toKodiAddon = drv: drv.overrideAttrs(oldAttrs: { @@ -30,11 +30,6 @@ let self = rec { modules = filter hasKodiAddon drvs; in unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules)); - kodiWithAddons = func: callPackage ./wrapper.nix { - inherit kodi; - addons = requiredKodiAddons (func self); - }; - kodi-platform = stdenv.mkDerivation rec { project = "kodi-platform"; version = "17.1"; @@ -48,7 +43,7 @@ let self = rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ kodiPlain libcec_platform tinyxml ]; + buildInputs = [ kodi libcec_platform tinyxml ]; }; buildKodiAddon = @@ -86,7 +81,7 @@ let self = rec { dontStrip = true; nativeBuildInputs = [ cmake ]; - buildInputs = [ kodiPlain kodi-platform libcec_platform ] ++ extraBuildInputs; + buildInputs = [ kodi kodi-platform libcec_platform ] ++ extraBuildInputs; inherit extraRuntimeDependencies; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 2bb4dde49dc5..53a769c461dd 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -303,6 +303,9 @@ mapAliases ({ json_glib = json-glib; # added 2018-02-25 kdecoration-viewer = throw "kdecoration-viewer has been removed from nixpkgs, as there is no upstream activity"; # 2020-06-16 k9copy = throw "k9copy has been removed from nixpkgs, as there is no upstream activity"; # 2020-11-06 + kodiGBM = kodi-gbm; + kodiPlain = kodi; + kodiPlainWayland = kodi-wayland; julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15 julia_11 = throw "julia_11 is deprecated in favor of latest Julia version"; # added 2020-09-15 kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 558d68501113..8561ef7e3f46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26170,33 +26170,6 @@ in cores = retroArchCores; }; - wrapKodi = { kodi }: callPackage ../applications/video/kodi/wrapper.nix { - inherit kodi; - addons = let inherit (lib) optional optionals; in with kodiPackages; - ([] - ++ optional (config.kodi.enableAdvancedLauncher or false) advanced-launcher - ++ optional (config.kodi.enableAdvancedEmulatorLauncher or false) - advanced-emulator-launcher - ++ optionals (config.kodi.enableControllers or false) - (with controllers; - [ default dreamcast gba genesis mouse n64 nes ps snes ]) - ++ optional (config.kodi.enableExodus or false) exodus - ++ optionals (config.kodi.enableHyperLauncher or false) - (with hyper-launcher; [ plugin service pdfreader ]) - ++ optional (config.kodi.enableJoystick or false) joystick - ++ optional (config.kodi.enableOSMCskin or false) osmc-skin - ++ optional (config.kodi.enableSVTPlay or false) svtplay - ++ optional (config.kodi.enableSteamController or false) steam-controller - ++ optional (config.kodi.enableSteamLauncher or false) steam-launcher - ++ optional (config.kodi.enablePVRHTS or false) pvr-hts - ++ optional (config.kodi.enablePVRHDHomeRun or false) pvr-hdhomerun - ++ optional (config.kodi.enablePVRIPTVSimple or false) pvr-iptvsimple - ++ optional (config.kodi.enableInputStreamAdaptive or false) inputstream-adaptive - ++ optional (config.kodi.enableVFSSFTP or false) vfs-sftp - ++ optional (config.kodi.enableVFSLibarchive or false) vfs-libarchive - ); - }; - wsjtx = qt5.callPackage ../applications/radio/wsjtx { }; wxhexeditor = callPackage ../applications/editors/wxhexeditor { @@ -26254,30 +26227,18 @@ in gtk = gtk2; }; - kodiPlain = callPackage ../applications/video/kodi/unwrapped.nix { }; + kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/packages.nix {}); - kodiPlainWayland = callPackage ../applications/video/kodi/unwrapped.nix { + kodi = callPackage ../applications/video/kodi/unwrapped.nix { }; + + kodi-wayland = callPackage ../applications/video/kodi/unwrapped.nix { useWayland = true; }; - kodiGBM = callPackage ../applications/video/kodi/unwrapped.nix { + kodi-gbm = callPackage ../applications/video/kodi/unwrapped.nix { useGbm = true; }; - kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/packages.nix {}); - - kodi = wrapKodi { - kodi = kodiPlain; - }; - - kodi-wayland = wrapKodi { - kodi = kodiPlainWayland; - }; - - kodi-gbm = wrapKodi { - kodi = kodiGBM; - }; - kodi-cli = callPackage ../tools/misc/kodi-cli { }; kodi-retroarch-advanced-launchers = From ce0621ec4f8b2de17ed8e4c96f8a295336989c50 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 10 Mar 2021 08:16:10 -0500 Subject: [PATCH 07/61] kodi: introduce kodi.withPackages to replace kodiPackages.kodiWithAddons --- pkgs/applications/video/kodi/default.nix | 14 ++++++++++++++ pkgs/applications/video/kodi/wrapper.nix | 11 ++--------- pkgs/top-level/all-packages.nix | 8 ++++---- 3 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 pkgs/applications/video/kodi/default.nix diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix new file mode 100644 index 000000000000..55ba84cc454c --- /dev/null +++ b/pkgs/applications/video/kodi/default.nix @@ -0,0 +1,14 @@ +{ callPackage, ... } @ args: +let + unwrapped = callPackage ./unwrapped.nix (removeAttrs args [ "callPackage" ]); + kodiPackages = callPackage ./packages.nix { kodi = unwrapped; }; +in + unwrapped.overrideAttrs (oldAttrs: { + passthru = oldAttrs.passthru // { + packages = kodiPackages; + withPackages = func: callPackage ./wrapper.nix { + kodi = unwrapped; + addons = kodiPackages.requiredKodiAddons (func kodiPackages); + }; + }; + }) diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix index d4844703b6b8..2b4abbb500af 100644 --- a/pkgs/applications/video/kodi/wrapper.nix +++ b/pkgs/applications/video/kodi/wrapper.nix @@ -1,9 +1,7 @@ { lib, makeWrapper, buildEnv, kodi, addons }: -let - drvName = builtins.parseDrvName kodi.name; -in buildEnv { - name = "${drvName.name}-with-addons-${drvName.version}"; +buildEnv { + name = "${kodi.name}-env"; paths = [ kodi ] ++ addons; pathsToLink = [ "/share" ]; @@ -22,9 +20,4 @@ in buildEnv { (plugin: plugin.extraRuntimeDependencies or []) addons)}" done ''; - - meta = kodi.meta // { - description = kodi.meta.description - + " (with addons: ${lib.concatMapStringsSep ", " (x: x.name) addons})"; - }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8561ef7e3f46..f26d220c0871 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26227,15 +26227,15 @@ in gtk = gtk2; }; - kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/packages.nix {}); + kodiPackages = recurseIntoAttrs (kodi.packages); - kodi = callPackage ../applications/video/kodi/unwrapped.nix { }; + kodi = callPackage ../applications/video/kodi { }; - kodi-wayland = callPackage ../applications/video/kodi/unwrapped.nix { + kodi-wayland = callPackage ../applications/video/kodi { useWayland = true; }; - kodi-gbm = callPackage ../applications/video/kodi/unwrapped.nix { + kodi-gbm = callPackage ../applications/video/kodi { useGbm = true; }; From 4ef33dd12d508a1f459283ca23bd03d1a36ac71a Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 10 Mar 2021 20:04:23 -0500 Subject: [PATCH 08/61] kodi: rename useWayland and useGbm flags to waylandSupport and gbmSupport --- pkgs/applications/video/kodi/unwrapped.nix | 25 +++++++++++----------- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix index da338e17586d..d1a451f7b61e 100644 --- a/pkgs/applications/video/kodi/unwrapped.nix +++ b/pkgs/applications/video/kodi/unwrapped.nix @@ -28,9 +28,9 @@ , udevSupport ? true, udev ? null , usbSupport ? false, libusb-compat-0_1 ? null , vdpauSupport ? true, libvdpau ? null -, useWayland ? false, wayland ? null, wayland-protocols ? null +, waylandSupport ? false, wayland ? null, wayland-protocols ? null , waylandpp ? null, libxkbcommon ? null -, useGbm ? false, mesa ? null, libinput ? null +, gbmSupport ? false, mesa ? null, libinput ? null , buildPackages }: @@ -42,8 +42,8 @@ assert sambaSupport -> samba != null; assert udevSupport -> udev != null; assert usbSupport -> libusb-compat-0_1 != null && ! udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable assert vdpauSupport -> libvdpau != null; -assert useWayland -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null; -assert useGbm || useWayland || x11Support; +assert waylandSupport -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null; +assert gbmSupport || waylandSupport || x11Support; let kodiReleaseDate = "20210219"; @@ -106,13 +106,14 @@ let }; kodi_platforms = - lib.optional useGbm "gbm" ++ - lib.optional useWayland "wayland" ++ + lib.optional gbmSupport "gbm" ++ + lib.optional waylandSupport "wayland" ++ lib.optional x11Support "x11" ; in stdenv.mkDerivation { - name = "kodi-${lib.optionalString useWayland "wayland-"}${kodiVersion}"; + pname = "kodi"; + version = kodiVersion; src = kodi_src; @@ -150,14 +151,14 @@ in stdenv.mkDerivation { ++ lib.optional udevSupport udev ++ lib.optional usbSupport libusb-compat-0_1 ++ lib.optional vdpauSupport libvdpau - ++ lib.optionals useWayland [ + ++ lib.optionals waylandSupport [ wayland waylandpp.dev wayland-protocols # Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise libxkbcommon.dev ] - ++ lib.optional useGbm [ + ++ lib.optional gbmSupport [ libxkbcommon.dev mesa.dev libinput.dev @@ -174,14 +175,14 @@ in stdenv.mkDerivation { # for TexturePacker giflib zlib libpng libjpeg lzo - ] ++ lib.optionals useWayland [ wayland-protocols waylandpp.bin ]; + ] ++ lib.optionals waylandSupport [ wayland-protocols waylandpp.bin ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; cmakeFlags = [ - "-DAPP_RENDER_SYSTEM=${if useGbm then "gles" else "gl"}" + "-DAPP_RENDER_SYSTEM=${if gbmSupport then "gles" else "gl"}" "-Dlibdvdcss_URL=${libdvdcss}" "-Dlibdvdnav_URL=${libdvdnav}" "-Dlibdvdread_URL=${libdvdread}" @@ -193,7 +194,7 @@ in stdenv.mkDerivation { "-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig" "-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc" "-DPYTHON_EXECUTABLE=${buildPackages.python3Packages.python}/bin/python" - ] ++ lib.optional useWayland [ + ] ++ lib.optional waylandSupport [ "-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f26d220c0871..49727f52fb21 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26232,11 +26232,11 @@ in kodi = callPackage ../applications/video/kodi { }; kodi-wayland = callPackage ../applications/video/kodi { - useWayland = true; + waylandSupport = true; }; kodi-gbm = callPackage ../applications/video/kodi { - useGbm = true; + gbmSupport = true; }; kodi-cli = callPackage ../tools/misc/kodi-cli { }; From 901b43d439db00e3e03f969ffb2df0530ef8bf17 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 10 Mar 2021 21:27:38 -0500 Subject: [PATCH 09/61] kodi: miscellaneous cleanup Co-authored-by: Sandro --- pkgs/applications/video/kodi/packages.nix | 4 +- pkgs/applications/video/kodi/unwrapped.nix | 51 +++++++++------------- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/pkgs/applications/video/kodi/packages.nix b/pkgs/applications/video/kodi/packages.nix index 1bcbaaa4b166..8e0ecbf9b9b7 100644 --- a/pkgs/applications/video/kodi/packages.nix +++ b/pkgs/applications/video/kodi/packages.nix @@ -49,7 +49,7 @@ let self = rec { buildKodiAddon = { name ? "${attrs.pname}-${attrs.version}" , namespace - , sourceDir ? null + , sourceDir ? "" , ... } @ attrs: toKodiAddon (stdenv.mkDerivation ({ name = "kodi-" + name; @@ -59,7 +59,7 @@ let self = rec { extraRuntimeDependencies = [ ]; installPhase = '' - ${if sourceDir == null then "" else "cd $src/$sourceDir"} + cd $src/$sourceDir d=$out${addonDir}/${namespace} mkdir -p $d sauce="." diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix index d1a451f7b61e..2a713324c3fb 100644 --- a/pkgs/applications/video/kodi/unwrapped.nix +++ b/pkgs/applications/video/kodi/unwrapped.nix @@ -19,30 +19,22 @@ , libplist, p11-kit, zlib, flatbuffers, fmt, fstrcmp, rapidjson , lirc , x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp -, dbusSupport ? true, dbus ? null -, joystickSupport ? true, cwiid ? null -, nfsSupport ? true, libnfs ? null -, pulseSupport ? true, libpulseaudio ? null -, rtmpSupport ? true, rtmpdump ? null -, sambaSupport ? true, samba ? null -, udevSupport ? true, udev ? null -, usbSupport ? false, libusb-compat-0_1 ? null -, vdpauSupport ? true, libvdpau ? null -, waylandSupport ? false, wayland ? null, wayland-protocols ? null -, waylandpp ? null, libxkbcommon ? null -, gbmSupport ? false, mesa ? null, libinput ? null +, dbusSupport ? true, dbus +, joystickSupport ? true, cwiid +, nfsSupport ? true, libnfs +, pulseSupport ? true, libpulseaudio +, rtmpSupport ? true, rtmpdump +, sambaSupport ? true, samba +, udevSupport ? true, udev +, usbSupport ? false, libusb-compat-0_1 +, vdpauSupport ? true, libvdpau +, waylandSupport ? false, wayland, wayland-protocols +, waylandpp ? null, libxkbcommon +, gbmSupport ? false, mesa, libinput , buildPackages }: -assert dbusSupport -> dbus != null; -assert nfsSupport -> libnfs != null; -assert pulseSupport -> libpulseaudio != null; -assert rtmpSupport -> rtmpdump != null; -assert sambaSupport -> samba != null; -assert udevSupport -> udev != null; -assert usbSupport -> libusb-compat-0_1 != null && ! udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable -assert vdpauSupport -> libvdpau != null; -assert waylandSupport -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null; +assert usbSupport -> !udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable assert gbmSupport || waylandSupport || x11Support; let @@ -78,7 +70,7 @@ let "-DPKG_CONFIG_EXECUTABLE=pkg-config" ]; buildInputs = [ libidn libtasn1 p11-kit zlib libva ] - ++ lib.optional vdpauSupport libvdpau; + ++ lib.optional vdpauSupport libvdpau; nativeBuildInputs = [ cmake nasm pkg-config gnutls ]; }; @@ -105,11 +97,9 @@ let sha256 = "1xxn01mhkdnp10cqdr357wx77vyzfb5glqpqyg8m0skyi75aii59"; }; - kodi_platforms = - lib.optional gbmSupport "gbm" ++ - lib.optional waylandSupport "wayland" ++ - lib.optional x11Support "x11" - ; + kodi_platforms = lib.optional gbmSupport "gbm" + ++ lib.optional waylandSupport "wayland" + ++ lib.optional x11Support "x11"; in stdenv.mkDerivation { pname = "kodi"; @@ -143,7 +133,7 @@ in stdenv.mkDerivation { libXinerama libXrandr.dev libXtst libXfixes ] ++ lib.optional dbusSupport dbus - ++ lib.optional joystickSupport cwiid + ++ lib.optional joystickSupport cwiid ++ lib.optional nfsSupport libnfs ++ lib.optional pulseSupport libpulseaudio ++ lib.optional rtmpSupport rtmpdump @@ -222,7 +212,8 @@ in stdenv.mkDerivation { postInstall = '' for p in $(ls $out/bin/) ; do wrapProgram $out/bin/$p \ - --prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python glxinfo ] ++ lib.optional x11Support xdpyinfo ++ lib.optional sambaSupport samba)}" \ + --prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python glxinfo ] + ++ lib.optional x11Support xdpyinfo ++ lib.optional sambaSupport samba)}" \ --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath ([ curl systemd libmad libvdpau libcec libcec_platform libass ] ++ lib.optional nfsSupport libnfs @@ -244,7 +235,7 @@ in stdenv.mkDerivation { meta = with lib; { description = "Media center"; homepage = "https://kodi.tv/"; - license = licenses.gpl2; + license = licenses.gpl2Plus; platforms = platforms.linux; maintainers = with maintainers; [ titanous edwtjo peterhoeg sephalon ]; }; From 4769eb4f58c30c004e0e2acc60f1d5f7f1503130 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Mar 2021 19:52:33 -0500 Subject: [PATCH 10/61] kodi: add release notes for kodi.withPackages --- nixos/doc/manual/release-notes/rl-2105.xml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index e052632ecafd..7e5505e588a4 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -577,6 +577,37 @@ self: super: for your Kafka version. + + + The kodi package has been modified to allow concise addon management. Consider + the following configuration from previous releases of NixOS to install kodi, + including the kodiPackages.inputstream-adaptive and kodiPackages.vfs-sftp + addons: + + +environment.systemPackages = [ + pkgs.kodi +]; + +nixpkgs.config.kodi = { + enableInputStreamAdaptive = true; + enableVFSSFTP = true; +}; + + + All Kodi config flags have been removed, and as a result the above configuration + should now be written as: + + +environment.systemPackages = [ + (pkgs.kodi.withPackages (p: with p; [ + inputstream-adaptive + vfs-sftp + ])) +]; + + + From 696ac06a933d590369ee78192024dc5467e96e88 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Mar 2021 19:58:39 -0500 Subject: [PATCH 11/61] kodi: add release notes for version 19.0 update --- nixos/doc/manual/release-notes/rl-2105.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index 7e5505e588a4..af4881437246 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -57,6 +57,13 @@ for the motivation). + + + Kodi has been updated to version 19.0 "Matrix". See + the announcement for + further details. + + From 942bd5cc2f728c17775f853bc63944efd4b3cfb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Fri, 12 Mar 2021 11:10:43 +0100 Subject: [PATCH 12/61] prometheus-jitsi-exporter: init at 0.2.18 --- .../monitoring/prometheus/jitsi-exporter.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 23 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/jitsi-exporter.nix diff --git a/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix b/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix new file mode 100644 index 000000000000..819f70382a6f --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchgit, ... }: + +buildGoModule rec { + pname = "jitsiexporter"; + version = "0.2.18"; + + src = fetchgit { + url = "https://git.xsfx.dev/prometheus/jitsiexporter"; + rev = "v${version}"; + sha256 = "1cf46wp96d9dwlwlffcgbcr0v3xxxfdv6il0zqkm2i7cfsfw0skf"; + }; + + vendorSha256 = null; + + meta = with lib; { + description = "Export Jitsi Videobridge metrics to Prometheus"; + homepage = "https://git.xsfx.dev/prometheus/jitsiexporter"; + license = licenses.mit; + maintainers = with maintainers; [ petabyteboy ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae22edcd688b..3843f6ec677c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18419,6 +18419,7 @@ in prometheus-fritzbox-exporter = callPackage ../servers/monitoring/prometheus/fritzbox-exporter.nix { }; prometheus-gitlab-ci-pipelines-exporter = callPackage ../servers/monitoring/prometheus/gitlab-ci-pipelines-exporter.nix { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy-exporter.nix { }; + prometheus-jitsi-exporter = callPackage ../servers/monitoring/prometheus/jitsi-exporter.nix { }; prometheus-json-exporter = callPackage ../servers/monitoring/prometheus/json-exporter.nix { }; prometheus-keylight-exporter = callPackage ../servers/monitoring/prometheus/keylight-exporter.nix { }; prometheus-lnd-exporter = callPackage ../servers/monitoring/prometheus/lnd-exporter.nix { }; From b2bebd7cd5446c197ce6b3e8a38ef3686ae5ace0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Fri, 12 Mar 2021 11:11:16 +0100 Subject: [PATCH 13/61] nixos/prometheus-jitsi-exporter: init --- .../monitoring/prometheus/exporters.nix | 1 + .../monitoring/prometheus/exporters/jitsi.nix | 40 +++++++++++++++++++ nixos/tests/prometheus-exporters.nix | 23 +++++++++++ 3 files changed, 64 insertions(+) create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/jitsi.nix diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 940f28189371..fc5cee70fd9a 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -30,6 +30,7 @@ let "dovecot" "fritzbox" "json" + "jitsi" "keylight" "lnd" "mail" diff --git a/nixos/modules/services/monitoring/prometheus/exporters/jitsi.nix b/nixos/modules/services/monitoring/prometheus/exporters/jitsi.nix new file mode 100644 index 000000000000..c93a8f98e552 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/jitsi.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.jitsi; +in +{ + port = 9700; + extraOpts = { + url = mkOption { + type = types.str; + default = "http://localhost:8080/colibri/stats"; + description = '' + Jitsi Videobridge metrics URL to monitor. + This is usually /colibri/stats on port 8080 of the jitsi videobridge host. + ''; + }; + interval = mkOption { + type = types.str; + default = "30s"; + example = "1min"; + description = '' + How often to scrape new data + ''; + }; + }; + serviceOpts = { + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-jitsi-exporter}/bin/jitsiexporter \ + -url ${escapeShellArg cfg.url} \ + -host ${cfg.listenAddress} \ + -port ${toString cfg.port} \ + -interval ${toString cfg.interval} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 89d17c9de8c0..9625aa4d274d 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -218,6 +218,29 @@ let ''; }; + jitsi = { + exporterConfig = { + enable = true; + }; + metricProvider = { + systemd.services.prometheus-jitsi-exporter.after = [ "jitsi-videobridge2.service" ]; + services.jitsi-videobridge = { + enable = true; + apis = [ "colibri" "rest" ]; + }; + }; + exporterTest = '' + wait_for_unit("jitsi-videobridge2.service") + wait_for_open_port(8080) + wait_for_unit("prometheus-jitsi-exporter.service") + wait_for_open_port(9700) + wait_until_succeeds( + 'journalctl -eu prometheus-jitsi-exporter.service -o cat | grep -q "key=participants"' + ) + succeed("curl -sSf 'localhost:9700/metrics' | grep -q 'jitsi_participants 0'") + ''; + }; + json = { exporterConfig = { enable = true; From 79ab3e1e7270dbe297fa8af484618269ef417201 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 03:14:17 +0000 Subject: [PATCH 14/61] clair: 4.0.2 -> 4.0.3 --- pkgs/tools/admin/clair/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/clair/default.nix b/pkgs/tools/admin/clair/default.nix index 9460144998eb..1ab4795dd623 100644 --- a/pkgs/tools/admin/clair/default.nix +++ b/pkgs/tools/admin/clair/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "clair"; - version = "4.0.2"; + version = "4.0.3"; src = fetchFromGitHub { owner = "quay"; repo = pname; rev = "v${version}"; - sha256 = "sha256-uGvcr7TG/NCi0YoYZnQU11zOxXDhFTnCmLQVxOqmXLY="; + sha256 = "sha256-ztp3t55EOUQqTAEUZtHvHK8nTTVOAmYR9vN2hXLhpVw="; }; - vendorSha256 = "sha256-CO4U8uSQeHXLPj5PH/SsOI/LjT2Rs/mBHsvNTudx72I="; + vendorSha256 = "sha256-+0jp/TvUjpeJJxEs2drVkUb/ua9qqqxome4M9TkpfP4="; doCheck = false; From a063e769663551b92687da9235c0b4b52454c988 Mon Sep 17 00:00:00 2001 From: Marcus Boyd Date: Sat, 13 Mar 2021 12:20:48 +1030 Subject: [PATCH 15/61] python3Packages.Rtree: fix build Patching broke on recent version bump, this fixes and re-enables tests. Also corrects license. --- .../python-modules/Rtree/default.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/Rtree/default.nix b/pkgs/development/python-modules/Rtree/default.nix index b5996a13d981..eb4dae8e3aa2 100644 --- a/pkgs/development/python-modules/Rtree/default.nix +++ b/pkgs/development/python-modules/Rtree/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, libspatialindex, numpy }: +{ lib, + stdenv, + buildPythonPackage, + fetchPypi, + libspatialindex, + numpy, + pytestCheckHook +}: buildPythonPackage rec { pname = "Rtree"; @@ -9,21 +16,23 @@ buildPythonPackage rec { sha256 = "be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e"; }; - propagatedBuildInputs = [ libspatialindex ]; + buildInputs = [ libspatialindex ]; patchPhase = '' - substituteInPlace rtree/core.py --replace \ + substituteInPlace rtree/finder.py --replace \ "find_library('spatialindex_c')" "'${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}'" ''; - # Tests appear to be broken due to mysterious memory unsafe issues. See #36760 - doCheck = false; - checkInputs = [ numpy ]; + checkInputs = [ + numpy + pytestCheckHook + ]; + pythonImportsCheck = [ "rtree" ]; meta = with lib; { description = "R-Tree spatial index for Python GIS"; homepage = "https://toblerity.org/rtree/"; - license = licenses.lgpl21; + license = licenses.mit; maintainers = with maintainers; [ bgamari ]; }; } From 1cea164c3d90920b2ac3859bcab0820123464695 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 04:05:50 +0000 Subject: [PATCH 16/61] direnv: 2.27.0 -> 2.28.0 --- pkgs/tools/misc/direnv/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/direnv/default.nix b/pkgs/tools/misc/direnv/default.nix index ee068450344e..5fa6b8db60e7 100644 --- a/pkgs/tools/misc/direnv/default.nix +++ b/pkgs/tools/misc/direnv/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "direnv"; - version = "2.27.0"; + version = "2.28.0"; src = fetchFromGitHub { owner = "direnv"; repo = "direnv"; rev = "v${version}"; - sha256 = "05vvn59xd2q4yjizh5fprjib5xqq58by80d5avsm8nb1qxf383b1"; + sha256 = "sha256-iZ3Lf7Yg+N9BWyLLF+MrT2gpPT9BTcp6pNMpfqwcZXo="; }; - vendorSha256 = "084x7d7sshcsyim76d6pl6127nlqacgwwnm965srl9y5w5nqzba6"; + vendorSha256 = "sha256-P8NLY1iGh86ntmYsTVlnNh5akdaM8nzcxDn6Nfmgr84="; # we have no bash at the moment for windows BASH_PATH = From a563da663009deee5d5f855971c40ed6b5e00100 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 04:28:20 +0000 Subject: [PATCH 17/61] emplace: 1.2.0 -> 1.2.1 --- pkgs/tools/package-management/emplace/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/emplace/default.nix b/pkgs/tools/package-management/emplace/default.nix index 798601d1a5b4..5a8ca2d9a8a7 100644 --- a/pkgs/tools/package-management/emplace/default.nix +++ b/pkgs/tools/package-management/emplace/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "emplace"; - version = "1.2.0"; + version = "1.2.1"; src = fetchFromGitHub { owner = "tversteeg"; repo = pname; rev = "v${version}"; - sha256 = "sha256-vA+Y4j9Flcrizqh61+4X70FzF5/wK2WVHQRsAUQzKnU="; + sha256 = "sha256-5t47QrYWbm8A4E1GhqZwME7rmSfU1SYVniRGSrcRpvk="; }; - cargoSha256 = "sha256-zGdjMpB7h+/RdM+wXffUuAyHnks6umyJmzUrANmqAS8="; + cargoSha256 = "sha256-/GFpjovPGEgkfJ53+wR8CBDXiQQPDCiIaRG2Ka71dhQ="; meta = with lib; { description = "Mirror installed software on multiple machines"; From d797decdf8308056e5230e9fce9a003cdf915ebb Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 06:36:44 +0000 Subject: [PATCH 18/61] grafana-loki: 2.1.0 -> 2.2.0 --- pkgs/servers/monitoring/loki/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/loki/default.nix b/pkgs/servers/monitoring/loki/default.nix index 370006a591e8..d6e79831329f 100644 --- a/pkgs/servers/monitoring/loki/default.nix +++ b/pkgs/servers/monitoring/loki/default.nix @@ -2,14 +2,14 @@ }: buildGoModule rec { - version = "2.1.0"; + version = "2.2.0"; pname = "grafana-loki"; src = fetchFromGitHub { rev = "v${version}"; owner = "grafana"; repo = "loki"; - sha256 = "O/3079a67j1i9pgf18SBx0iJcQPVmb0H+K/PzQVBCDQ="; + sha256 = "sha256-mEu9z3lhHSE0NMXXViX4OBbIiNba7/RPr+AFmIM77g4="; }; vendorSha256 = null; From c77f71b6dc8d619e2768bb194f22d180053e467b Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Sat, 13 Mar 2021 08:11:03 +0100 Subject: [PATCH 19/61] iniparser: add pkgconfig file The upstream pkgconfig file is not contained in any release, add our own based on it. --- pkgs/development/libraries/iniparser/default.nix | 3 +++ pkgs/development/libraries/iniparser/iniparser.pc.in | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/development/libraries/iniparser/iniparser.pc.in diff --git a/pkgs/development/libraries/iniparser/default.nix b/pkgs/development/libraries/iniparser/default.nix index 8c7fdfd04d6b..62deaeb1c281 100644 --- a/pkgs/development/libraries/iniparser/default.nix +++ b/pkgs/development/libraries/iniparser/default.nix @@ -36,6 +36,9 @@ stdenv.mkDerivation rec { cp libiniparser.a $out/lib cp libiniparser.so.1 $out/lib ln -s libiniparser.so.1 $out/lib/libiniparser.so + + mkdir -p $out/lib/pkgconfig + substituteAll ${./iniparser.pc.in} $out/lib/pkgconfig/iniparser.pc ''; meta = with lib; { diff --git a/pkgs/development/libraries/iniparser/iniparser.pc.in b/pkgs/development/libraries/iniparser/iniparser.pc.in new file mode 100644 index 000000000000..fb94188fff71 --- /dev/null +++ b/pkgs/development/libraries/iniparser/iniparser.pc.in @@ -0,0 +1,12 @@ +prefix=@out@ +exec_prefix=@out@ +libdir=${exec_prefix}/lib +includedir=${prefix}/include +datarootdir=${prefix}/share +datadir=${datarootdir} + +Name: libiniparser +Description: Iniparser library +Version: @version@ +Libs: -L${libdir} -liniparser +Cflags: -I${includedir} From d939a8f20dea9f05a49a8dd1342d16617b981fa3 Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 13 Mar 2021 08:37:33 +0100 Subject: [PATCH 20/61] prometheus-jitsi-exporter: remove redundant platform attribute Co-authored-by: Sandro --- pkgs/servers/monitoring/prometheus/jitsi-exporter.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix b/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix index 819f70382a6f..60cdf32a598e 100644 --- a/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix @@ -17,6 +17,5 @@ buildGoModule rec { homepage = "https://git.xsfx.dev/prometheus/jitsiexporter"; license = licenses.mit; maintainers = with maintainers; [ petabyteboy ]; - platforms = platforms.unix; }; } From b31f3593ed2bff6d4695f92417debdff603897b1 Mon Sep 17 00:00:00 2001 From: omg Date: Sat, 13 Mar 2021 11:40:29 +0400 Subject: [PATCH 21/61] photoflare: fix warnings - set license to gpl3Plus - remove unnecessary `enableParallelBuilding` parameter --- pkgs/applications/graphics/photoflare/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/photoflare/default.nix b/pkgs/applications/graphics/photoflare/default.nix index 0c25364b76aa..303f5170d8e6 100644 --- a/pkgs/applications/graphics/photoflare/default.nix +++ b/pkgs/applications/graphics/photoflare/default.nix @@ -19,13 +19,11 @@ mkDerivation rec { NIX_CFLAGS_COMPILE = "-I${graphicsmagick}/include/GraphicsMagick"; - enableParallelBuilding = true; - meta = with lib; { description = "A cross-platform image editor with a powerful features and a very friendly graphical user interface"; homepage = "https://photoflare.io"; maintainers = [ maintainers.omgbebebe ]; - license = licenses.gpl3; + license = licenses.gpl3Plus; platforms = platforms.linux; }; } From c812b56538d0d2e0f2130a981a3d6627a0201ac8 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 08:56:42 +0000 Subject: [PATCH 22/61] minio: 2021-03-10T05-11-33Z -> 2021-03-12T00-00-47Z --- pkgs/servers/minio/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/minio/default.nix b/pkgs/servers/minio/default.nix index 0758a863fced..a2ffe32acd27 100644 --- a/pkgs/servers/minio/default.nix +++ b/pkgs/servers/minio/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "minio"; - version = "2021-03-10T05-11-33Z"; + version = "2021-03-12T00-00-47Z"; src = fetchFromGitHub { owner = "minio"; repo = "minio"; rev = "RELEASE.${version}"; - sha256 = "sha256-YwlVZE7TO9qr/8lwLXdZqjxy4NGxTkmLyKFDVlTZPqQ="; + sha256 = "sha256-7KHEmnrTw6SBhsImMjcv+b1wvFEg8AXgsuZTGp5iVis="; }; - vendorSha256 = "sha256-E+j+ysBKKSyTITmJwHieBcpXdF3+rtt4YS7OVPMC6vI="; + vendorSha256 = "sha256-tMt6XRj1dd+AHqWA6WGm5GBFGx+IsP1ijYCj8cmUXy0="; doCheck = false; From aee836c655ff12b8b1ba2bd380ba257d715fd8a2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 09:00:28 +0000 Subject: [PATCH 23/61] minio-client: 2021-03-10T05-59-20Z -> 2021-03-12T03-36-59Z --- pkgs/tools/networking/minio-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/minio-client/default.nix b/pkgs/tools/networking/minio-client/default.nix index bdec1b2b4acd..1b2b0f2deb38 100644 --- a/pkgs/tools/networking/minio-client/default.nix +++ b/pkgs/tools/networking/minio-client/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "minio-client"; - version = "2021-03-10T05-59-20Z"; + version = "2021-03-12T03-36-59Z"; src = fetchFromGitHub { owner = "minio"; repo = "mc"; rev = "RELEASE.${version}"; - sha256 = "sha256-IoCM2FA6oNiNT6zWspMEqgq4hZ8tAQVEAqouRlBe/ts="; + sha256 = "sha256-aIJjr7KaT4E4Q1Ho4D0emduJWFxdCXCodq7J43r0DMQ="; }; vendorSha256 = "sha256-aoRdtv/Q7vjn0M7iSYAuyu/3pEH30x6D39xTHqQPvuo="; From 9fdad32b5747daa6df170101386c324eaf7bcdd6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 09:57:08 +0000 Subject: [PATCH 24/61] oneDNN: 2.1 -> 2.1.2 --- pkgs/development/libraries/oneDNN/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/oneDNN/default.nix b/pkgs/development/libraries/oneDNN/default.nix index c87fc4fca796..c7b8339e710b 100644 --- a/pkgs/development/libraries/oneDNN/default.nix +++ b/pkgs/development/libraries/oneDNN/default.nix @@ -5,13 +5,13 @@ # https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn stdenv.mkDerivation rec { pname = "oneDNN"; - version = "2.1"; + version = "2.1.2"; src = fetchFromGitHub { owner = "oneapi-src"; repo = "oneDNN"; rev = "v${version}"; - sha256 = "sha256-PZ8r1eNfz4dVxlbtQJSrxiw/Hk6E6wSDapkMy7ux9fI="; + sha256 = "sha256-8nXzsY4+XnhKbuYyDWehiWqQEWoEcDBF4KagOg1WlN8="; }; outputs = [ "out" "dev" "doc" ]; From 7ad770e2cc4c263b3358b1f82d208c8442c2e095 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 13 Mar 2021 11:30:55 +0100 Subject: [PATCH 25/61] age: 1.0.0-beta6 -> 1.0.0-rc.1 Release notes: https://github.com/FiloSottile/age/releases/tag/v1.0.0-rc.1 --- pkgs/tools/security/age/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/age/default.nix b/pkgs/tools/security/age/default.nix index 74a2bb7a6206..e15618da3f18 100644 --- a/pkgs/tools/security/age/default.nix +++ b/pkgs/tools/security/age/default.nix @@ -2,14 +2,14 @@ buildGoModule rec { pname = "age"; - version = "1.0.0-beta6"; - vendorSha256 = "sha256-FTByNpLkWWHAWe5wVDRBGtKap/5+XGHeBMQAIdlPCkA="; + version = "1.0.0-rc.1"; + vendorSha256 = "1qx6pkhq00y0lsi6f82g8hxxh65zk1c0ls91ap6hdlj7ch79bhl2"; src = fetchFromGitHub { owner = "FiloSottile"; repo = "age"; rev = "v${version}"; - sha256 = "sha256-1LCcCEf2/R0am0jpA8yKl44+AoUFkbepxp9V6/nZkBQ="; + sha256 = "1n25wip4qnd3v9ial1apc2ybx10b9z6lwz7flyss6kvj3x5g9jd1"; }; meta = with lib; { From 531dd0f76f5b7ec2ad6c013dcd4c2c6a029a563c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 13 Mar 2021 11:41:52 +0100 Subject: [PATCH 26/61] twitter-color-emoji: 13.0.1 -> 13.0.2 --- pkgs/data/fonts/twitter-color-emoji/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/twitter-color-emoji/default.nix b/pkgs/data/fonts/twitter-color-emoji/default.nix index e74e51a95dcb..6cceee558a94 100644 --- a/pkgs/data/fonts/twitter-color-emoji/default.nix +++ b/pkgs/data/fonts/twitter-color-emoji/default.nix @@ -14,14 +14,14 @@ }: let - version = "13.0.1"; + version = "13.0.2"; twemojiSrc = fetchFromGitHub { name = "twemoji"; owner = "twitter"; repo = "twemoji"; rev = "v${version}"; - sha256 = "0acinlv2l3s1jga2i9wh16mvgkxw4ipzgvjx8c80zd104lpdpgd9"; + sha256 = "069pyq09jfzwp3xla8vmhbyyam32x2iyp0s29xcxlkj22p99bg6d"; }; pythonEnv = From 2d08e55e9b8f96cf00466bd55fe0d132f1abd008 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 16 Oct 2020 23:31:20 +0300 Subject: [PATCH 27/61] gnuradio.pkgs: init - Write a `mkDerivation` and `mkDerivationWith` function for gnuradio, like qt5. - qradiolink, gqrx: Use gnuradio's callPackage and mkDerivation. - Use gnuradio.callPackage to define all gnuradio.pkgs. - Move all gnuradio packages expressions to pkgs/development/gnuradio-modules/ - modeled after Python's. - Add more paths to gnuradio's wrapper - add the extra packages as python modules, and add their executables with proper env vars wrapping. Co-authored-by: Frederik Rietdijk --- nixos/doc/manual/release-notes/rl-2105.xml | 12 +- pkgs/applications/radio/gnuradio/3.7.nix | 8 +- pkgs/applications/radio/gnuradio/ais.nix | 53 -------- pkgs/applications/radio/gnuradio/default.nix | 8 ++ pkgs/applications/radio/gnuradio/gsm.nix | 37 ----- pkgs/applications/radio/gnuradio/limesdr.nix | 38 ------ pkgs/applications/radio/gnuradio/osmosdr.nix | 45 ------- pkgs/applications/radio/gnuradio/rds.nix | 36 ----- pkgs/applications/radio/gnuradio/wrapper.nix | 125 +++++++++++------ .../applications/radio/qradiolink/default.nix | 32 +++-- .../gnuradio-modules/ais/default.nix | 45 +++++++ .../gnuradio-modules/gsm/default.nix | 48 +++++++ .../gnuradio-modules/limesdr/default.nix | 59 ++++++++ .../gnuradio-modules/mkDerivation.nix | 23 ++++ .../gnuradio-modules/nacl/default.nix} | 41 +++--- .../gnuradio-modules/osmosdr/default.nix | 84 ++++++++++++ .../gnuradio-modules/rds/default.nix | 57 ++++++++ pkgs/top-level/aliases.nix | 24 ++-- pkgs/top-level/all-packages.nix | 127 +++++++----------- pkgs/top-level/gnuradio-packages.nix | 46 +++++++ 20 files changed, 581 insertions(+), 367 deletions(-) delete mode 100644 pkgs/applications/radio/gnuradio/ais.nix delete mode 100644 pkgs/applications/radio/gnuradio/gsm.nix delete mode 100644 pkgs/applications/radio/gnuradio/limesdr.nix delete mode 100644 pkgs/applications/radio/gnuradio/osmosdr.nix delete mode 100644 pkgs/applications/radio/gnuradio/rds.nix create mode 100644 pkgs/development/gnuradio-modules/ais/default.nix create mode 100644 pkgs/development/gnuradio-modules/gsm/default.nix create mode 100644 pkgs/development/gnuradio-modules/limesdr/default.nix create mode 100644 pkgs/development/gnuradio-modules/mkDerivation.nix rename pkgs/{applications/radio/gnuradio/nacl.nix => development/gnuradio-modules/nacl/default.nix} (50%) create mode 100644 pkgs/development/gnuradio-modules/osmosdr/default.nix create mode 100644 pkgs/development/gnuradio-modules/rds/default.nix create mode 100644 pkgs/top-level/gnuradio-packages.nix diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index e052632ecafd..b091bdb3e270 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -36,7 +36,17 @@ now point to an externally wrapped by default derivations, that allow you to also add `extraPythonPackages` to the Python interpreter used by GNURadio. Missing environmental variables needed for operational GUI were also added - (#7547). + (#75478). + + + + + GNURadio has a + pkgs attribute set, and there's a gnuradio.callPackage + function that extends pkgs with a mkDerivation, and a + mkDerivationWith, like Qt5. Now all gnuradio.pkgs are + defined with gnuradio.callPackage and some packages that depend + on gnuradio are defined with this as well. diff --git a/pkgs/applications/radio/gnuradio/3.7.nix b/pkgs/applications/radio/gnuradio/3.7.nix index a48efb9aa6d9..7ad2d2979824 100644 --- a/pkgs/applications/radio/gnuradio/3.7.nix +++ b/pkgs/applications/radio/gnuradio/3.7.nix @@ -221,11 +221,17 @@ let buildInputs disallowedReferences postInstall - passthru doCheck dontWrapPythonPrograms meta ; + + passthru = shared.passthru // { + # Deps that are potentially overriden and are used inside GR plugins - the same version must + inherit boost; + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { + inherit uhd; + }; cmakeFlags = shared.cmakeFlags # From some reason, if these are not set, libcodec2 and gsm are # not detected properly (slightly different then what's in diff --git a/pkgs/applications/radio/gnuradio/ais.nix b/pkgs/applications/radio/gnuradio/ais.nix deleted file mode 100644 index 8d6e8509772c..000000000000 --- a/pkgs/applications/radio/gnuradio/ais.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, boost -, gnuradio -, makeWrapper -, cppunit -, gr-osmosdr -, log4cpp -, pythonSupport ? true -, python -, swig -, fetchpatch -}: - -stdenv.mkDerivation { - pname = "gr-ais"; - version = "2015-12-20"; - - src = fetchFromGitHub { - owner = "bistromath"; - repo = "gr-ais"; - rev = "cdc1f52745853f9c739c718251830eb69704b26e"; - sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6"; - }; - - patches = [ - (fetchpatch { - url = "https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054.patch"; - sha256 = "1cwalphldvf6dbhzwz1gi53z0cb4921qsvlz4138q7m6dxccvssg"; - }) - ]; - - nativeBuildInputs = [ cmake makeWrapper pkg-config ]; - buildInputs = [ boost gnuradio cppunit gr-osmosdr log4cpp ] - ++ lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - meta = with lib; { - description = "Gnuradio block for ais"; - homepage = "https://github.com/bistromath/gr-ais"; - license = licenses.gpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index f8fc1fa10f85..fc7890299c53 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -228,6 +228,14 @@ let dontWrapQtApps meta ; + passthru = shared.passthru // { + # Deps that are potentially overriden and are used inside GR plugins - the same version must + inherit boost; + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { + inherit uhd; + } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { + inherit (libsForQt5) qwt; + }; cmakeFlags = shared.cmakeFlags # From some reason, if these are not set, libcodec2 and gsm are not # detected properly. NOTE: qradiolink needs libcodec2 to be detected in diff --git a/pkgs/applications/radio/gnuradio/gsm.nix b/pkgs/applications/radio/gnuradio/gsm.nix deleted file mode 100644 index 28c5045081b0..000000000000 --- a/pkgs/applications/radio/gnuradio/gsm.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp -, makeWrapper, cppunit, libosmocore, gr-osmosdr -, pythonSupport ? true, python, swig -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation { - pname = "gr-gsm"; - version = "2016-08-25"; - - src = fetchFromGitHub { - owner = "ptrkrysik"; - repo = "gr-gsm"; - rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d"; - sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx"; - }; - - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ - boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp - ] ++ lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gr-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out") - done - ''; - - meta = with lib; { - description = "Gnuradio block for gsm"; - homepage = "https://github.com/ptrkrysik/gr-gsm"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/radio/gnuradio/limesdr.nix b/pkgs/applications/radio/gnuradio/limesdr.nix deleted file mode 100644 index afe3de645270..000000000000 --- a/pkgs/applications/radio/gnuradio/limesdr.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio -, pythonSupport ? true, python, swig, limesuite, log4cpp -} : - -assert pythonSupport -> python != null && swig != null; - -let - version = "2.0.0"; - -in stdenv.mkDerivation { - pname = "gr-limesdr"; - inherit version; - - src = fetchFromGitHub { - owner = "myriadrf"; - repo = "gr-limesdr"; - rev = "v${version}"; - sha256 = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq"; - }; - - nativeBuildInputs = [ - cmake - pkg-config - ] ++ lib.optionals pythonSupport [ swig ]; - - buildInputs = [ - boost gnuradio limesuite log4cpp - ] ++ lib.optionals pythonSupport [ python ]; - - - meta = with lib; { - description = "Gnuradio source and sink blocks for LimeSDR"; - homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = [ maintainers.markuskowa ]; - }; -} diff --git a/pkgs/applications/radio/gnuradio/osmosdr.nix b/pkgs/applications/radio/gnuradio/osmosdr.nix deleted file mode 100644 index 436c4309a5b4..000000000000 --- a/pkgs/applications/radio/gnuradio/osmosdr.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ lib, stdenv, fetchgit, cmake, pkg-config, makeWrapper -, boost -, pythonSupport ? true, python, swig -, airspy -, gnuradio -, hackrf -, libbladeRF -, rtl-sdr -, soapysdr-with-plugins -, uhd -, log4cpp -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - pname = "gr-osmosdr"; - version = "0.1.5"; - - src = fetchgit { - url = "git://git.osmocom.org/gr-osmosdr"; - rev = "v${version}"; - sha256 = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv"; - }; - - nativeBuildInputs = [ cmake makeWrapper pkg-config ]; - buildInputs = [ - boost log4cpp airspy gnuradio hackrf libbladeRF rtl-sdr uhd - ] ++ lib.optionals stdenv.isLinux [ soapysdr-with-plugins ] - ++ lib.optionals pythonSupport [ python swig python.pkgs.cheetah ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - meta = with lib; { - description = "Gnuradio block for OsmoSDR and rtl-sdr"; - homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR"; - license = licenses.gpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ bjornfor ]; - }; -} diff --git a/pkgs/applications/radio/gnuradio/rds.nix b/pkgs/applications/radio/gnuradio/rds.nix deleted file mode 100644 index 4f15f2a961e4..000000000000 --- a/pkgs/applications/radio/gnuradio/rds.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp -, makeWrapper, pythonSupport ? true, python, swig -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - pname = "gr-rds"; - version = "1.1.0"; - - src = fetchFromGitHub { - owner = "bastibl"; - repo = "gr-rds"; - rev = "v${version}"; - sha256 = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy"; - }; - - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ - boost gnuradio makeWrapper log4cpp - ] ++ lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - meta = with lib; { - description = "Gnuradio block for radio data system"; - homepage = "https://github.com/bastibl/gr-rds"; - license = licenses.gpl2Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index aaf74abc2c50..d255b199bc90 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -1,9 +1,16 @@ { lib , stdenv +# The unwrapped gnuradio derivation , unwrapped +# If it's a minimal build, we don't want to wrap it with lndir and +# wrapProgram.. +, wrap ? true +# For the wrapper , makeWrapper # For lndir , xorg +# To define a the gnuradio.pkgs scope +, newScope # For Emulating wrapGAppsHook , gsettings-desktop-schemas , glib @@ -37,12 +44,16 @@ let [] ) ) unwrapped.featuresInfo) - ++ lib.optionals (unwrapped.hasFeature "python-support" unwrapped.features) [ - # Add unwrapped itself as a python module - (unwrapped.python.pkgs.toPythonModule unwrapped) - ] + ++ lib.optionals + (unwrapped.hasFeature "python-support" unwrapped.features) + ( + # Add unwrapped itself as a python module + [ (unwrapped.python.pkgs.toPythonModule unwrapped) ] + # Add all extraPackages as python modules + ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages) + ) ; - python3Env = unwrapped.python.withPackages(ps: pythonPkgs); + pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs); name = (lib.appendToName "wrapped" unwrapped).name; makeWrapperArgs = builtins.concatStringsSep " " ([ @@ -88,48 +99,84 @@ let (if unwrapped.versionAttr.major == "3.8" then [ "--prefix" "QT_PLUGIN_PATH" ":" - "${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtPluginPrefix}" + "${ + lib.makeSearchPath + unwrapped.qt.qtbase.qtPluginPrefix + (builtins.map lib.getBin [ + unwrapped.qt.qtbase + unwrapped.qt.qtwayland + ]) + }" "--prefix" "QML2_IMPORT_PATH" ":" - "${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtQmlPrefix}" + "${ + lib.makeSearchPath + unwrapped.qt.qtbase.qtQmlPrefix + (builtins.map lib.getBin [ + unwrapped.qt.qtbase + unwrapped.qt.qtwayland + ]) + }" ] else - # TODO: Add here qt4 related environment for 3.7? + # Add here qt4 related environment for 3.7? [ ] ) ++ extraMakeWrapperArgs ); -in -stdenv.mkDerivation { - inherit name; - buildInputs = [ - makeWrapper - xorg.lndir - ]; - - passthru = { - inherit python3Env pythonPkgs unwrapped; + packages = import ../../../top-level/gnuradio-packages.nix { + inherit lib stdenv newScope; + gnuradio = unwrapped; }; - - buildCommand = '' - mkdir $out - cd $out - lndir -silent ${unwrapped} - for i in $out/bin/*; do - if [[ ! -x "$i" ]]; then - continue - fi - cp -L "$i" "$i".tmp - mv -f "$i".tmp "$i" - if head -1 "$i" | grep -q ${unwrapped.python}; then - substituteInPlace "$i" \ - --replace ${unwrapped.python} ${python3Env} - fi - wrapProgram "$i" ${makeWrapperArgs} - done - ''; - - inherit (unwrapped) meta; -} + passthru = unwrapped.passthru // { + inherit + pythonEnv + pythonPkgs + unwrapped + ; + pkgs = packages; + }; + self = if wrap then + stdenv.mkDerivation { + inherit name passthru; + buildInputs = [ + makeWrapper + xorg.lndir + ]; + buildCommand = '' + mkdir $out + cd $out + lndir -silent ${unwrapped} + ${lib.optionalString + (extraPackages != []) + (builtins.concatStringsSep "\n" + (builtins.map (pkg: '' + if [[ -d ${lib.getBin pkg}/bin/ ]]; then + lndir -silent ${pkg}/bin ./bin + fi + '') extraPackages) + ) + } + for i in $out/bin/*; do + if [[ ! -x "$i" ]]; then + continue + fi + cp -L "$i" "$i".tmp + mv -f "$i".tmp "$i" + if head -1 "$i" | grep -q ${unwrapped.python}; then + substituteInPlace "$i" \ + --replace ${unwrapped.python} ${pythonEnv} + fi + wrapProgram "$i" ${makeWrapperArgs} + done + ''; + inherit (unwrapped) meta; + } + else + unwrapped.overrideAttrs(_: { + inherit passthru; + }) + ; +in self diff --git a/pkgs/applications/radio/qradiolink/default.nix b/pkgs/applications/radio/qradiolink/default.nix index 24c5f987f176..1688d0010fe2 100644 --- a/pkgs/applications/radio/qradiolink/default.nix +++ b/pkgs/applications/radio/qradiolink/default.nix @@ -1,13 +1,22 @@ -{ lib, stdenv, fetchFromGitHub, alsaLib, boost -, qt4, libpulseaudio, codec2, libconfig -, gnuradio, gr-osmosdr, gsm -, libopus, libjpeg, protobuf, qwt, speex +{ lib +, mkDerivation +, fetchFromGitHub +, libpulseaudio +, libconfig +, gnuradio +, gnuradioPackages +, gsm +, libopus +, libjpeg +, protobuf +, speex +, qmake4Hook } : let version = "0.5.0"; -in stdenv.mkDerivation { +in mkDerivation { pname = "qradiolink"; inherit version; @@ -32,20 +41,17 @@ in stdenv.mkDerivation { ''; buildInputs = [ - qt4 - alsaLib - boost libpulseaudio - codec2 libconfig gsm - gnuradio - gr-osmosdr + gnuradioPackages.osmosdr libopus libjpeg - protobuf speex - qwt + ]; + nativeBuildInputs = [ + protobuf + qmake4Hook ]; enableParallelBuilding = true; diff --git a/pkgs/development/gnuradio-modules/ais/default.nix b/pkgs/development/gnuradio-modules/ais/default.nix new file mode 100644 index 000000000000..0770d83f21d9 --- /dev/null +++ b/pkgs/development/gnuradio-modules/ais/default.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, mkDerivation +, fetchFromGitHub +, cmake +, pkg-config +, python +, boost +, cppunit +, log4cpp +, osmosdr +}: + +mkDerivation rec { + pname = "gr-ais"; + version = "2015-12-20"; + src = fetchFromGitHub { + owner = "bistromath"; + repo = "gr-ais"; + rev = "cdc1f52745853f9c739c718251830eb69704b26e"; + sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6"; + }; + disabledForGRafter = "3.8"; + + nativeBuildInputs = [ + cmake + pkg-config + python + ]; + + buildInputs = [ + cppunit + osmosdr + boost + log4cpp + ]; + + meta = with lib; { + description = "Gnuradio block for ais"; + homepage = "https://github.com/bistromath/gr-ais"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ mog ]; + }; +} diff --git a/pkgs/development/gnuradio-modules/gsm/default.nix b/pkgs/development/gnuradio-modules/gsm/default.nix new file mode 100644 index 000000000000..835c5456668c --- /dev/null +++ b/pkgs/development/gnuradio-modules/gsm/default.nix @@ -0,0 +1,48 @@ +{ lib +, mkDerivation +, fetchFromGitHub +, cmake +, pkg-config +, cppunit +, swig +, boost +, log4cpp +, python +, libosmocore +, osmosdr +}: + +mkDerivation { + pname = "gr-gsm"; + version = "2016-08-25"; + src = fetchFromGitHub { + owner = "ptrkrysik"; + repo = "gr-gsm"; + rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d"; + sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx"; + }; + disabledForGRafter = "3.8"; + + nativeBuildInputs = [ + cmake + pkg-config + swig + python + ]; + + buildInputs = [ + cppunit + log4cpp + boost + libosmocore + osmosdr + ]; + + meta = with lib; { + description = "Gnuradio block for gsm"; + homepage = "https://github.com/ptrkrysik/gr-gsm"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ mog ]; + }; +} diff --git a/pkgs/development/gnuradio-modules/limesdr/default.nix b/pkgs/development/gnuradio-modules/limesdr/default.nix new file mode 100644 index 000000000000..63136b33d658 --- /dev/null +++ b/pkgs/development/gnuradio-modules/limesdr/default.nix @@ -0,0 +1,59 @@ +{ lib +, mkDerivation +, fetchFromGitHub +, gnuradio +, cmake +, pkg-config +, doxygen +, swig +, python +, log4cpp +, mpir +, boost +, gmp +, icu +, limesuite +}: + +let + version = { + "3.7" = "2.0.0"; + "3.8" = "3.0.1"; + }.${gnuradio.versionAttr.major}; + src = fetchFromGitHub { + owner = "myriadrf"; + repo = "gr-limesdr"; + rev = "v${version}"; + sha256 = { + "3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq"; + "3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U="; + }.${gnuradio.versionAttr.major}; + }; +in mkDerivation { + pname = "gr-limesdr"; + inherit version src; + disabledForGRafter = "3.9"; + + nativeBuildInputs = [ + cmake + pkg-config + swig + python + ]; + buildInputs = [ + log4cpp + mpir + boost + gmp + icu + limesuite + ]; + + meta = with lib; { + description = "Gnuradio source and sink blocks for LimeSDR"; + homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ maintainers.markuskowa ]; + }; +} diff --git a/pkgs/development/gnuradio-modules/mkDerivation.nix b/pkgs/development/gnuradio-modules/mkDerivation.nix new file mode 100644 index 000000000000..235eff25cdbd --- /dev/null +++ b/pkgs/development/gnuradio-modules/mkDerivation.nix @@ -0,0 +1,23 @@ +{ lib +, unwrapped +}: + +mkDerivation: + +args: + +# Check if it's supposed to not get built for the current gnuradio version +if (builtins.hasAttr "disabledForGRafter" args) && +(lib.versionAtLeast unwrapped.versionAttr.major args.disabledForGRafter) then +let name = args.name or "${args.pname}"; in +throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}" +else + +let + args_ = { + enableParallelBuilding = args.enableParallelBuilding or true; + nativeBuildInputs = (args.nativeBuildInputs or []); + # We add gnuradio itself by default + buildInputs = (args.buildInputs or []) ++ [ unwrapped ]; + }; +in mkDerivation (args // args_) diff --git a/pkgs/applications/radio/gnuradio/nacl.nix b/pkgs/development/gnuradio-modules/nacl/default.nix similarity index 50% rename from pkgs/applications/radio/gnuradio/nacl.nix rename to pkgs/development/gnuradio-modules/nacl/default.nix index f6c21e794542..1ffb0afee07e 100644 --- a/pkgs/applications/radio/gnuradio/nacl.nix +++ b/pkgs/development/gnuradio-modules/nacl/default.nix @@ -1,31 +1,40 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, uhd -, makeWrapper, libsodium, cppunit, log4cpp -, pythonSupport ? true, python, swig +{ lib +, mkDerivation +, fetchFromGitHub +, cmake +, pkg-config +, cppunit +, swig +, boost +, log4cpp +, python +, libsodium }: -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation { +mkDerivation { pname = "gr-nacl"; version = "2017-04-10"; - src = fetchFromGitHub { owner = "stwunsch"; repo = "gr-nacl"; rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765"; sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v"; }; + disabledForGRafter = "3.8"; + + nativeBuildInputs = [ + cmake + pkg-config + swig + python + ]; - nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ - boost gnuradio uhd makeWrapper libsodium cppunit log4cpp - ] ++ lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; + cppunit + log4cpp + boost + libsodium + ]; meta = with lib; { description = "Gnuradio block for encryption"; diff --git a/pkgs/development/gnuradio-modules/osmosdr/default.nix b/pkgs/development/gnuradio-modules/osmosdr/default.nix new file mode 100644 index 000000000000..4159862bbed7 --- /dev/null +++ b/pkgs/development/gnuradio-modules/osmosdr/default.nix @@ -0,0 +1,84 @@ +{ lib +, mkDerivation +, fetchgit +, gnuradio +, cmake +, pkg-config +, log4cpp +, mpir +, boost +, gmp +, fftwFloat +, python +, swig +, uhd +, icu +, airspy +, hackrf +, libbladeRF +, rtl-sdr +, soapysdr-with-plugins +}: + +let + version = { + "3.7" = "0.1.5"; + "3.8" = "0.2.2"; + }.${gnuradio.versionAttr.major}; + src = fetchgit { + url = "git://git.osmocom.org/gr-osmosdr"; + rev = "v${version}"; + sha256 = { + "3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv"; + "3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs="; + }.${gnuradio.versionAttr.major}; + }; +in mkDerivation { + pname = "gr-osmosdr"; + inherit version src; + disabledForGRafter = "3.9"; + + buildInputs = [ + log4cpp + mpir + boost + fftwFloat + gmp + icu + airspy + hackrf + libbladeRF + rtl-sdr + soapysdr-with-plugins + ] ++ lib.optional (gnuradio.hasFeature "gr-uhd" gnuradio.features) [ + uhd + ]; + cmakeFlags = [ + (if (gnuradio.hasFeature "python-support" gnuradio.features) then + "-DENABLE_PYTHON=ON" + else + "-DENABLE_PYTHON=OFF" + ) + ]; + nativeBuildInputs = [ + cmake + pkg-config + swig + ] ++ lib.optionals (gnuradio.hasFeature "python-support" gnuradio.features) [ + (if (gnuradio.versionAttr.major == "3.7") then + python.pkgs.cheetah + else + python.pkgs.Mako + ) + python + ] + ; + + meta = with lib; { + description = "Gnuradio block for OsmoSDR and rtl-sdr"; + homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ bjornfor ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/gnuradio-modules/rds/default.nix b/pkgs/development/gnuradio-modules/rds/default.nix new file mode 100644 index 000000000000..a2062783bd74 --- /dev/null +++ b/pkgs/development/gnuradio-modules/rds/default.nix @@ -0,0 +1,57 @@ +{ lib +, mkDerivation +, fetchFromGitHub +, gnuradio +, cmake +, pkg-config +, swig +, python +, log4cpp +, mpir +, boost +, gmp +, icu +}: + +let + version = { + "3.7" = "1.1.0"; + "3.8" = "3.8.0"; + }.${gnuradio.versionAttr.major}; + src = fetchFromGitHub { + owner = "bastibl"; + repo = "gr-rds"; + rev = "v${version}"; + sha256 = { + "3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy"; + "3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o="; + }.${gnuradio.versionAttr.major}; + }; +in mkDerivation { + pname = "gr-rds"; + inherit version src; + disabledForGRafter = "3.9"; + + buildInputs = [ + log4cpp + mpir + boost + gmp + icu + ]; + + nativeBuildInputs = [ + cmake + pkg-config + swig + python + ]; + + meta = with lib; { + description = "Gnuradio block for radio data system"; + homepage = "https://github.com/bastibl/gr-rds"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ mog ]; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6036e4216836..260c5cfb2bc4 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -240,16 +240,24 @@ mapAliases ({ gnome_doc_utils = gnome-doc-utils; # added 2018-02-25 gnome_themes_standard = gnome-themes-standard; # added 2018-02-25 gnunet_git = throw "gnunet_git was removed due to gnunet becoming stable"; # added 2019-05-27 - gnuradio-nacl = gr-nacl; # added 2019-05-27 - gnuradio-gsm = gr-gsm; # added 2019-05-27 - gnuradio-ais = gr-ais; # added 2019-05-27 - gnuradio-limesdr = gr-limesdr; # added 2019-05-27 - gnuradio-rds = gr-rds; # added 2019-05-27 - gnuradio-osmosdr = gr-osmosdr; # added 2019-05-27 - # added 20-10-2020 + # Added 2020-10-16 gnuradio-with-packages = gnuradio3_7.override { - extraPackages = [ gr-nacl gr-gsm gr-ais gr-limesdr gr-rds gr-osmosdr ]; + extraPackages = lib.attrVals [ + "osmosdr" "ais" "gsm" "nacl" "rds" "limesdr" + ] gnuradio3_7Packages; }; + gnuradio-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16 + gnuradio-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16 + gnuradio-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16 + gnuradio-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16 + gnuradio-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16 + gnuradio-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16 + gr-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16 + gr-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16 + gr-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16 + gr-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16 + gr-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16 + gr-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16 gnustep-make = gnustep.make; # added 2016-7-6 gnupg20 = throw "gnupg20 has been removed from nixpkgs as upstream dropped support on 2017-12-31";# added 2020-07-12 gnuvd = throw "gnuvd was removed because the backend service is missing"; # added 2020-01-14 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 97da2fa1699e..4a6fe9410cc3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16776,13 +16776,7 @@ in qm-dsp = callPackage ../development/libraries/audio/qm-dsp { }; - qradiolink = callPackage ../applications/radio/qradiolink { - # 3.8 support is not ready yet: - # https://github.com/qradiolink/qradiolink/issues/67#issuecomment-703222573 - # The non minimal build is used because the 'qtgui' component is needed. - # gr-osmosdr is using the same gnuradio as of now. - gnuradio = gnuradio3_7-unwrapped; - }; + qradiolink = callPackage ../applications/radio/qradiolink { }; qrupdate = callPackage ../development/libraries/qrupdate { }; @@ -22333,82 +22327,62 @@ in gnss-sdr = callPackage ../applications/radio/gnss-sdr { boost = boost166; - gnuradio = gnuradio3_7-unwrapped; + gnuradio = gnuradio3_7.unwrapped; }; - gnuradio-unwrapped = callPackage ../applications/radio/gnuradio { - inherit (darwin.apple_sdk.frameworks) CoreAudio; - python = python3; - boost = boost17x; - }; - # A build without gui components and other utilites not needed for end user - # libraries - gnuradioMinimal = gnuradio-unwrapped.override { - features = { - gnuradio-companion = false; - python-support = false; - gr-ctrlport = false; - examples = false; - gr-qtgui = false; - gr-utils = false; - gr-modtool = false; - sphinx = false; - doxygen = false; + gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix { + unwrapped = callPackage ../applications/radio/gnuradio { + inherit (darwin.apple_sdk.frameworks) CoreAudio; + python = python3; + boost = boost17x; }; }; - gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix { - unwrapped = gnuradio-unwrapped; - }; - gnuradio3_7-unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix { - inherit (darwin.apple_sdk.frameworks) CoreAudio; - python = python2; - # Incompatible with uhd4+ - uhd = uhd3_5; - }; - # A build without gui components and other utilites not needed if gnuradio is - # used as a c++ library. - gnuradio3_7Minimal = gnuradio3_7-unwrapped.override { - features = { - gnuradio-companion = false; - python-support = false; - gr-ctrlport = false; - gr-qtgui = false; - gr-utils = false; - sphinx = false; - doxygen = false; - gr-wxgui = false; + gnuradioPackages = lib.recurseIntoAttrs gnuradio.pkgs; + # A build without gui components and other utilites not needed for end user + # libraries + gnuradioMinimal = gnuradio.override { + wrap = false; + unwrapped = gnuradio.unwrapped.override { + features = { + gnuradio-companion = false; + python-support = false; + examples = false; + gr-qtgui = false; + gr-utils = false; + gr-modtool = false; + sphinx = false; + doxygen = false; + }; }; }; gnuradio3_7 = callPackage ../applications/radio/gnuradio/wrapper.nix { - unwrapped = gnuradio3_7-unwrapped; + unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix { + inherit (darwin.apple_sdk.frameworks) CoreAudio; + python = python2; + # Incompatible with uhd4+ + uhd = uhd3_5; + }; + }; + gnuradio3_7Packages = lib.recurseIntoAttrs gnuradio3_7.pkgs; + # A build without gui components and other utilites not needed if gnuradio is + # used as a c++ library. + gnuradio3_7Minimal = gnuradio3_7.override { + wrap = false; + unwrapped = gnuradio3_7.unwrapped.override { + features = { + gnuradio-companion = false; + python-support = false; + gr-qtgui = false; + gr-utils = false; + sphinx = false; + doxygen = false; + gr-wxgui = false; + }; + }; }; grandorgue = callPackage ../applications/audio/grandorgue { }; - gr-nacl = callPackage ../applications/radio/gnuradio/nacl.nix { - gnuradio = gnuradio3_7-unwrapped; - }; - - gr-gsm = callPackage ../applications/radio/gnuradio/gsm.nix { - gnuradio = gnuradio3_7-unwrapped; - }; - - gr-ais = callPackage ../applications/radio/gnuradio/ais.nix { - gnuradio = gnuradio3_7-unwrapped; - }; - - gr-limesdr = callPackage ../applications/radio/gnuradio/limesdr.nix { - gnuradio = gnuradio3_7-unwrapped; - }; - - gr-rds = callPackage ../applications/radio/gnuradio/rds.nix { - gnuradio = gnuradio3_7-unwrapped; - }; - - gr-osmosdr = callPackage ../applications/radio/gnuradio/osmosdr.nix { - gnuradio = gnuradio3_7-unwrapped; - }; - goldendict = libsForQt5.callPackage ../applications/misc/goldendict { inherit (darwin) libiconv; }; @@ -22435,14 +22409,7 @@ in gpx = callPackage ../applications/misc/gpx { }; - gqrx = libsForQt514.callPackage ../applications/radio/gqrx { - gnuradio = gnuradio3_7Minimal; - # Use the same gnuradio for gr-osmosdr as well - gr-osmosdr = gr-osmosdr.override { - gnuradio = gnuradio3_7Minimal; - pythonSupport = false; - }; - }; + gqrx = callPackage ../applications/radio/gqrx { }; gpx-viewer = callPackage ../applications/misc/gpx-viewer { }; diff --git a/pkgs/top-level/gnuradio-packages.nix b/pkgs/top-level/gnuradio-packages.nix new file mode 100644 index 000000000000..6c8db76cb3e0 --- /dev/null +++ b/pkgs/top-level/gnuradio-packages.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, newScope +, gnuradio # unwrapped gnuradio +}: + +lib.makeScope newScope ( self: + +let + # Modeled after qt's + mkDerivationWith = import ../development/gnuradio-modules/mkDerivation.nix { + inherit lib; + unwrapped = gnuradio; + }; + mkDerivation = mkDerivationWith stdenv.mkDerivation; + + callPackage = self.newScope { + inherit (gnuradio) + # Packages that are potentially overriden and commonly + boost + uhd + ; + inherit mkDerivationWith mkDerivation; + }; + +in { + + inherit callPackage mkDerivation mkDerivationWith; + + ### Packages + + inherit gnuradio; + + osmosdr = callPackage ../development/gnuradio-modules/osmosdr/default.nix { }; + + ais = callPackage ../development/gnuradio-modules/ais/default.nix { }; + + gsm = callPackage ../development/gnuradio-modules/gsm/default.nix { }; + + nacl = callPackage ../development/gnuradio-modules/nacl/default.nix { }; + + rds = callPackage ../development/gnuradio-modules/rds/default.nix { }; + + limesdr = callPackage ../development/gnuradio-modules/limesdr/default.nix { }; + +}) From 6a4744a09436803e6a0865fe7c2ed2e3c4cd5497 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 15 Dec 2020 12:31:32 +0200 Subject: [PATCH 28/61] gnuradio: Remove qt5 and gtk from passthru if not used Attributes such as gnuradioMinimal built without gui support should not have the `qt` and `gtk` attributes in it's passthru. --- pkgs/applications/radio/gnuradio/shared.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index 9b354d5b960c..271819e60724 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -103,9 +103,11 @@ rec { features featuresInfo python - qt - gtk ; + } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { + inherit qt; + } // lib.optionalAttrs (hasFeature "gnuradio-companion" features) { + inherit gtk; }; # Wrapping is done with an external wrapper dontWrapPythonPrograms = true; From b944ca935012fb48c7f801fcc5edd745ad1639da Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 15 Dec 2020 11:56:54 +0200 Subject: [PATCH 29/61] gnss-sdr: Refactor to use gnuradio.pkgs.mkDerivation Use the same dependencies that gnuradio uses, thanks to gnuradio's `mkDerivation`. Add `gnuradio.pkgs.osmosdr` as dependency. --- pkgs/applications/radio/gnss-sdr/default.nix | 30 ++++++++++++-------- pkgs/top-level/all-packages.nix | 5 +--- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/radio/gnss-sdr/default.nix b/pkgs/applications/radio/gnss-sdr/default.nix index f48a21db75e7..13636cf4415d 100644 --- a/pkgs/applications/radio/gnss-sdr/default.nix +++ b/pkgs/applications/radio/gnss-sdr/default.nix @@ -1,15 +1,16 @@ -{ lib, stdenv, fetchFromGitHub +{ lib +, fetchFromGitHub , armadillo -, boost , cmake +, gmp , glog , gmock , openssl , gflags , gnuradio +, libpcap , orc , pkg-config -, pythonPackages , uhd , log4cpp , blas, lapack @@ -18,7 +19,7 @@ , protobuf }: -stdenv.mkDerivation rec { +gnuradio.pkgs.mkDerivation rec { pname = "gnss-sdr"; version = "0.0.13"; @@ -29,27 +30,32 @@ stdenv.mkDerivation rec { sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby"; }; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + gnuradio.unwrapped.python + gnuradio.unwrapped.python.pkgs.Mako + gnuradio.unwrapped.python.pkgs.six + ]; + buildInputs = [ + gmp armadillo - boost.dev + gnuradio.unwrapped.boost glog gmock - openssl.dev + openssl gflags - gnuradio orc - pythonPackages.Mako - pythonPackages.six - # UHD support is optional, but gnuradio is built with it, so there's # nothing to be gained by leaving it out. - uhd + gnuradio.unwrapped.uhd log4cpp blas lapack matio pugixml protobuf + gnuradio.pkgs.osmosdr + libpcap ]; cmakeFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a6fe9410cc3..bee79ffc8d0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22325,10 +22325,7 @@ in gksu = callPackage ../applications/misc/gksu { }; - gnss-sdr = callPackage ../applications/radio/gnss-sdr { - boost = boost166; - gnuradio = gnuradio3_7.unwrapped; - }; + gnss-sdr = callPackage ../applications/radio/gnss-sdr { }; gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix { unwrapped = callPackage ../applications/radio/gnuradio { From fea0ac887eaa649dfc0d45cf58cb37d767f5071e Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 10 Dec 2020 22:49:07 +0200 Subject: [PATCH 30/61] qradiolink: 0.5.0 -> 0.8.5-2 Use gnuradio.pkgs.mkDerivation (gnuradio 3.8) and updated deps. --- pkgs/applications/radio/gnuradio/default.nix | 1 - .../applications/radio/qradiolink/default.nix | 48 ++++++++++++------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index fc7890299c53..4ba1782bfabb 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -222,7 +222,6 @@ let buildInputs disallowedReferences stripDebugList - passthru doCheck dontWrapPythonPrograms dontWrapQtApps diff --git a/pkgs/applications/radio/qradiolink/default.nix b/pkgs/applications/radio/qradiolink/default.nix index 1688d0010fe2..db459eb3bb34 100644 --- a/pkgs/applications/radio/qradiolink/default.nix +++ b/pkgs/applications/radio/qradiolink/default.nix @@ -1,57 +1,71 @@ { lib -, mkDerivation , fetchFromGitHub , libpulseaudio , libconfig +# Needs a gnuradio built with qt gui support , gnuradio -, gnuradioPackages +# Not gnuradioPackages' +, codec2 +, log4cpp +, gmp , gsm , libopus , libjpeg +, libsndfile +, libftdi , protobuf , speex -, qmake4Hook -} : +, speexdsp +}: -let - version = "0.5.0"; - -in mkDerivation { +gnuradio.pkgs.mkDerivation rec { pname = "qradiolink"; - inherit version; + version = "0.8.5-2"; src = fetchFromGitHub { - owner = "kantooon"; + owner = "qradiolink"; repo = "qradiolink"; rev = version; - sha256 = "0xhg5zhjznmls5m3rhpk1qx0dipxmca12s85w15d0i7qwva2f1gi"; + sha256 = "MgHfKR3AJW3pIN9oCBr4BWxk1fGSCpLmMzjxvuTmuFA="; }; preBuild = '' - cd ext + cd src/ext protoc --cpp_out=. Mumble.proto protoc --cpp_out=. QRadioLink.proto - cd .. + cd ../.. qmake ''; installPhase = '' - mkdir -p $out/bin - cp qradiolink $out/bin + install -D qradiolink $out/bin/qradiolink + install -Dm644 src/res/icon.png $out/share/pixmaps/qradiolink.png + install -Dm644 qradiolink.desktop $out/share/applications/qradiolink.desktop ''; buildInputs = [ + gnuradio.unwrapped.boost + codec2 + log4cpp + gmp libpulseaudio libconfig gsm - gnuradioPackages.osmosdr + gnuradio.pkgs.osmosdr libopus libjpeg speex + speexdsp + gnuradio.qt.qtbase + gnuradio.qt.qtmultimedia + libftdi + libsndfile + gnuradio.qwt ]; nativeBuildInputs = [ protobuf - qmake4Hook + gnuradio.qt.qmake + gnuradio.qt.wrapQtAppsHook ]; enableParallelBuilding = true; From 99c3bdb9b610b8782abca17c36c7be51d28c9d30 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 15 Dec 2020 11:58:49 +0200 Subject: [PATCH 31/61] gqrx: Refactor to use gnuradioMinimal.pkgs.mkDerivation - Use gnuradio's `mkDerivation` which includes most of the deps needed. - Always enable pulseaudio support as that's part of gnuradio's deps anyway. - Use gnuradioMinimal.pkgs.osmosdr - not from the alias gr-osmosdr. --- pkgs/applications/radio/gqrx/default.nix | 36 ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix index 217818f67c29..9514ce2e936b 100644 --- a/pkgs/applications/radio/gqrx/default.nix +++ b/pkgs/applications/radio/gqrx/default.nix @@ -1,13 +1,23 @@ -{ lib, fetchFromGitHub, cmake, qtbase, qtsvg, gnuradio, boost, gr-osmosdr -, mkDerivation +{ lib +, fetchFromGitHub +, cmake +, pkg-config +, qt5 +, gnuradioMinimal +, log4cpp +, mpir +, fftwFloat +, alsaLib +, libjack2 # drivers (optional): -, rtl-sdr, hackrf +, rtl-sdr +, hackrf , pulseaudioSupport ? true, libpulseaudio }: assert pulseaudioSupport -> libpulseaudio != null; -mkDerivation rec { +gnuradioMinimal.pkgs.mkDerivation rec { pname = "gqrx"; version = "2.14.4"; @@ -18,9 +28,23 @@ mkDerivation rec { sha256 = "sha256-mMaxu0jq2GaNLWjLsJQXx+zCxtyiCAZQJJZ8GJtnllQ="; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + pkg-config + qt5.wrapQtAppsHook + ]; buildInputs = [ - qtbase qtsvg gnuradio boost gr-osmosdr rtl-sdr hackrf + log4cpp + mpir + fftwFloat + alsaLib + libjack2 + gnuradioMinimal.unwrapped.boost + qt5.qtbase + qt5.qtsvg + gnuradioMinimal.pkgs.osmosdr + rtl-sdr + hackrf ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ]; postInstall = '' From 9545bbadfa9a67c5c9a28aed951e3fcadb955dc9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 15 Dec 2020 12:24:56 +0200 Subject: [PATCH 32/61] inspectrum: Refactor to use gnuradioMinimal.pkgs.mkDerivation Use the same deps of gnuradioMinimal - thanks to gnuradio's mkDerivation. --- .../applications/radio/inspectrum/default.nix | 19 +++++++++---------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/radio/inspectrum/default.nix b/pkgs/applications/radio/inspectrum/default.nix index 37131a686b52..3cc8c59cc026 100644 --- a/pkgs/applications/radio/inspectrum/default.nix +++ b/pkgs/applications/radio/inspectrum/default.nix @@ -1,17 +1,14 @@ { lib -, mkDerivation +, gnuradioMinimal , fetchFromGitHub , pkg-config , cmake -, boost , fftwFloat -, gnuradio +, qt5 , liquid-dsp -, qtbase -, wrapQtAppsHook }: -mkDerivation rec { +gnuradioMinimal.pkgs.mkDerivation rec { pname = "inspectrum"; version = "0.2.3"; @@ -22,13 +19,15 @@ mkDerivation rec { sha256 = "1x6nyn429pk0f7lqzskrgsbq09mq5787xd4piic95add6n1cc355"; }; - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; + nativeBuildInputs = [ + cmake + qt5.wrapQtAppsHook + pkg-config + ]; buildInputs = [ fftwFloat - boost - gnuradio liquid-dsp - qtbase + qt5.qtbase ]; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bee79ffc8d0b..c43d5a1d9927 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23250,9 +23250,7 @@ in inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {}); - inspectrum = libsForQt514.callPackage ../applications/radio/inspectrum { - gnuradio = gnuradioMinimal; - }; + inspectrum = callPackage ../applications/radio/inspectrum { }; ion3 = callPackage ../applications/window-managers/ion-3 { lua = lua5_1; From 7df0fa108a76aeb892db5e0499aa9e57b61b6a2b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 15 Feb 2021 22:09:25 +0200 Subject: [PATCH 33/61] volk: init at 2.4.1 --- pkgs/development/libraries/volk/default.nix | 51 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/libraries/volk/default.nix diff --git a/pkgs/development/libraries/volk/default.nix b/pkgs/development/libraries/volk/default.nix new file mode 100644 index 000000000000..574a90d22724 --- /dev/null +++ b/pkgs/development/libraries/volk/default.nix @@ -0,0 +1,51 @@ +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, cmake +, cppunit +, python3 +, enableModTool ? true +, removeReferencesTo +}: + +stdenv.mkDerivation rec { + pname = "volk"; + version = "2.4.1"; + + src = fetchFromGitHub { + owner = "gnuradio"; + repo = pname; + rev = "v${version}"; + sha256 = "fuHJ+p5VN4ThdbQFbzB08VCuy/Zo7m/I1Gs5EQGPeNY="; + fetchSubmodules = true; + }; + + patches = [ + # Fixes a failing test: https://github.com/gnuradio/volk/pull/434 + (fetchpatch { + url = "https://github.com/gnuradio/volk/pull/434/commits/bce8531b6f1a3c5abe946ed6674b283d54258281.patch"; + sha256 = "OLW9uF6iL47z63kjvYqwsWtkINav8Xhs+Htqg6Kr4uI="; + }) + ]; + cmakeFlags = lib.optionals (!enableModTool) [ "-DENABLE_MODTOOL=OFF" ]; + postInstall = '' + ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so) + ''; + + nativeBuildInputs = [ + cmake + python3 + python3.pkgs.Mako + ]; + + doCheck = true; + + meta = with lib; { + homepage = "http://libvolk.org/"; + description = "The Vector Optimized Library of Kernels"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ doronbehar ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c43d5a1d9927..23bbaccd54d3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3953,6 +3953,8 @@ in volctl = callPackage ../tools/audio/volctl { }; + volk = callPackage ../development/libraries/volk { }; + vorta = libsForQt5.callPackage ../applications/backup/vorta { }; utahfs = callPackage ../applications/networking/utahfs { }; From a0e35869a21edfd2a6595cbd6aa9f3fd09654c82 Mon Sep 17 00:00:00 2001 From: Logan Glasson Date: Sun, 14 Mar 2021 00:33:02 +1300 Subject: [PATCH 34/61] aerc, asuka, scdoc, wev, wlsunset, wshowkeys: use fetchFromSourceHut --- .../applications/networking/browsers/asuka/default.nix | 10 ++++++---- .../networking/mailreaders/aerc/default.nix | 10 ++++++---- pkgs/tools/typesetting/scdoc/default.nix | 10 ++++++---- pkgs/tools/wayland/wev/default.nix | 10 ++++++---- pkgs/tools/wayland/wlsunset/default.nix | 10 ++++++---- pkgs/tools/wayland/wshowkeys/default.nix | 10 ++++++---- 6 files changed, 36 insertions(+), 24 deletions(-) diff --git a/pkgs/applications/networking/browsers/asuka/default.nix b/pkgs/applications/networking/browsers/asuka/default.nix index 98c8a8afae0c..6702fdaf7a96 100644 --- a/pkgs/applications/networking/browsers/asuka/default.nix +++ b/pkgs/applications/networking/browsers/asuka/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, rustPlatform, fetchurl, pkg-config, ncurses, openssl, Security }: +{ lib, stdenv, rustPlatform, fetchFromSourcehut, pkg-config, ncurses, openssl, Security }: rustPlatform.buildRustPackage rec { pname = "asuka"; version = "0.8.1"; - src = fetchurl { - url = "https://git.sr.ht/~julienxx/${pname}/archive/${version}.tar.gz"; - sha256 = "07i80qmdpwfdgwrk1gzs10wln91v23qjrsk0x134xf5mjnakxc06"; + src = fetchFromSourcehut { + owner = "~julienxx"; + repo = pname; + rev = version; + sha256 = "1y8v4qc5dng3v9k0bky1xlf3qi9pk2vdsi29lff4ha5310467f0k"; }; cargoSha256 = "0p0x4ch04kydg76bfal5zqzr9hvn5268wf3k2v9h7g8r4y8xqlhw"; diff --git a/pkgs/applications/networking/mailreaders/aerc/default.nix b/pkgs/applications/networking/mailreaders/aerc/default.nix index 3124239b0d9a..09ce39027b5a 100644 --- a/pkgs/applications/networking/mailreaders/aerc/default.nix +++ b/pkgs/applications/networking/mailreaders/aerc/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchurl +{ lib, buildGoModule, fetchFromSourcehut , ncurses, notmuch, scdoc , python3, w3m, dante }: @@ -7,9 +7,11 @@ buildGoModule rec { pname = "aerc"; version = "0.5.2"; - src = fetchurl { - url = "https://git.sr.ht/~sircmpwn/aerc/archive/${version}.tar.gz"; - sha256 = "h7kiRA5TuZ8mDSMymWU33stFLIOMd06TQLYzKW+faO4="; + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = pname; + rev = version; + sha256 = "1ja639qry8h2d6y7qshf62ypkzs2rzady59p81scqh8nx0g9bils"; }; runVend = true; diff --git a/pkgs/tools/typesetting/scdoc/default.nix b/pkgs/tools/typesetting/scdoc/default.nix index 1b22b781d549..1e6c86c19923 100644 --- a/pkgs/tools/typesetting/scdoc/default.nix +++ b/pkgs/tools/typesetting/scdoc/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchFromSourcehut }: stdenv.mkDerivation rec { pname = "scdoc"; version = "1.11.1"; - src = fetchurl { - url = "https://git.sr.ht/~sircmpwn/scdoc/archive/${version}.tar.gz"; - sha256 = "007pm3gspvya58cwb12wpnrm9dq5p28max2s0b2y9rq80nqgqag5"; + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = pname; + rev = version; + sha256 = "1g37j847j3h4a4qbbfbr6vvsxpifj9v25jgv25nd71d1n0dxlhvk"; }; postPatch = '' diff --git a/pkgs/tools/wayland/wev/default.nix b/pkgs/tools/wayland/wev/default.nix index 83e4113f7ea2..69288a1bc8ce 100644 --- a/pkgs/tools/wayland/wev/default.nix +++ b/pkgs/tools/wayland/wev/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, fetchurl +, fetchFromSourcehut , pkg-config , scdoc , wayland @@ -12,9 +12,11 @@ stdenv.mkDerivation rec { pname = "wev"; version = "1.0.0"; - src = fetchurl { - url = "https://git.sr.ht/~sircmpwn/wev/archive/${version}.tar.gz"; - sha256 = "0vlxdkb59v6nb10j28gh1a56sx8jk7ak7liwzv911kpmygnls03g"; + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = pname; + rev = version; + sha256 = "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"; }; nativeBuildInputs = [ pkg-config scdoc wayland ]; diff --git a/pkgs/tools/wayland/wlsunset/default.nix b/pkgs/tools/wayland/wlsunset/default.nix index 692ddd37cf39..931f394d6890 100644 --- a/pkgs/tools/wayland/wlsunset/default.nix +++ b/pkgs/tools/wayland/wlsunset/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, meson, pkg-config, ninja, wayland +{ lib, stdenv, fetchFromSourcehut, meson, pkg-config, ninja, wayland , wayland-protocols }: @@ -6,9 +6,11 @@ stdenv.mkDerivation rec { pname = "wlsunset"; version = "0.1.0"; - src = fetchurl { - url = "https://git.sr.ht/~kennylevinsen/wlsunset/archive/${version}.tar.gz"; - sha256 = "0g7mk14hlbwbhq6nqr84452sbgcja3hdxsqf0vws4njhfjgqiv3q"; + src = fetchFromSourcehut { + owner = "~kennylevinsen"; + repo = pname; + rev = version; + sha256 = "12snizvf49y40cirhr2brgyldhsykv4k2gnln2sdrajqzhrc98v6"; }; nativeBuildInputs = [ meson pkg-config ninja wayland ]; diff --git a/pkgs/tools/wayland/wshowkeys/default.nix b/pkgs/tools/wayland/wshowkeys/default.nix index 1c095ca297a6..5f0025d6072b 100644 --- a/pkgs/tools/wayland/wshowkeys/default.nix +++ b/pkgs/tools/wayland/wshowkeys/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl +{ lib, stdenv, fetchFromSourcehut , meson, pkg-config, wayland, ninja , cairo, libinput, pango, wayland-protocols, libxkbcommon }: @@ -10,9 +10,11 @@ in stdenv.mkDerivation rec { pname = "wshowkeys-unstable"; inherit version; - src = fetchurl { - url = "https://git.sr.ht/~sircmpwn/wshowkeys/archive/${commit}.tar.gz"; - sha256 = "0iplmw13jmc8d3m307kc047zq8yqwm42kw9fpm270562i3p0qk4d"; + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = "wshowkeys"; + rev = commit; + sha256 = "10kafdja5cwbypspwhvaxjz3hvf51vqjzbgdasl977193cvxgmbs"; }; nativeBuildInputs = [ meson pkg-config wayland ninja ]; From 3700bb62e5993c90a21aec33b9c06cc365cb3e3d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 11:43:48 +0000 Subject: [PATCH 35/61] pueue: 0.12.0 -> 0.12.1 --- pkgs/applications/misc/pueue/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/pueue/default.nix b/pkgs/applications/misc/pueue/default.nix index dd46c566cd82..4fe47a1c1600 100644 --- a/pkgs/applications/misc/pueue/default.nix +++ b/pkgs/applications/misc/pueue/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "pueue"; - version = "0.12.0"; + version = "0.12.1"; src = fetchFromGitHub { owner = "Nukesor"; repo = pname; rev = "v${version}"; - sha256 = "sha256-yOUVDq/wRY35ZQjQVwTLYHKukkKpoggN51wBDdZnhI4="; + sha256 = "sha256-wcOF34GzlB6YKISkjDgYgsaN1NmWBMIntfT23A6byx8="; }; - cargoSha256 = "sha256-56jJ8IjxWTBlaDd1CVit4RP659Mgw2j2wMWcSDYVihM="; + cargoSha256 = "sha256-7SJjtHNSabE/VqdiSwKZ/yNzk6GSMNsQLaSx/MjN5NA="; nativeBuildInputs = [ installShellFiles ]; From 22eb13d3ed169783c44b50bd89c68a47a9068922 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 13 Mar 2021 11:44:00 +0000 Subject: [PATCH 36/61] pueue: fix build on darwin Fixes #116175 --- pkgs/applications/misc/pueue/default.nix | 5 ++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/pueue/default.nix b/pkgs/applications/misc/pueue/default.nix index 4fe47a1c1600..cc1ae14350e4 100644 --- a/pkgs/applications/misc/pueue/default.nix +++ b/pkgs/applications/misc/pueue/default.nix @@ -1,4 +1,4 @@ -{ lib, rustPlatform, fetchFromGitHub, installShellFiles }: +{ stdenv, lib, rustPlatform, fetchFromGitHub, installShellFiles, SystemConfiguration, libiconv }: rustPlatform.buildRustPackage rec { pname = "pueue"; @@ -15,6 +15,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; + buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration libiconv ]; + checkFlags = [ "--skip=test_single_huge_payload" "--skip=test_create_unix_socket" ]; postInstall = '' @@ -27,6 +29,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "A daemon for managing long running shell commands"; homepage = "https://github.com/Nukesor/pueue"; + changelog = "https://github.com/Nukesor/pueue/raw/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = [ maintainers.marsam ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25d8bd207219..2c37eb1f6500 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2780,7 +2780,9 @@ in precice = callPackage ../development/libraries/precice { }; - pueue = callPackage ../applications/misc/pueue { }; + pueue = callPackage ../applications/misc/pueue { + inherit (darwin.apple_sdk.frameworks) SystemConfiguration; + }; pixiecore = callPackage ../tools/networking/pixiecore {}; From 52fa5e9612f61781ee0bf2efdf784f93c0fbb2e3 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Sat, 13 Mar 2021 13:02:37 +0100 Subject: [PATCH 37/61] prometheus-jitsi-exporter: reference vm test --- pkgs/servers/monitoring/prometheus/jitsi-exporter.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix b/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix index 60cdf32a598e..b68b1681919b 100644 --- a/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/jitsi-exporter.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchgit, ... }: +{ lib, buildGoModule, fetchgit, nixosTests }: buildGoModule rec { pname = "jitsiexporter"; @@ -12,6 +12,8 @@ buildGoModule rec { vendorSha256 = null; + passthru.tests = { inherit (nixosTests.prometheus-exporters) jitsi; }; + meta = with lib; { description = "Export Jitsi Videobridge metrics to Prometheus"; homepage = "https://git.xsfx.dev/prometheus/jitsiexporter"; From e4bc623eb3e49bf8ba02d01bf102e8b0762de454 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 12:27:50 +0000 Subject: [PATCH 38/61] resvg: 0.13.1 -> 0.14.0 --- pkgs/tools/graphics/resvg/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/graphics/resvg/default.nix b/pkgs/tools/graphics/resvg/default.nix index 8c8164a7e8ef..0fe47ff52561 100644 --- a/pkgs/tools/graphics/resvg/default.nix +++ b/pkgs/tools/graphics/resvg/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "resvg"; - version = "0.13.1"; + version = "0.14.0"; src = fetchFromGitHub { owner = "RazrFalcon"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Jo+dx4+3GpEwOoE8HH0YahBmPvT9Oy2qXMvCJ/NZhF0="; + sha256 = "sha256-fd97w6yd9ZX2k8Vq+Vh6jouufGdFE02ZV8mb+BtA3tk="; }; - cargoSha256 = "sha256-8Es9NZYsC/9PZ6ytWZTAH42U3vxZtJERPSsno1s4TEc="; + cargoSha256 = "sha256-LlEYfjUINQW/YrhNp/Z+fdLQPcvrTjNFtDAk1gyAuj0="; doCheck = false; From 751f46c0cdd03bcfff181e1918d3f3732dc4a403 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 13 Mar 2021 12:28:00 +0000 Subject: [PATCH 39/61] resvg: fix build on darwin --- pkgs/tools/graphics/resvg/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/resvg/default.nix b/pkgs/tools/graphics/resvg/default.nix index 0fe47ff52561..e0968dd6271e 100644 --- a/pkgs/tools/graphics/resvg/default.nix +++ b/pkgs/tools/graphics/resvg/default.nix @@ -1,4 +1,4 @@ -{ lib, rustPlatform, fetchFromGitHub }: +{ stdenv, lib, rustPlatform, fetchFromGitHub, libiconv }: rustPlatform.buildRustPackage rec { pname = "resvg"; @@ -13,11 +13,14 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-LlEYfjUINQW/YrhNp/Z+fdLQPcvrTjNFtDAk1gyAuj0="; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + doCheck = false; meta = with lib; { description = "An SVG rendering library"; homepage = "https://github.com/RazrFalcon/resvg"; + changelog = "https://github.com/RazrFalcon/resvg/raw/v${version}/CHANGELOG.md"; license = licenses.mpl20; maintainers = [ maintainers.marsam ]; }; From 96947c55f3a2ebaf55ad554b3b6743ff6a1b9093 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 12:39:53 +0000 Subject: [PATCH 40/61] rtsp-simple-server: 0.14.2 -> 0.15.0 --- pkgs/servers/rtsp-simple-server/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/rtsp-simple-server/default.nix b/pkgs/servers/rtsp-simple-server/default.nix index 1cb5e37cb947..cf96edfe9638 100644 --- a/pkgs/servers/rtsp-simple-server/default.nix +++ b/pkgs/servers/rtsp-simple-server/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "rtsp-simple-server"; - version = "0.14.2"; + version = "0.15.0"; src = fetchFromGitHub { owner = "aler9"; repo = pname; rev = "v${version}"; - sha256 = "sha256-pnMUUxV4DM2YClwc24l+5Ehh5zc+qEOLTtiqh7c+8PI="; + sha256 = "sha256-U0wZ0NrvCQjMLDDjO6Jf6uu5FlHar7Td2zhoU2+MMkM="; }; - vendorSha256 = "sha256-oWWUEPEpMLqXucQwUvM6fyGCwttTIV6ZcCM2VZXnKuM="; + vendorSha256 = "sha256-dfAuq4iw3NQ4xaabPv7MQ88CYXgivRBeyvbmJ3SSjbI="; # Tests need docker doCheck = false; From 24133ead28dc4ece7ba016bc8f7624db0478e977 Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 13 Mar 2021 13:56:17 +0100 Subject: [PATCH 41/61] nixos/mautrix-telegram: substitute secrets in config file at runtime (#112966) In the latest release of mautrix-telegram not all secrets can be set using environment variables (see https://github.com/tulir/mautrix-telegram/issues/584). This change allows these secret values to be set without ending up in the Nix store. --- .../services/misc/mautrix-telegram.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/misc/mautrix-telegram.nix b/nixos/modules/services/misc/mautrix-telegram.nix index caeb4b04164f..0ae5797fea04 100644 --- a/nixos/modules/services/misc/mautrix-telegram.nix +++ b/nixos/modules/services/misc/mautrix-telegram.nix @@ -6,8 +6,9 @@ let dataDir = "/var/lib/mautrix-telegram"; registrationFile = "${dataDir}/telegram-registration.yaml"; cfg = config.services.mautrix-telegram; - # TODO: switch to configGen.json once RFC42 is implemented - settingsFile = pkgs.writeText "mautrix-telegram-settings.json" (builtins.toJSON cfg.settings); + settingsFormat = pkgs.formats.json {}; + settingsFileUnsubstituted = settingsFormat.generate "mautrix-telegram-config-unsubstituted.json" cfg.settings; + settingsFile = "${dataDir}/config.json"; in { options = { @@ -15,9 +16,8 @@ in { enable = mkEnableOption "Mautrix-Telegram, a Matrix-Telegram hybrid puppeting/relaybot bridge"; settings = mkOption rec { - # TODO: switch to types.config.json as prescribed by RFC42 once it's implemented - type = types.attrs; apply = recursiveUpdate default; + inherit (settingsFormat) type; default = { appservice = rec { database = "sqlite:///${dataDir}/mautrix-telegram.db"; @@ -124,6 +124,16 @@ in { after = [ "network-online.target" ] ++ cfg.serviceDependencies; preStart = '' + # Not all secrets can be passed as environment variable (yet) + # https://github.com/tulir/mautrix-telegram/issues/584 + [ -f ${settingsFile} ] && rm -f ${settingsFile} + old_umask=$(umask) + umask 0277 + ${pkgs.envsubst}/bin/envsubst \ + -o ${settingsFile} \ + -i ${settingsFileUnsubstituted} + umask $old_umask + # generate the appservice's registration file if absent if [ ! -f '${registrationFile}' ]; then ${pkgs.mautrix-telegram}/bin/mautrix-telegram \ @@ -159,6 +169,8 @@ in { --config='${settingsFile}' ''; }; + + restartTriggers = [ settingsFileUnsubstituted ]; }; }; From 22b61e52634160847a19e63b65265219f9a806d6 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 13 Mar 2021 15:21:19 +0100 Subject: [PATCH 42/61] nixos/prometheus/exporters: fix eval if only `openFirewall = true;` is set If `openFirewall = true`, but no `firewallFilter` is set, the evaluation fails with the following error: The option `services.prometheus.exporters.node.firewallFilter` is defined both null and not null, in `/home/ma27/Projects/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters.nix' and `/home/ma27/Projects/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters.nix'. Originally introduced by me in #115185. The problem is that `mkOptionDefault` has - as its name suggests - the same priority as the default-value of the option `firewallFilter` and thus it conflicts if this declaration and the actual default value are set which is the case if `firewallFilter` isn't specified somewhere else. --- nixos/modules/services/monitoring/prometheus/exporters.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 74ad4bf1837f..5811cda11256 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -131,7 +131,7 @@ let inherit name port; } // extraOpts); } ({ config, ... }: mkIf config.openFirewall { - firewallFilter = mkOptionDefault "-p tcp -m tcp --dport ${toString config.port}"; + firewallFilter = mkDefault "-p tcp -m tcp --dport ${toString config.port}"; })]; internal = true; default = {}; From 00286f1b1bd5009b5b52772e53646111ad934a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 13 Mar 2021 15:23:23 +0100 Subject: [PATCH 43/61] libhandy: 1.0.3 -> 1.2.0 --- pkgs/development/libraries/libhandy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix index 43092f71c571..4532edfd884b 100644 --- a/pkgs/development/libraries/libhandy/default.nix +++ b/pkgs/development/libraries/libhandy/default.nix @@ -22,14 +22,14 @@ stdenv.mkDerivation rec { pname = "libhandy"; - version = "1.0.3"; + version = "1.2.0"; outputs = [ "out" "dev" "devdoc" "glade" ]; outputBin = "dev"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-VZuzrMLDYkiJF+ty7SW9wYH0riaslNF3Y0zF00yGf3o="; + sha256 = "sha256-OfWQriCRDnb+HAYHsuvliXUPRWENau7Fww4u5gKiCyU="; }; nativeBuildInputs = [ From 175663548cbec68251a6be77d7e6dbc5b9545eaf Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 9 Mar 2021 13:23:52 +0000 Subject: [PATCH 44/61] reiser4progs: 2.0.1 -> 2.0.4 --- pkgs/tools/filesystems/reiser4progs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/reiser4progs/default.nix b/pkgs/tools/filesystems/reiser4progs/default.nix index 46c0120f64c4..961a286729a8 100644 --- a/pkgs/tools/filesystems/reiser4progs/default.nix +++ b/pkgs/tools/filesystems/reiser4progs/default.nix @@ -1,13 +1,13 @@ {lib, stdenv, fetchurl, libaal}: -let version = "2.0.1"; in +let version = "2.0.4"; in stdenv.mkDerivation rec { pname = "reiser4progs"; inherit version; src = fetchurl { url = "mirror://sourceforge/reiser4/reiser4-utils/${pname}-${version}.tar.gz"; - sha256 = "1r7m95mnp6xmp1j5k99jhmz6g9y2qq7cghlmdxsfbr3xviqfs45d"; + sha256 = "sha256-WmIkISnRp5BngSfPEKY95HVEt5TBtPKu+RMBwlLsnuA="; }; buildInputs = [libaal]; From 6a4c7b35e86d7f0bc159590886e170fbdcf754b4 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 9 Mar 2021 12:52:07 +0000 Subject: [PATCH 45/61] rosegarden: 20.06 -> 20.12 --- pkgs/applications/audio/rosegarden/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/rosegarden/default.nix b/pkgs/applications/audio/rosegarden/default.nix index 5c7493ef7dba..b95e5fdc76d2 100644 --- a/pkgs/applications/audio/rosegarden/default.nix +++ b/pkgs/applications/audio/rosegarden/default.nix @@ -3,12 +3,12 @@ , liblo, libsamplerate, libsndfile, lirc ? null, lrdf, qtbase }: stdenv.mkDerivation (rec { - version = "20.06"; + version = "20.12"; pname = "rosegarden"; src = fetchurl { url = "mirror://sourceforge/rosegarden/${pname}-${version}.tar.bz2"; - sha256 = "1i9x9rkqwwdrk77xl5ra8i48cjirbc7fbisnj0nnclccwaq0wk6r"; + sha256 = "sha256-iGaEr8WFipV4I00fhFGI2xMBFPf784IIxNXs2hUTHFs="; }; patchPhase = '' From ac49f2ff8194717385f52fc54fc92035a407fe4e Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 8 Mar 2021 18:48:12 +0000 Subject: [PATCH 46/61] libisoburn: 1.5.2 -> 1.5.4 --- pkgs/development/libraries/libisoburn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libisoburn/default.nix b/pkgs/development/libraries/libisoburn/default.nix index 1e2ae41f3f22..44367aad1f93 100644 --- a/pkgs/development/libraries/libisoburn/default.nix +++ b/pkgs/development/libraries/libisoburn/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libisoburn"; - version = "1.5.2"; + version = "1.5.4"; src = fetchurl { url = "http://files.libburnia-project.org/releases/${pname}-${version}.tar.gz"; - sha256 = "1v4hanapr02wf2i6rncc62z8cyc18078nb2y6q4hp3hxa74hnwnc"; + sha256 = "sha256-LYmEbUOIDxf6WRxTs76kL/uANijk5jDGgPwskYT3kTI="; }; buildInputs = [ attr zlib libburn libisofs ]; From b417a8aca34cef137446aaf3dd3a633329fbbc77 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 3 Mar 2021 01:05:35 +0000 Subject: [PATCH 47/61] libofx: 0.10.0 -> 0.10.1 --- pkgs/development/libraries/libofx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libofx/default.nix b/pkgs/development/libraries/libofx/default.nix index f46a20394646..dc40086ad0a7 100644 --- a/pkgs/development/libraries/libofx/default.nix +++ b/pkgs/development/libraries/libofx/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "libofx"; - version = "0.10.0"; + version = "0.10.1"; src = fetchFromGitHub { owner = "LibOFX"; repo = pname; rev = version; - sha256 = "sha256-gdLh5ZUciN4FCJwTCaJSKJ5RjXgNDXnDOUWkyTZwf2c="; + sha256 = "sha256-QIasZKwSD9YCidHCxT/HOThxE5HEQWD0I2/loDP6mlU="; }; preConfigure = "./autogen.sh"; From 148b1387e1ba0e378a07c532be48dfcd46dbbd9f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 3 Mar 2021 00:51:09 +0000 Subject: [PATCH 48/61] libdigidocpp: 3.14.4 -> 3.14.5 --- pkgs/development/libraries/libdigidocpp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libdigidocpp/default.nix b/pkgs/development/libraries/libdigidocpp/default.nix index f7170fa7f103..5b2914c141f3 100644 --- a/pkgs/development/libraries/libdigidocpp/default.nix +++ b/pkgs/development/libraries/libdigidocpp/default.nix @@ -2,12 +2,12 @@ , xercesc, xml-security-c, pkg-config, xsd, zlib, xalanc, xxd }: stdenv.mkDerivation rec { - version = "3.14.4"; + version = "3.14.5"; pname = "libdigidocpp"; src = fetchurl { url = "https://github.com/open-eid/libdigidocpp/releases/download/v${version}/libdigidocpp-${version}.tar.gz"; - sha256 = "1x72icq5lp5cfv6kyxqc3863wa164s0g41nbi6gldr8syprzdk1l"; + sha256 = "sha256-PSrYoz5ID88pYs/4rP2kz0NpI0pK6wcnx62HokE0g20="; }; nativeBuildInputs = [ cmake pkg-config xxd ]; From 1de17296c6bfb17b74155eb914b34484b57d98d8 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 3 Mar 2021 01:27:42 +0000 Subject: [PATCH 49/61] lightdm-mini-greeter: 0.5.0 -> 0.5.1 --- .../display-managers/lightdm-mini-greeter/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix b/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix index 0005fdb6339f..72f386798709 100644 --- a/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix +++ b/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "lightdm-mini-greeter"; - version = "0.5.0"; + version = "0.5.1"; src = fetchFromGitHub { owner = "prikhi"; repo = "lightdm-mini-greeter"; rev = version; - sha256 = "sha256-cVOnd3k+9hFQjROiwPpxZcCxD2NiH1eclJHF88eV6BM="; + sha256 = "sha256-Pm7ExfusFIPktX2C4UE07qgOVhcWhVxnaD3QARpmu7Y="; }; nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ]; From 99286f264050fd2697b253eb1f3a90b0b1d8ecb9 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 26 Feb 2021 16:47:01 +0000 Subject: [PATCH 50/61] liblinear: 2.42 -> 2.43 --- pkgs/development/libraries/liblinear/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/liblinear/default.nix b/pkgs/development/libraries/liblinear/default.nix index caf036960139..aa2dcd648b81 100644 --- a/pkgs/development/libraries/liblinear/default.nix +++ b/pkgs/development/libraries/liblinear/default.nix @@ -4,13 +4,13 @@ let soVersion = "4"; in stdenv.mkDerivation rec { pname = "liblinear"; - version = "2.42"; + version = "2.43"; src = fetchFromGitHub { owner = "cjlin1"; repo = "liblinear"; rev = "v${builtins.replaceStrings ["."] [""] version}"; - sha256 = "0p0hpjajfkskhd7jiv5zwhfa8hi49q3mgifjlkqvy99xspv98ijj"; + sha256 = "sha256-qcSMuWHJgsapWs1xgxv3fKSXcx18q8cwyIn3E4RCGKA="; }; postPatch = '' From 805e9c5f691629bfe19e52350ffc6f18ce200131 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 23 Feb 2021 23:24:59 +0000 Subject: [PATCH 51/61] ibus-engines.anthy: 1.5.11 -> 1.5.12 --- pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix index 60b5d6778b44..d04de7bafebc 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix @@ -13,11 +13,11 @@ stdenv.mkDerivation rec { pname = "ibus-anthy"; - version = "1.5.11"; + version = "1.5.12"; src = fetchurl { url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${pname}-${version}.tar.gz"; - sha256 = "1zwgswpibh67sgbza8kvg03v06maxc08ihkgm5hmh333sjq9d5c0"; + sha256 = "sha256-6edY3dRq4pI3bqsXEYf6jyBjDwpXzRKKQSCP3N/fV7s="; }; buildInputs = [ From 305267aacb0c2b0e2345cb87dff689e7d8aa300b Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 18 Feb 2021 01:11:49 +0000 Subject: [PATCH 52/61] python37Packages.convertdate: 2.3.0 -> 2.3.1 --- pkgs/development/python-modules/convertdate/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/convertdate/default.nix b/pkgs/development/python-modules/convertdate/default.nix index 0dee95541b08..5c232f66ace0 100644 --- a/pkgs/development/python-modules/convertdate/default.nix +++ b/pkgs/development/python-modules/convertdate/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "convertdate"; - version = "2.3.0"; + version = "2.3.1"; disabled = isPy27; @@ -17,8 +17,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "fitnr"; repo = pname; - rev = "v${version}"; - sha256 = "17j188zlp46zmq8qyy4z4f9v25l3zibkwzj8wp4fxqgimjnfj2nr"; + rev = version; + sha256 = "1g8sgd3xc9viy0kb1i4xp6bdn1hzwhrnk8kmismla88scivrhq32"; }; propagatedBuildInputs = [ From ddd71dd0c9a6d87f947050b35f2361c799d24b83 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 17 Feb 2021 00:11:22 +0000 Subject: [PATCH 53/61] ibus-engines.table: 1.12.3 -> 1.12.4 --- pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix index 00a499fb104b..ac29545db3b0 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "ibus-table"; - version = "1.12.3"; + version = "1.12.4"; src = fetchFromGitHub { owner = "kaio"; repo = "ibus-table"; rev = version; - sha256 = "sha256-iVbct7p+i8ifSQzOFUUnJU0RHX36cFiTlv7p79iawj8="; + sha256 = "sha256-2qST5k2+8gfSf1/FaxXW4qwSQgNw/QKM+1mMWDdrjCU="; }; postPatch = '' From 2edf46ca6a0cfc7277ef4109d2dcd3df824ae96f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 13 Mar 2021 15:40:14 +0100 Subject: [PATCH 54/61] pypy3.pkgs.cryptography: fix build setuptools-rust was accidentally added to the wrong list. --- pkgs/development/python-modules/cryptography/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 1038431d31c7..32624e54c400 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -42,6 +42,7 @@ buildPythonPackage rec { nativeBuildInputs = lib.optionals (!isPyPy) [ cffi + ] ++ [ rustPlatform.cargoSetupHook setuptools-rust ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]); From 8eb024773c61bbee28a019e035bddec710e645b7 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 15:09:12 +0000 Subject: [PATCH 55/61] teler: 1.0.3 -> 1.1.0 --- pkgs/tools/security/teler/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/teler/default.nix b/pkgs/tools/security/teler/default.nix index e2a895f0747a..f44b7abf5230 100644 --- a/pkgs/tools/security/teler/default.nix +++ b/pkgs/tools/security/teler/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "teler"; - version = "1.0.3"; + version = "1.1.0"; src = fetchFromGitHub { owner = "kitabisa"; repo = "teler"; rev = "v${version}"; - sha256 = "sha256-6OeGlpimQtw4w26HRzw2wmd3wjASY199p8XXPD/JMy8="; + sha256 = "sha256-0tx/oyHl6s1mj7NyWMZGCJoSuOeB+BMlBrnGY4IN/i4="; }; - vendorSha256 = "sha256-L+wjurURpesCA2IK0r1sxvOUvNJT1wiRp75kpe6LH5s="; + vendorSha256 = "sha256-KvUnDInUqFW7FypgsppIBQZKNu6HVsEeHtGwdqYtoys="; # test require internet access doCheck = false; From dae8503172f9376e175284facee24cf3d2fe6b41 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 15:15:05 +0000 Subject: [PATCH 56/61] terraform-ls: 0.14.0 -> 0.15.0 --- pkgs/development/tools/misc/terraform-ls/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/terraform-ls/default.nix b/pkgs/development/tools/misc/terraform-ls/default.nix index eb823904eed2..54adb5f8296f 100644 --- a/pkgs/development/tools/misc/terraform-ls/default.nix +++ b/pkgs/development/tools/misc/terraform-ls/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "terraform-ls"; - version = "0.14.0"; + version = "0.15.0"; src = fetchFromGitHub { owner = "hashicorp"; repo = pname; rev = "v${version}"; - sha256 = "sha256-p9q+cSnMN6Na+XZoYSHfE4SCNYOEavXE+eWIaxcD73k="; + sha256 = "sha256-/g62LSlaIK67oY6dI8S3Lni85eBBI6piqP2Fsq3HXWQ="; }; - vendorSha256 = "sha256-XOIs5Ng0FYz7OfwbrNiVN3GTIABqxlO8ITKGfnC+kWo="; + vendorSha256 = "sha256-U0jVdyY4SifPWkOkq3ohY/LvfGcYm4rI+tW1QEm39oo="; # tests fail in sandbox mode because of trying to download stuff from releases.hashicorp.com doCheck = false; From e38bea23358bd4082b56bec648b578810e6763ac Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 15:19:17 +0000 Subject: [PATCH 57/61] terragrunt: 0.28.9 -> 0.28.11 --- pkgs/applications/networking/cluster/terragrunt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terragrunt/default.nix b/pkgs/applications/networking/cluster/terragrunt/default.nix index 619108959279..6cb13a01eeec 100644 --- a/pkgs/applications/networking/cluster/terragrunt/default.nix +++ b/pkgs/applications/networking/cluster/terragrunt/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "terragrunt"; - version = "0.28.9"; + version = "0.28.11"; src = fetchFromGitHub { owner = "gruntwork-io"; repo = pname; rev = "v${version}"; - sha256 = "sha256-sqwR+bXx5ab5OsmW44C5MIXjzQFM1QsBvsM0R3pL3H8="; + sha256 = "sha256-qlmiQ73MRXcdXXC50pewUMt9YFbzXIbjnZTV5gIcvGs="; }; - vendorSha256 = "sha256-9DBCP/4mp/Gr2ie0nk7WGfL+M7snMEztdHZzxdIFbzM="; + vendorSha256 = "sha256-SVrDBDGK809O+RaE3gOa9U1agY6hSGI/k3FUCgm+5PA="; doCheck = false; From eb1a98b142d20e13d502f23e5d5b71b920f4c750 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 15:23:43 +0000 Subject: [PATCH 58/61] terrascan: 1.3.3 -> 1.4.0 --- pkgs/tools/security/terrascan/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/terrascan/default.nix b/pkgs/tools/security/terrascan/default.nix index ab4a7197647d..0d7c3d2863cf 100644 --- a/pkgs/tools/security/terrascan/default.nix +++ b/pkgs/tools/security/terrascan/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "terrascan"; - version = "1.3.3"; + version = "1.4.0"; src = fetchFromGitHub { owner = "accurics"; repo = pname; rev = "v${version}"; - sha256 = "sha256-mPd4HsWbPUNJTUNjQ5zQztoXZy2b9iLksdGKAjp0A58="; + sha256 = "sha256-YUrvdleH332fWDgq8AwUdXkFC7m9ap+OVuQhKlxZfII="; }; - vendorSha256 = "sha256-eNQTJHqOCOTAPO+vil6rkV9bNWZIdXxGQPE4IpETFtA="; + vendorSha256 = "sha256-CzJ83MsBetrzbBT+fmz8F8MjdrManJAd4xpykh/2938="; # tests want to download a vulnerable Terraform project doCheck = false; From c02bf9722717d8f140caa7dc7e3b907bf3e4e39a Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 13 Mar 2021 15:29:46 +0000 Subject: [PATCH 59/61] tfsec: 0.39.5 -> 0.39.6 --- pkgs/development/tools/analysis/tfsec/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/tfsec/default.nix b/pkgs/development/tools/analysis/tfsec/default.nix index f5450be16b05..09a77d0f9355 100644 --- a/pkgs/development/tools/analysis/tfsec/default.nix +++ b/pkgs/development/tools/analysis/tfsec/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { pname = "tfsec"; - version = "0.39.5"; + version = "0.39.6"; src = fetchFromGitHub { owner = "tfsec"; repo = pname; rev = "v${version}"; - sha256 = "sha256-RDvwZyltPD21CQwZISOrLPVgQeRmPQc6/yssptS4XMw="; + sha256 = "sha256-2P+/y3iP/eMGGc0W1lHWWxO+uMy5gvlvjKzZ/8maJ9o="; }; goPackagePath = "github.com/tfsec/tfsec"; From 650ee258fde069a1ac3544cdce89029e9f91d5c5 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 13 Mar 2021 13:50:15 +0200 Subject: [PATCH 60/61] gnuradio3_{7,8}: Use external volk Now that volk is packaged, we can use our build and save some closure space for those that have more then 1 version of gnuradio installed. Also, simplify a bit how attributes are inherited in the expression. --- pkgs/applications/radio/gnuradio/3.7.nix | 49 ++++++------------- pkgs/applications/radio/gnuradio/default.nix | 44 ++++------------- pkgs/applications/radio/gnuradio/shared.nix | 3 -- .../gnuradio-modules/mkDerivation.nix | 6 ++- pkgs/top-level/all-packages.nix | 7 +++ pkgs/top-level/gnuradio-packages.nix | 3 +- 6 files changed, 38 insertions(+), 74 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/3.7.nix b/pkgs/applications/radio/gnuradio/3.7.nix index 7ad2d2979824..50993dd6f8ef 100644 --- a/pkgs/applications/radio/gnuradio/3.7.nix +++ b/pkgs/applications/radio/gnuradio/3.7.nix @@ -5,6 +5,7 @@ # Remove gcc and python references , removeReferencesTo , pkg-config +, volk , cppunit , swig , orc @@ -43,11 +44,12 @@ minor = "14"; patch = "0"; } -, fetchSubmodules ? true +# We use our build of volk and not the one bundled with the release +, fetchSubmodules ? false }: let - sourceSha256 = "1nh4f9dmygprlbqybd3j1byg9fsr6065n140mvc4b0v8qqygmhrc"; + sourceSha256 = "BiUDibXV/5cEYmAAaIxT4WTxF/ni4MJumF5oJ/vuOyc="; featuresInfo = { # Needed always basic = { @@ -61,6 +63,9 @@ let }; volk = { cmakeEnableFlag = "VOLK"; + runtime = [ + volk + ]; }; doxygen = { native = [ doxygen ]; @@ -213,10 +218,14 @@ let qt = qt4; gtk = gtk2; }); + inherit (shared) hasFeature; # function +in + +stdenv.mkDerivation rec { + inherit pname; inherit (shared) version src - hasFeature # function nativeBuildInputs buildInputs disallowedReferences @@ -228,7 +237,7 @@ let passthru = shared.passthru // { # Deps that are potentially overriden and are used inside GR plugins - the same version must - inherit boost; + inherit boost volk; } // lib.optionalAttrs (hasFeature "gr-uhd" features) { inherit uhd; }; @@ -242,6 +251,9 @@ let "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" "-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm" ] + ++ lib.optionals (hasFeature "volk" features && volk != null) [ + "-DENABLE_INTERNAL_VOLK=OFF" + ] ; stripDebugList = shared.stripDebugList # gr-fcd feature was dropped in 3.8 @@ -256,15 +268,6 @@ let + lib.optionalString (hasFeature "gnuradio-companion" features) '' sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt '' - # If python-support is disabled, don't install volk's (git submodule) - # volk_modtool - it references python. - # - # NOTE: The same is done for 3.8, but we don't put this string in - # ./shared.nix since on the next release of 3.8 it won't be needed there, - # but it will be needed for 3.7, probably for ever. - + lib.optionalString (!hasFeature "python-support" features) '' - sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt - '' ; patches = [ # Don't install python referencing files if python support is disabled. @@ -278,24 +281,4 @@ let sha256 = "2Pitgu8accs16B5X5+/q51hr+IY9DMsA15f56gAtBs8="; }) ]; -in - -stdenv.mkDerivation rec { - inherit - pname - version - src - nativeBuildInputs - buildInputs - cmakeFlags - preConfigure - # disallowedReferences - stripDebugList - patches - postInstall - passthru - doCheck - dontWrapPythonPrograms - meta - ; } diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 4ba1782bfabb..304fccf91d0e 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -214,6 +214,11 @@ let qt = qt5; gtk = gtk3; }); + inherit (shared) hasFeature; # function +in + +stdenv.mkDerivation rec { + inherit pname; inherit (shared) version src @@ -229,7 +234,7 @@ let ; passthru = shared.passthru // { # Deps that are potentially overriden and are used inside GR plugins - the same version must - inherit boost; + inherit boost volk; } // lib.optionalAttrs (hasFeature "gr-uhd" features) { inherit uhd; } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { @@ -246,6 +251,9 @@ let "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" ] + ++ lib.optionals (hasFeature "volk" features && volk != null) [ + "-DENABLE_INTERNAL_VOLK=OFF" + ] ; postInstall = shared.postInstall @@ -255,19 +263,6 @@ let ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake '' ; - preConfigure = "" - # If python-support is disabled, don't install volk's (git submodule) - # volk_modtool - it references python. - # - # NOTE: on the next release, volk will always be required to be installed - # externally (submodule removed upstream). Hence this hook will fail and - # we'll need to package volk while able to tell it to install or not - # install python referencing files. When we'll be there, this will help: - # https://github.com/gnuradio/volk/pull/404 - + lib.optionalString (!hasFeature "python-support" features) '' - sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt - '' - ; patches = [ # Don't install python referencing files if python support is disabled. # See: https://github.com/gnuradio/gnuradio/pull/3839 @@ -287,25 +282,4 @@ let sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v"; }) ]; -in - -stdenv.mkDerivation rec { - inherit - pname - version - src - nativeBuildInputs - buildInputs - cmakeFlags - preConfigure - # disallowedReferences - stripDebugList - patches - postInstall - passthru - doCheck - dontWrapPythonPrograms - dontWrapQtApps - meta - ; } diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index 271819e60724..f8ea2f0b1601 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -85,9 +85,6 @@ rec { ; postInstall = "" # Gcc references - + lib.optionalString (hasFeature "volk" features) '' - ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so) - '' + lib.optionalString (hasFeature "gnuradio-runtime" features) '' ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so) '' diff --git a/pkgs/development/gnuradio-modules/mkDerivation.nix b/pkgs/development/gnuradio-modules/mkDerivation.nix index 235eff25cdbd..014968f82cc6 100644 --- a/pkgs/development/gnuradio-modules/mkDerivation.nix +++ b/pkgs/development/gnuradio-modules/mkDerivation.nix @@ -17,7 +17,9 @@ let args_ = { enableParallelBuilding = args.enableParallelBuilding or true; nativeBuildInputs = (args.nativeBuildInputs or []); - # We add gnuradio itself by default - buildInputs = (args.buildInputs or []) ++ [ unwrapped ]; + # We add gnuradio and volk itself by default - most gnuradio based packages + # will not consider it a depenency worth mentioning and it will almost + # always be needed + buildInputs = (args.buildInputs or []) ++ [ unwrapped unwrapped.volk ]; }; in mkDerivation (args // args_) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23bbaccd54d3..fd680c47af1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22342,6 +22342,10 @@ in gnuradioMinimal = gnuradio.override { wrap = false; unwrapped = gnuradio.unwrapped.override { + volk = volk.override { + # So it will not reference python + enableModTool = false; + }; features = { gnuradio-companion = false; python-support = false; @@ -22368,6 +22372,9 @@ in gnuradio3_7Minimal = gnuradio3_7.override { wrap = false; unwrapped = gnuradio3_7.unwrapped.override { + volk = volk.override { + enableModTool = false; + }; features = { gnuradio-companion = false; python-support = false; diff --git a/pkgs/top-level/gnuradio-packages.nix b/pkgs/top-level/gnuradio-packages.nix index 6c8db76cb3e0..e5c2c8be3131 100644 --- a/pkgs/top-level/gnuradio-packages.nix +++ b/pkgs/top-level/gnuradio-packages.nix @@ -16,9 +16,10 @@ let callPackage = self.newScope { inherit (gnuradio) - # Packages that are potentially overriden and commonly + # Packages that are potentially overriden and used as deps here. boost uhd + volk ; inherit mkDerivationWith mkDerivation; }; From fb024f50e5557e42b4bb8249d0298c244ff8082d Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 15 Feb 2021 22:14:54 +0200 Subject: [PATCH 61/61] gnuradio: 3.8 -> 3.9 Add some "3.9" attributes to srcs in gnuradio packages And update packages using GR3.8 and that are incompatible yet with GR3.9 to use GR3.8 explicitly. --- pkgs/applications/radio/gnss-sdr/default.nix | 16 +- pkgs/applications/radio/gnuradio/3.8.nix | 284 ++++++++++++++++++ pkgs/applications/radio/gnuradio/default.nix | 104 +++---- pkgs/applications/radio/gqrx/default.nix | 8 +- .../applications/radio/inspectrum/default.nix | 4 +- .../applications/radio/qradiolink/default.nix | 18 +- .../gnuradio-modules/limesdr/default.nix | 2 + .../gnuradio-modules/osmosdr/default.nix | 2 + .../gnuradio-modules/rds/default.nix | 2 + pkgs/top-level/all-packages.nix | 29 ++ 10 files changed, 384 insertions(+), 85 deletions(-) create mode 100644 pkgs/applications/radio/gnuradio/3.8.nix diff --git a/pkgs/applications/radio/gnss-sdr/default.nix b/pkgs/applications/radio/gnss-sdr/default.nix index 13636cf4415d..467576018677 100644 --- a/pkgs/applications/radio/gnss-sdr/default.nix +++ b/pkgs/applications/radio/gnss-sdr/default.nix @@ -7,7 +7,7 @@ , gmock , openssl , gflags -, gnuradio +, gnuradio3_8 , libpcap , orc , pkg-config @@ -19,7 +19,7 @@ , protobuf }: -gnuradio.pkgs.mkDerivation rec { +gnuradio3_8.pkgs.mkDerivation rec { pname = "gnss-sdr"; version = "0.0.13"; @@ -32,15 +32,15 @@ gnuradio.pkgs.mkDerivation rec { nativeBuildInputs = [ cmake - gnuradio.unwrapped.python - gnuradio.unwrapped.python.pkgs.Mako - gnuradio.unwrapped.python.pkgs.six + gnuradio3_8.unwrapped.python + gnuradio3_8.unwrapped.python.pkgs.Mako + gnuradio3_8.unwrapped.python.pkgs.six ]; buildInputs = [ gmp armadillo - gnuradio.unwrapped.boost + gnuradio3_8.unwrapped.boost glog gmock openssl @@ -48,13 +48,13 @@ gnuradio.pkgs.mkDerivation rec { orc # UHD support is optional, but gnuradio is built with it, so there's # nothing to be gained by leaving it out. - gnuradio.unwrapped.uhd + gnuradio3_8.unwrapped.uhd log4cpp blas lapack matio pugixml protobuf - gnuradio.pkgs.osmosdr + gnuradio3_8.pkgs.osmosdr libpcap ]; diff --git a/pkgs/applications/radio/gnuradio/3.8.nix b/pkgs/applications/radio/gnuradio/3.8.nix new file mode 100644 index 000000000000..799b429800da --- /dev/null +++ b/pkgs/applications/radio/gnuradio/3.8.nix @@ -0,0 +1,284 @@ +{ lib, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +# Remove gcc and python references +, removeReferencesTo +, pkg-config +, volk +, cppunit +, swig +, orc +, boost +, log4cpp +, mpir +, doxygen +, python +, codec2 +, gsm +, fftwFloat +, alsaLib +, libjack2 +, CoreAudio +, uhd +, SDL +, gsl +, cppzmq +, zeromq +# Needed only if qt-gui is disabled, from some reason +, icu +# GUI related +, gtk3 +, pango +, gobject-introspection +, cairo +, qt5 +, libsForQt5 +# Features available to override, the list of them is in featuresInfo. They +# are all turned on by default. +, features ? {} +# If one wishes to use a different src or name for a very custom build +, overrideSrc ? {} +, pname ? "gnuradio" +, versionAttr ? { + major = "3.8"; + minor = "2"; + patch = "0"; +} +# We use our build of volk and not the one bundled with the release +, fetchSubmodules ? false +}: + +let + sourceSha256 = "SFDjtyQRp0fXijZukpLYtISpx8imxedlYN9mRibv1eA="; + featuresInfo = { + # Needed always + basic = { + native = [ + cmake + pkg-config + orc + ]; + runtime = [ + boost + log4cpp + mpir + ] + # when gr-qtgui is disabled, icu needs to be included, otherwise + # building with boost 1.7x fails + ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; + pythonNative = with python.pkgs; [ + Mako + six + ]; + }; + volk = { + cmakeEnableFlag = "VOLK"; + runtime = [ + volk + ]; + }; + doxygen = { + native = [ doxygen ]; + cmakeEnableFlag = "DOXYGEN"; + }; + sphinx = { + pythonNative = with python.pkgs; [ sphinx ]; + cmakeEnableFlag = "SPHINX"; + }; + python-support = { + pythonRuntime = [ python.pkgs.six ]; + native = [ + swig + python + ]; + cmakeEnableFlag = "PYTHON"; + }; + testing-support = { + native = [ cppunit ]; + cmakeEnableFlag = "TESTING"; + }; + gnuradio-runtime = { + cmakeEnableFlag = "GNURADIO_RUNTIME"; + }; + gr-ctrlport = { + # Thrift support is not really working well, and even the patch they + # recommend applying on 0.9.2 won't apply. See: + # https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README + cmakeEnableFlag = "GR_CTRLPORT"; + native = [ + swig + ]; + }; + gnuradio-companion = { + pythonRuntime = with python.pkgs; [ + pyyaml + Mako + numpy + pygobject3 + ]; + runtime = [ + gtk3 + pango + gobject-introspection + cairo + ]; + cmakeEnableFlag = "GRC"; + }; + gr-blocks = { + cmakeEnableFlag = "GR_BLOCKS"; + }; + gr-fec = { + cmakeEnableFlag = "GR_FEC"; + }; + gr-fft = { + runtime = [ fftwFloat ]; + cmakeEnableFlag = "GR_FFT"; + }; + gr-filter = { + runtime = [ fftwFloat ]; + cmakeEnableFlag = "GR_FILTER"; + }; + gr-analog = { + cmakeEnableFlag = "GR_ANALOG"; + }; + gr-digital = { + cmakeEnableFlag = "GR_DIGITAL"; + }; + gr-dtv = { + cmakeEnableFlag = "GR_DTV"; + }; + gr-audio = { + runtime = [] + ++ lib.optionals stdenv.isLinux [ alsaLib libjack2 ] + ++ lib.optionals stdenv.isDarwin [ CoreAudio ] + ; + cmakeEnableFlag = "GR_AUDIO"; + }; + gr-channels = { + cmakeEnableFlag = "GR_CHANNELS"; + }; + gr-qtgui = { + runtime = [ qt5.qtbase libsForQt5.qwt ]; + pythonRuntime = [ python.pkgs.pyqt5 ]; + cmakeEnableFlag = "GR_QTGUI"; + }; + gr-trellis = { + cmakeEnableFlag = "GR_TRELLIS"; + }; + gr-uhd = { + runtime = [ uhd ]; + cmakeEnableFlag = "GR_UHD"; + }; + gr-utils = { + cmakeEnableFlag = "GR_UTILS"; + }; + gr-modtool = { + pythonRuntime = with python.pkgs; [ + click + click-plugins + ]; + cmakeEnableFlag = "GR_MODTOOL"; + }; + gr-video-sdl = { + runtime = [ SDL ]; + cmakeEnableFlag = "GR_VIDEO_SDL"; + }; + gr-vocoder = { + runtime = [ codec2 gsm ]; + cmakeEnableFlag = "GR_VOCODER"; + }; + gr-wavelet = { + cmakeEnableFlag = "GR_WAVELET"; + runtime = [ gsl ]; + }; + gr-zeromq = { + runtime = [ cppzmq zeromq ]; + cmakeEnableFlag = "GR_ZEROMQ"; + }; + }; + shared = (import ./shared.nix { + inherit + stdenv + lib + python + removeReferencesTo + featuresInfo + features + versionAttr + sourceSha256 + overrideSrc + fetchFromGitHub + fetchSubmodules + ; + qt = qt5; + gtk = gtk3; + }); + inherit (shared) hasFeature; # function +in + +stdenv.mkDerivation rec { + inherit pname; + inherit (shared) + version + src + nativeBuildInputs + buildInputs + disallowedReferences + stripDebugList + doCheck + dontWrapPythonPrograms + dontWrapQtApps + meta + ; + passthru = shared.passthru // { + # Deps that are potentially overriden and are used inside GR plugins - the same version must + inherit boost volk; + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { + inherit uhd; + } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { + inherit (libsForQt5) qwt; + }; + cmakeFlags = shared.cmakeFlags + # From some reason, if these are not set, libcodec2 and gsm are not + # detected properly. NOTE: qradiolink needs libcodec2 to be detected in + # order to build, see https://github.com/qradiolink/qradiolink/issues/67 + ++ lib.optionals (hasFeature "gr-vocoder" features) [ + "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" + "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include" + "-DLIBCODEC2_HAS_FREEDV_API=ON" + "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" + "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" + ] + ++ lib.optionals (hasFeature "volk" features && volk != null) [ + "-DENABLE_INTERNAL_VOLK=OFF" + ] + ; + + postInstall = shared.postInstall + # This is the only python reference worth removing, if needed (3.7 doesn't + # set that reference). + + lib.optionalString (!hasFeature "python-support" features) '' + ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake + '' + ; + patches = [ + # Don't install python referencing files if python support is disabled. + # See: https://github.com/gnuradio/gnuradio/pull/3839 + (fetchpatch { + url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff"; + sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q="; + }) + (fetchpatch { + url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff"; + sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4="; + }) + # Needed to use boost 1.7x, see: + # https://github.com/gnuradio/gnuradio/issues/3720 + # https://github.com/gnuradio/gnuradio/pull/3967 + (fetchpatch { + url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff"; + sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v"; + }) + ]; +} diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 304fccf91d0e..bcb2560144a9 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -5,8 +5,8 @@ # Remove gcc and python references , removeReferencesTo , pkg-config +, volk , cppunit -, swig , orc , boost , log4cpp @@ -22,6 +22,9 @@ , uhd , SDL , gsl +, libsodium +, libsndfile +, libunwind , cppzmq , zeromq # Needed only if qt-gui is disabled, from some reason @@ -40,16 +43,15 @@ , overrideSrc ? {} , pname ? "gnuradio" , versionAttr ? { - major = "3.8"; - minor = "2"; + major = "3.9"; + minor = "0"; patch = "0"; } -# Should be false on the release after 3.8.2.0 -, fetchSubmodules ? true +, fetchSubmodules ? false }: let - sourceSha256 = "1mnfwdy7w3160vi6110x2qkyq8l78qi8771zwak9n72bl7lhhpnf"; + sourceSha256 = "ZjQzioAuWrd8jsYOnLNH1mK4n9EbrjgvPX3mTzVFdLk="; featuresInfo = { # Needed always basic = { @@ -59,6 +61,7 @@ let orc ]; runtime = [ + volk boost log4cpp mpir @@ -71,23 +74,13 @@ let six ]; }; - # NOTE: Should be removed on the release after 3.8.2.0, see: - # https://github.com/gnuradio/gnuradio/commit/80c04479d - volk = { - cmakeEnableFlag = "VOLK"; - }; doxygen = { native = [ doxygen ]; cmakeEnableFlag = "DOXYGEN"; }; - sphinx = { - pythonNative = with python.pkgs; [ sphinx ]; - cmakeEnableFlag = "SPHINX"; - }; python-support = { pythonRuntime = [ python.pkgs.six ]; native = [ - swig python ]; cmakeEnableFlag = "PYTHON"; @@ -96,17 +89,23 @@ let native = [ cppunit ]; cmakeEnableFlag = "TESTING"; }; + post-install = { + cmakeEnableFlag = "POSTINSTALL"; + }; gnuradio-runtime = { cmakeEnableFlag = "GNURADIO_RUNTIME"; + pythonRuntime = [ + python.pkgs.pybind11 + ]; }; gr-ctrlport = { # Thrift support is not really working well, and even the patch they # recommend applying on 0.9.2 won't apply. See: - # https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README - cmakeEnableFlag = "GR_CTRLPORT"; - native = [ - swig + # https://github.com/gnuradio/gnuradio/blob/v3.9.0.0/gnuradio-runtime/lib/controlport/thrift/README + runtime = [ + libunwind ]; + cmakeEnableFlag = "GR_CTRLPORT"; }; gnuradio-companion = { pythonRuntime = with python.pkgs; [ @@ -115,11 +114,15 @@ let numpy pygobject3 ]; + native = [ + python.pkgs.pytest + ]; runtime = [ gtk3 pango gobject-introspection cairo + libsndfile ]; cmakeEnableFlag = "GRC"; }; @@ -180,22 +183,29 @@ let ]; cmakeEnableFlag = "GR_MODTOOL"; }; + gr-blocktool = { + cmakeEnableFlag = "GR_BLOCKTOOL"; + }; gr-video-sdl = { runtime = [ SDL ]; cmakeEnableFlag = "GR_VIDEO_SDL"; }; - gr-vocoder = { - runtime = [ codec2 gsm ]; - cmakeEnableFlag = "GR_VOCODER"; - }; + # codec2 and gsm support is broken with gr3.9: https://github.com/gnuradio/gnuradio/issues/4278 + # gr-vocoder = { + # runtime = [ codec2 gsm ]; + # cmakeEnableFlag = "GR_VOCODER"; + # }; gr-wavelet = { cmakeEnableFlag = "GR_WAVELET"; - runtime = [ gsl ]; + runtime = [ gsl libsodium ]; }; gr-zeromq = { runtime = [ cppzmq zeromq ]; cmakeEnableFlag = "GR_ZEROMQ"; }; + gr-network = { + cmakeEnableFlag = "GR_NETWORK"; + }; }; shared = (import ./shared.nix { inherit @@ -222,9 +232,9 @@ stdenv.mkDerivation rec { inherit (shared) version src - hasFeature # function nativeBuildInputs buildInputs + cmakeFlags disallowedReferences stripDebugList doCheck @@ -240,46 +250,16 @@ stdenv.mkDerivation rec { } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { inherit (libsForQt5) qwt; }; - cmakeFlags = shared.cmakeFlags - # From some reason, if these are not set, libcodec2 and gsm are not - # detected properly. NOTE: qradiolink needs libcodec2 to be detected in - # order to build, see https://github.com/qradiolink/qradiolink/issues/67 - ++ lib.optionals (hasFeature "gr-vocoder" features) [ - "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" - "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include" - "-DLIBCODEC2_HAS_FREEDV_API=ON" - "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" - "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" - ] - ++ lib.optionals (hasFeature "volk" features && volk != null) [ - "-DENABLE_INTERNAL_VOLK=OFF" - ] - ; postInstall = shared.postInstall - # This is the only python reference worth removing, if needed (3.7 doesn't - # set that reference). + # This is the only python reference worth removing, if needed. + # Even if python support is enabled, and we don't care about this + # reference, pybind's path is not properly set. See: + # https://github.com/gnuradio/gnuradio/issues/4380 + lib.optionalString (!hasFeature "python-support" features) '' ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake + ${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so) + ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake '' ; - patches = [ - # Don't install python referencing files if python support is disabled. - # See: https://github.com/gnuradio/gnuradio/pull/3839 - (fetchpatch { - url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff"; - sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q="; - }) - (fetchpatch { - url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff"; - sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4="; - }) - # Needed to use boost 1.7x, see: - # https://github.com/gnuradio/gnuradio/issues/3720 - # https://github.com/gnuradio/gnuradio/pull/3967 - (fetchpatch { - url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff"; - sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v"; - }) - ]; } diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix index 9514ce2e936b..cccdff1f3cc8 100644 --- a/pkgs/applications/radio/gqrx/default.nix +++ b/pkgs/applications/radio/gqrx/default.nix @@ -3,7 +3,7 @@ , cmake , pkg-config , qt5 -, gnuradioMinimal +, gnuradio3_8Minimal , log4cpp , mpir , fftwFloat @@ -17,7 +17,7 @@ assert pulseaudioSupport -> libpulseaudio != null; -gnuradioMinimal.pkgs.mkDerivation rec { +gnuradio3_8Minimal.pkgs.mkDerivation rec { pname = "gqrx"; version = "2.14.4"; @@ -39,10 +39,10 @@ gnuradioMinimal.pkgs.mkDerivation rec { fftwFloat alsaLib libjack2 - gnuradioMinimal.unwrapped.boost + gnuradio3_8Minimal.unwrapped.boost qt5.qtbase qt5.qtsvg - gnuradioMinimal.pkgs.osmosdr + gnuradio3_8Minimal.pkgs.osmosdr rtl-sdr hackrf ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ]; diff --git a/pkgs/applications/radio/inspectrum/default.nix b/pkgs/applications/radio/inspectrum/default.nix index 3cc8c59cc026..9d61ab4b6019 100644 --- a/pkgs/applications/radio/inspectrum/default.nix +++ b/pkgs/applications/radio/inspectrum/default.nix @@ -1,5 +1,5 @@ { lib -, gnuradioMinimal +, gnuradio3_8Minimal , fetchFromGitHub , pkg-config , cmake @@ -8,7 +8,7 @@ , liquid-dsp }: -gnuradioMinimal.pkgs.mkDerivation rec { +gnuradio3_8Minimal.pkgs.mkDerivation rec { pname = "inspectrum"; version = "0.2.3"; diff --git a/pkgs/applications/radio/qradiolink/default.nix b/pkgs/applications/radio/qradiolink/default.nix index db459eb3bb34..2dbd9f1aba9c 100644 --- a/pkgs/applications/radio/qradiolink/default.nix +++ b/pkgs/applications/radio/qradiolink/default.nix @@ -3,7 +3,7 @@ , libpulseaudio , libconfig # Needs a gnuradio built with qt gui support -, gnuradio +, gnuradio3_8 # Not gnuradioPackages' , codec2 , log4cpp @@ -18,7 +18,7 @@ , speexdsp }: -gnuradio.pkgs.mkDerivation rec { +gnuradio3_8.pkgs.mkDerivation rec { pname = "qradiolink"; version = "0.8.5-2"; @@ -44,28 +44,28 @@ gnuradio.pkgs.mkDerivation rec { ''; buildInputs = [ - gnuradio.unwrapped.boost + gnuradio3_8.unwrapped.boost codec2 log4cpp gmp libpulseaudio libconfig gsm - gnuradio.pkgs.osmosdr + gnuradio3_8.pkgs.osmosdr libopus libjpeg speex speexdsp - gnuradio.qt.qtbase - gnuradio.qt.qtmultimedia + gnuradio3_8.qt.qtbase + gnuradio3_8.qt.qtmultimedia libftdi libsndfile - gnuradio.qwt + gnuradio3_8.qwt ]; nativeBuildInputs = [ protobuf - gnuradio.qt.qmake - gnuradio.qt.wrapQtAppsHook + gnuradio3_8.qt.qmake + gnuradio3_8.qt.wrapQtAppsHook ]; enableParallelBuilding = true; diff --git a/pkgs/development/gnuradio-modules/limesdr/default.nix b/pkgs/development/gnuradio-modules/limesdr/default.nix index 63136b33d658..c10ab9df391e 100644 --- a/pkgs/development/gnuradio-modules/limesdr/default.nix +++ b/pkgs/development/gnuradio-modules/limesdr/default.nix @@ -19,6 +19,7 @@ let version = { "3.7" = "2.0.0"; "3.8" = "3.0.1"; + "3.9" = null; }.${gnuradio.versionAttr.major}; src = fetchFromGitHub { owner = "myriadrf"; @@ -27,6 +28,7 @@ let sha256 = { "3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq"; "3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U="; + "3.9" = null; }.${gnuradio.versionAttr.major}; }; in mkDerivation { diff --git a/pkgs/development/gnuradio-modules/osmosdr/default.nix b/pkgs/development/gnuradio-modules/osmosdr/default.nix index 4159862bbed7..0e1cf244c8fc 100644 --- a/pkgs/development/gnuradio-modules/osmosdr/default.nix +++ b/pkgs/development/gnuradio-modules/osmosdr/default.nix @@ -24,6 +24,7 @@ let version = { "3.7" = "0.1.5"; "3.8" = "0.2.2"; + "3.9" = null; }.${gnuradio.versionAttr.major}; src = fetchgit { url = "git://git.osmocom.org/gr-osmosdr"; @@ -31,6 +32,7 @@ let sha256 = { "3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv"; "3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs="; + "3.9" = null; }.${gnuradio.versionAttr.major}; }; in mkDerivation { diff --git a/pkgs/development/gnuradio-modules/rds/default.nix b/pkgs/development/gnuradio-modules/rds/default.nix index a2062783bd74..c068d6af8105 100644 --- a/pkgs/development/gnuradio-modules/rds/default.nix +++ b/pkgs/development/gnuradio-modules/rds/default.nix @@ -17,6 +17,7 @@ let version = { "3.7" = "1.1.0"; "3.8" = "3.8.0"; + "3.9" = null; }.${gnuradio.versionAttr.major}; src = fetchFromGitHub { owner = "bastibl"; @@ -25,6 +26,7 @@ let sha256 = { "3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy"; "3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o="; + "3.9" = null; }.${gnuradio.versionAttr.major}; }; in mkDerivation { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd680c47af1b..d9cdd3b0a594 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22346,6 +22346,35 @@ in # So it will not reference python enableModTool = false; }; + features = { + gnuradio-companion = false; + python-support = false; + examples = false; + gr-qtgui = false; + gr-utils = false; + gr-modtool = false; + gr-blocktool = false; + sphinx = false; + doxygen = false; + }; + }; + }; + gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix { + unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix { + inherit (darwin.apple_sdk.frameworks) CoreAudio; + python = python3; + boost = boost17x; + }; + }; + gnuradio3_8Packages = lib.recurseIntoAttrs gnuradio3_8.pkgs; + # A build without gui components and other utilites not needed if gnuradio is + # used as a c++ library. + gnuradio3_8Minimal = gnuradio3_8.override { + wrap = false; + unwrapped = gnuradio3_8.unwrapped.override { + volk = volk.override { + enableModTool = false; + }; features = { gnuradio-companion = false; python-support = false;