summary refs log tree commit diff
path: root/pkgs/applications/radio
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2019-02-09 19:41:57 +0100
committerElis Hirwing <elis@hirwing.se>2019-02-09 21:39:47 +0100
commit2c19435f4ae84d616b63a8e8a36bab1b59ac193d (patch)
treeb065a57f4965271c667296b38f9a85d79f708216 /pkgs/applications/radio
parent6d68eea441fe9fbc9b80f84adf9e45ebe859f4a0 (diff)
downloadnixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.tar
nixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.tar.gz
nixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.tar.bz2
nixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.tar.lz
nixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.tar.xz
nixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.tar.zst
nixpkgs-2c19435f4ae84d616b63a8e8a36bab1b59ac193d.zip
airspy: Move from misc to radio
Diffstat (limited to 'pkgs/applications/radio')
-rw-r--r--pkgs/applications/radio/airspy/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/applications/radio/airspy/default.nix b/pkgs/applications/radio/airspy/default.nix
new file mode 100644
index 00000000000..2042f1047b2
--- /dev/null
+++ b/pkgs/applications/radio/airspy/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub
+, cmake , pkgconfig, libusb
+}:
+
+let
+  version = "1.0.9";
+in
+  stdenv.mkDerivation {
+    name = "airspy-${version}";
+
+    src = fetchFromGitHub {
+      owner = "airspy";
+      repo = "airspyone_host";
+      rev = "v${version}";
+      sha256 = "04kx2p461sqd4q354n1a99zcabg9h29dwcnyhakykq8bpg3mgf1x";
+    };
+
+    postPatch = ''
+      substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
+    '';
+
+    nativeBuildInputs = [ cmake pkgconfig ];
+    buildInputs = [ libusb ];
+
+    cmakeFlags =
+      lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
+
+    meta = with stdenv.lib; {
+      homepage = https://github.com/airspy/airspyone_host;
+      description = "Host tools and driver library for the AirSpy SDR";
+      license = licenses.bsd3;
+      platforms = with platforms; linux ++ darwin;
+      maintainers = with maintainers; [ markuskowa ];
+    };
+  }