airspy, soapyairspy: fix build with cmake 4 (#450305)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
libusb1,
|
||||
@@ -18,6 +19,22 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1v7sfkkxc6f8ny1p9xrax1agkl6q583mjx8k0lrrwdz31rf9qgw9";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# CMake < 3.5 fix. Remove upon next version bump.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/airspy/airspyone_host/commit/7290309a663ced66e1e51dc65c1604e563752310.patch";
|
||||
hash = "sha256-DZ7hYFBu9O2e6Fdx3yJdoCHoE1uVhzih0+OpiPTvkaI=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/airspy/airspyone_host/commit/3cf6f97976611c2ff6363f7927fe76c465995801.patch";
|
||||
hash = "sha256-7LU3UvpvwQdDF8GPZw/W4Z2CSzUCNk47McNHti3YHP8=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/airspy/airspyone_host/commit/f467acd587617640741ecbfade819d10ecd032c2.patch";
|
||||
hash = "sha256-qfJrxM1hq7NScxN++d9IH+fwFfXf/YwZZUDDOVbwIJk=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
|
||||
'';
|
||||
@@ -30,7 +47,10 @@ stdenv.mkDerivation rec {
|
||||
doInstallCheck = true;
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
|
||||
cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"-DINSTALL_UDEV_RULES=ON"
|
||||
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/airspy/airspyone_host";
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
airspy,
|
||||
soapysdr,
|
||||
@@ -24,6 +25,18 @@ stdenv.mkDerivation rec {
|
||||
soapysdr
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/pothosware/SoapyAirspy/commit/1be30c33b394fc4d2aeea4287e8df8701adad5a0.patch";
|
||||
hash = "sha256-ZEIyyd2tOK1diPh8BsEqALHGgdVCV6tZP9xeQNeeXl8=";
|
||||
})
|
||||
# CMake < 3.5 compat fix. Remove after (https://github.com/pothosware/SoapyAirspy/pull/31 is merged && next version bump).
|
||||
(fetchpatch {
|
||||
url = "https://github.com/pothosware/SoapyAirspy/pull/31/commits/0ee4a5e8edff9f2bbea60dd069d2cc958e314a3e.patch";
|
||||
hash = "sha256-TQs4rDw+kRmxnuUwhhq9ioCsbKKniwuspSk/c7wazMM=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user