nixpkgs/pkgs/applications/radio/svxlink/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

71 lines
1.7 KiB
Nix

{ lib, stdenv, cmake, pkgconfig, fetchFromGitHub, makeDesktopItem, alsaLib, 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.1";
src = fetchFromGitHub {
owner = "sm0svx";
repo = pname;
rev = version;
sha256 = "0xmbac821w9kl7imlz0mra19mlhi0rlpbyyay26w1y7h98j4g4yp";
};
cmakeFlags = [
"-DDO_INSTALL_CHOWN=NO"
"-DRTLSDR_LIBRARIES=${rtl-sdr}/lib/librtlsdr.so"
"-DRTLSDR_INCLUDE_DIRS=${rtl-sdr}/include"
"../src"
];
dontWrapQtApps = true;
nativeBuildInputs = [ cmake pkgconfig doxygen groff wrapQtAppsHook ];
buildInputs = [
alsaLib
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;
};
}