1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/pkgs/applications/audio/radiotray-ng/default.nix

101 lines
2.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub
, cmake, pkgconfig
# Transport
, curl
# Libraries
, boost
, jsoncpp
, libbsd
, pcre
# GUI/Desktop
, dbus
, glibmm
, gsettings-desktop-schemas
, hicolor-icon-theme
, libappindicator-gtk3
, libnotify
, libxdg_basedir
, wxGTK
# GStreamer
, gst_all_1
# User-agent info
, lsb-release
# rt2rtng
2019-10-28 06:49:08 +00:00
, python3
# Testing
, gtest
# Fixup
, wrapGAppsHook
, makeWrapper
}:
let
gstInputs = with gst_all_1; [
gstreamer gst-plugins-base
gst-plugins-good gst-plugins-bad gst-plugins-ugly
gst-libav
];
# For the rt2rtng utility for converting bookmark file to -ng format
2019-10-28 06:49:08 +00:00
pythonInputs = with python3.pkgs; [ python lxml ];
in
stdenv.mkDerivation rec {
2019-07-08 22:58:29 +01:00
pname = "radiotray-ng";
version = "0.2.7";
src = fetchFromGitHub {
owner = "ebruck";
repo = pname;
rev = "v${version}";
sha256 = "1v2nsz7s0jj0wmqabzk6akcf1353rachm1lfq77hxbq9z5pw8pgb";
};
nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ];
buildInputs = [
curl
boost jsoncpp libbsd pcre
glibmm hicolor-icon-theme gsettings-desktop-schemas libappindicator-gtk3 libnotify
libxdg_basedir
lsb-release
wxGTK
] ++ gstInputs
++ pythonInputs;
patches = [ ./no-dl-googletest.patch ];
postPatch = ''
2019-07-08 22:58:29 +01:00
for x in package/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
2018-02-20 13:29:26 +00:00
substituteInPlace $x --replace /usr $out
done
2019-07-08 22:58:29 +01:00
substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart
# We don't find the radiotray-ng-notification icon otherwise
substituteInPlace data/radiotray-ng.desktop \
--replace radiotray-ng-notification radiotray-ng-on
substituteInPlace data/rtng-bookmark-editor.desktop \
--replace radiotray-ng-notification radiotray-ng-on
'';
cmakeFlags = [
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
];
2018-02-20 13:29:26 +00:00
enableParallelBuilding = true;
checkInputs = [ gtest ];
doCheck = !stdenv.isAarch64; # single failure that I can't explain
preFixup = ''
gappsWrapperArgs+=(--suffix PATH : ${stdenv.lib.makeBinPath [ dbus ]})
wrapProgram $out/bin/rt2rtng --prefix PYTHONPATH : $PYTHONPATH
'';
meta = with stdenv.lib; {
description = "An internet radio player for linux";
homepage = https://github.com/ebruck/radiotray-ng;
license = licenses.gpl3;
maintainers = with maintainers; [ dtzWill ];
platforms = platforms.all;
};
}