summary refs log tree commit diff
path: root/pkgs/development/tools/misc/uhd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/misc/uhd/default.nix')
-rw-r--r--pkgs/development/tools/misc/uhd/default.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix
index 78195e994c94..2ea87fe6d7f1 100644
--- a/pkgs/development/tools/misc/uhd/default.nix
+++ b/pkgs/development/tools/misc/uhd/default.nix
@@ -8,18 +8,18 @@
 #   SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="0666"
 
 let
-  uhdVer = "003_010_003_000";
-  ImgVer = stdenv.lib.replaceStrings ["_"] ["."] uhdVer;
+  uhdVer = "v" + version;
+  ImgVer = "uhd-images_3.11.0.git-227-g9277fc58.tar.xz";
 
   # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
-  # and xxx.yyy.zzz. Hrmpf...
-  version = "3.10.3.0";
+  # and xxx.yyy.zzz. Hrmpf... style keeps changing
+  version = "3.11.0.0";
 
   # Firmware images are downloaded (pre-built) from:
   # http://files.ettus.com/binaries/images/
   uhdImagesSrc = fetchurl {
-    url = "http://files.ettus.com/binaries/images/uhd-images_${ImgVer}-release.tar.gz";
-    sha256 = "198awvw6zsh19ydgx5qry5yc6yahdval9wjrsqbyj51pnr6s5qvy";
+    url = "http://files.ettus.com/binaries/images/${ImgVer}";
+    sha256 = "1z8isnlxc5h0168jjpdvdv7rkd55x4dkfh14m8pc501zsf8azd6z";
   };
 
 in stdenv.mkDerivation {
@@ -28,19 +28,24 @@ in stdenv.mkDerivation {
   src = fetchFromGitHub {
     owner = "EttusResearch";
     repo = "uhd";
-    rev = "release_${uhdVer}";
-    sha256 = "1aj8qizbyz4shwawj3qlhl6pyyda59hhgm9cwrj7s5kfdi4vdlc3";
+    rev = "${uhdVer}";
+    sha256 = "1ilx1a8k5zygfq7acm9yk2fi368b1a1l7ll21kmmxjv6ifz8ds5q";
   };
 
   enableParallelBuilding = true;
 
-  cmakeFlags = "-DLIBUSB_INCLUDE_DIRS=${libusb1.dev}/include/libusb-1.0";
+  # 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<uhd::range_t>::iterator {aka __gnu_cxx::__normal_iterator<uhd::range_t*, std::vector<uhd::range_t> >}' changed in GCC 7.1
+
+  cmakeFlags = [ "-DLIBUSB_INCLUDE_DIRS=${libusb1.dev}/include/libusb-1.0"] ++
+               [ (stdenv.lib.optionalString stdenv.isArm "-DCMAKE_CXX_FLAGS=-Wno-psabi") ];
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ python pythonPackages.pyramid_mako orc libusb1 boost ];
 
   # Build only the host software
   preConfigure = "cd host";
+  patches = if stdenv.isArm then ./neon.patch else null;
 
   postPhases = [ "installFirmware" ];
 
@@ -60,6 +65,6 @@ in stdenv.mkDerivation {
     homepage = https://uhd.ettus.com/;
     license = licenses.gpl3Plus;
     platforms = platforms.linux ++ platforms.darwin;
-    maintainers = with maintainers; [ bjornfor fpletz ];
+    maintainers = with maintainers; [ bjornfor fpletz tomberek ];
   };
 }