From 2c19435f4ae84d616b63a8e8a36bab1b59ac193d Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 9 Feb 2019 19:41:57 +0100 Subject: airspy: Move from misc to radio --- pkgs/applications/radio/airspy/default.nix | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pkgs/applications/radio/airspy/default.nix (limited to 'pkgs/applications/radio') diff --git a/pkgs/applications/radio/airspy/default.nix b/pkgs/applications/radio/airspy/default.nix new file mode 100644 index 000000000000..2042f1047b22 --- /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 ]; + }; + } -- cgit 1.4.1