nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 soapysdr,
8 avahi,
9}:
10
11let
12 version = "0.5.2-unstable-2024-01-24";
13
14in
15stdenv.mkDerivation {
16 pname = "soapyremote";
17 inherit version;
18
19 src = fetchFromGitHub {
20 owner = "pothosware";
21 repo = "SoapyRemote";
22 rev = "54caa5b2af348906607c5516a112057650d0873d";
23 sha256 = "sha256-uekElbcbX2P5TEufWEoP6tgUM/4vxgSQZu8qaBCSo18=";
24 };
25
26 nativeBuildInputs = [ cmake ];
27 buildInputs = [
28 soapysdr
29 avahi
30 ];
31
32 patches = [
33 (fetchpatch {
34 url = "https://github.com/pothosware/SoapyRemote/commit/40c3ef9053b63885b7444ce7e9ef00d2c7964c9d.patch";
35 hash = "sha256-kEx4gge+AQW/LSUyo+aWXlqDzXjoxCfn3pi2mk5xsNI=";
36 })
37 ];
38
39 cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
40
41 env.NIX_CFLAGS_COMPILE = toString (
42 lib.optionals stdenv.hostPlatform.isDarwin [ "-include sys/select.h" ]
43 );
44
45 meta = {
46 homepage = "https://github.com/pothosware/SoapyRemote";
47 description = "SoapySDR plugin for remote access to SDRs";
48 license = lib.licenses.boost;
49 maintainers = with lib.maintainers; [ markuskowa ];
50 platforms = lib.platforms.unix;
51 mainProgram = "SoapySDRServer";
52 };
53}