nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 67 lines 1.6 kB view raw
1{ 2 callPackage, 3 fetchurl, 4 stdenv, 5 lib, 6}: 7 8let 9 version = "3.15.1"; 10 11 sources = rec { 12 x86_64-linux = { 13 url = "https://www.sdrplay.com/software/SDRplay_RSP_API-Linux-${version}.run"; 14 hash = "sha256-CTcyv10Xz9G2LqHh4qOW9tKBEcB+rztE2R7xJIU4QBQ="; 15 }; 16 17 x86_64-darwin = { 18 url = "https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.1.pkg"; 19 hash = "sha256-XRSM7aH653XS0t9bP89G3uJ7YiLiU1xMBjwvLqL3rMM="; 20 }; 21 22 aarch64-linux = x86_64-linux; 23 aarch64-darwin = x86_64-darwin; 24 }; 25 26 platforms = lib.attrNames sources; 27 28 package = if stdenv.hostPlatform.isLinux then ./linux.nix else ./darwin.nix; 29 30in 31 32callPackage package { 33 pname = "sdrplay"; 34 inherit version; 35 36 src = 37 let 38 inherit (stdenv.hostPlatform) system; 39 source = 40 if lib.hasAttr system sources then 41 sources."${system}" 42 else 43 throw "SDRplay is not supported on ${system}"; 44 45 in 46 fetchurl source; 47 48 meta = { 49 inherit platforms; 50 51 description = "SDRplay API"; 52 longDescription = '' 53 Proprietary library and api service for working with SDRplay devices. For documentation and licensing details see 54 https://www.sdrplay.com/docs/SDRplay_API_Specification_v${lib.concatStringsSep "." (lib.take 2 (builtins.splitVersion version))}.pdf 55 ''; 56 57 homepage = "https://www.sdrplay.com/downloads/"; 58 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 59 license = lib.licenses.unfree; 60 maintainers = with lib.maintainers; [ 61 pmenke 62 zaninime 63 ]; 64 65 mainProgram = "sdrplay_apiService"; 66 }; 67}