about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/radio/airspy
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-02-10 20:13:39 +0000
committerAlyssa Ross <hi@alyssa.is>2019-02-10 20:13:39 +0000
commit393251bf8fa98292cecd05785a8c815fa762b3ea (patch)
treeab59dcf3808e5a222c2501b51b636d876844e5d0 /nixpkgs/pkgs/applications/radio/airspy
parent0e118743ce5edf9174a320050a7c0eea2199aaaa (diff)
parent929cc78363e6878e044556bd291382eab37bcbed (diff)
downloadnixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.tar
nixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.tar.gz
nixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.tar.bz2
nixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.tar.lz
nixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.tar.xz
nixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.tar.zst
nixlib-393251bf8fa98292cecd05785a8c815fa762b3ea.zip
Merge commit '929cc78363e6878e044556bd291382eab37bcbed'
Diffstat (limited to 'nixpkgs/pkgs/applications/radio/airspy')
-rw-r--r--nixpkgs/pkgs/applications/radio/airspy/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/radio/airspy/default.nix b/nixpkgs/pkgs/applications/radio/airspy/default.nix
new file mode 100644
index 000000000000..2042f1047b22
--- /dev/null
+++ b/nixpkgs/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 ];
+    };
+  }