diff --git a/pkgs/applications/radio/sdrplay/default.nix b/pkgs/applications/radio/sdrplay/default.nix index 699389dd2d34..84fe590b38da 100644 --- a/pkgs/applications/radio/sdrplay/default.nix +++ b/pkgs/applications/radio/sdrplay/default.nix @@ -1,20 +1,36 @@ -{ stdenv, lib, fetchurl, autoPatchelfHook, udev }: +{ stdenv, lib, fetchurl, autoPatchelfHook, udev, libusb }: let - arch = if stdenv.isx86_64 then "x86_64" - else if stdenv.isi686 then "i686" + arch = + if stdenv.isx86_64 then "x86_64" + else if stdenv.isi686 then "i686" + else if stdenv.isAarch64 then "aarch64" else throw "unsupported architecture"; -in stdenv.mkDerivation rec { - pname = "sdrplay"; + version = "3.07.1"; - src = fetchurl { - url = "https://www.sdrplay.com/software/SDRplay_RSP_API-Linux-${version}.run"; - sha256 = "1a25c7rsdkcjxr7ffvx2lwj7fxdbslg9qhr8ghaq1r53rcrqgzmf"; + srcs = rec { + aarch64 = { + url = "https://www.sdrplay.com/software/SDRplay_RSP_API-ARM64-${version}.run"; + hash = "sha256-GJPFW6W8Ke4mnczcSLFYfioOMGCfFn2/EIA07VnmVGY="; + }; + + x86_64 = { + url = "https://www.sdrplay.com/software/SDRplay_RSP_API-Linux-${version}.run"; + sha256 = "1a25c7rsdkcjxr7ffvx2lwj7fxdbslg9qhr8ghaq1r53rcrqgzmf"; + }; + + i686 = x86_64; }; +in +stdenv.mkDerivation rec { + pname = "sdrplay"; + inherit version; + + src = fetchurl srcs."${arch}"; nativeBuildInputs = [ autoPatchelfHook ]; - buildInputs = [ udev stdenv.cc.cc.lib ]; + buildInputs = [ libusb udev stdenv.cc.cc.lib ]; unpackPhase = '' sh "$src" --noexec --target source @@ -46,7 +62,7 @@ in stdenv.mkDerivation rec { homepage = "https://www.sdrplay.com/downloads/"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; - maintainers = [ maintainers.pmenke ]; + maintainers = with maintainers; [ pmenke zaninime ]; platforms = platforms.linux; }; }