gnuradioPackages.osmosdr: simplify expression for a single GR version

Remove unused swig3 dependency - was really needed only for GR 3.8 that
is now removed.
This commit is contained in:
Doron Behar
2024-12-24 11:57:41 +02:00
parent 4a9dcde80b
commit c405f45fc0
@@ -13,7 +13,6 @@
, thrift
, fftwFloat
, python
, swig3
, uhd
, icu
, airspy
@@ -24,26 +23,16 @@
, gnuradioAtLeast
}:
let
version = {
"3.7" = "0.1.5";
"3.8" = "0.2.3";
"3.9" = "0.2.6";
"3.10" = "0.2.6";
}.${gnuradio.versionAttr.major};
mkDerivation rec {
pname = "gr-osmosdr";
version = "0.2.6";
src = fetchgit {
url = "https://gitea.osmocom.org/sdr/gr-osmosdr";
rev = "v${version}";
sha256 = {
"3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
"3.8" = "sha256-ZfI8MshhZOdJ1U5FlnZKXsg2Rsvb6oKg943ZVYd/IWo=";
"3.9" = "sha256-jCUzBY1pYiEtcRQ97t9F6uEMVYw2NU0eoB5Xc2H6pGQ=";
"3.10" = "sha256-jCUzBY1pYiEtcRQ97t9F6uEMVYw2NU0eoB5Xc2H6pGQ=";
}.${gnuradio.versionAttr.major};
hash = "sha256-jCUzBY1pYiEtcRQ97t9F6uEMVYw2NU0eoB5Xc2H6pGQ=";
};
in mkDerivation {
pname = "gr-osmosdr";
inherit version src;
disabled = gnuradioAtLeast "3.11";
outputs = [ "out" "dev" ];
@@ -81,13 +70,8 @@ in mkDerivation {
nativeBuildInputs = [
cmake
pkg-config
swig3
] ++ lib.optionals (gnuradio.hasFeature "python-support") [
(if (gnuradio.versionAttr.major == "3.7") then
python.pkgs.cheetah
else
python.pkgs.mako
)
python.pkgs.mako
python
]
;