summary refs log tree commit diff
path: root/pkgs/applications/radio/svxlink/default.nix
blob: 255f7761be923f0280e7690f36c763e1bc3060ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ lib, stdenv, cmake, pkg-config, fetchFromGitHub, makeDesktopItem, alsa-lib, speex
, libopus, curl, gsm, libgcrypt, libsigcxx, popt, qtbase, qttools
, wrapQtAppsHook, rtl-sdr, tcl, doxygen, groff }:

let
  desktopItem = makeDesktopItem rec {
    name = "Qtel";
    exec = "qtel";
    icon = "qtel";
    desktopName = name;
    genericName = "EchoLink Client";
    categories = "HamRadio;Qt;Network;";
  };

in stdenv.mkDerivation rec {
  pname = "svxlink";
  version = "19.09.2";

  src = fetchFromGitHub {
    owner = "sm0svx";
    repo = pname;
    rev = version;
    sha256 = "sha256-riyFEuEmJ7+jYT3UoTTsMUwFdO3y5mjo4z0fcC3O8gY=";
  };

  cmakeFlags = [
    "-DDO_INSTALL_CHOWN=NO"
    "-DRTLSDR_LIBRARIES=${rtl-sdr}/lib/librtlsdr.so"
    "-DRTLSDR_INCLUDE_DIRS=${rtl-sdr}/include"
    "../src"
  ];
  dontWrapQtApps = true;

  nativeBuildInputs = [ cmake pkg-config doxygen groff wrapQtAppsHook ];

  buildInputs = [
    alsa-lib
    curl
    gsm
    libgcrypt
    libsigcxx
    libopus
    popt
    qtbase
    qttools
    rtl-sdr
    speex
    tcl
  ];

  postInstall = ''
    rm -f $out/share/applications/*
    cp -v ${desktopItem}/share/applications/* $out/share/applications
    mv $out/share/icons/link.xpm $out/share/icons/qtel.xpm

    wrapQtApp $out/bin/qtel
  '';

  meta = with lib; {
    description = "Advanced repeater controller and EchoLink software";
    longDescription = ''
      Advanced repeater controller and EchoLink software for Linux including a
      GUI, Qtel - The Qt EchoLink client
    '';
    homepage = "http://www.svxlink.org/";
    license = with licenses; [ gpl2 ];
    maintainers = with maintainers; [ zaninime ];
    platforms = platforms.linux;
  };
}