2018-01-06 22:12:56 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
2017-10-04 23:33:21 +02:00
|
|
|
, cmake, pkgconfig
|
|
|
|
# Transport
|
|
|
|
, curl
|
|
|
|
# Libraries
|
|
|
|
, boost
|
|
|
|
, jsoncpp
|
|
|
|
, libbsd
|
|
|
|
, pcre
|
|
|
|
# GUI/Desktop
|
|
|
|
, dbus
|
|
|
|
, glibmm
|
2019-04-17 02:38:26 +02:00
|
|
|
, gsettings-desktop-schemas
|
2018-02-25 03:23:58 +01:00
|
|
|
, hicolor-icon-theme
|
2017-10-04 23:33:21 +02:00
|
|
|
, libappindicator-gtk3
|
|
|
|
, libnotify
|
|
|
|
, libxdg_basedir
|
2018-01-06 22:12:56 +01:00
|
|
|
, wxGTK
|
2017-10-04 23:33:21 +02:00
|
|
|
# GStreamer
|
|
|
|
, gst_all_1
|
|
|
|
# User-agent info
|
|
|
|
, lsb-release
|
|
|
|
# rt2rtng
|
|
|
|
, python2
|
|
|
|
# Testing
|
2018-08-08 20:15:17 +02:00
|
|
|
, gtest
|
2017-10-04 23:33:21 +02:00
|
|
|
# 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
|
|
|
|
pythonInputs = with python2.pkgs; [ python2 lxml ];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "radiotray-ng-${version}";
|
2019-03-16 17:10:52 +01:00
|
|
|
version = "0.2.5";
|
2017-10-04 23:33:21 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebruck";
|
|
|
|
repo = "radiotray-ng";
|
|
|
|
rev = "v${version}";
|
2019-03-16 17:10:52 +01:00
|
|
|
sha256 = "1crvpn1mgrv7bd2k683mpgs59785mkrjvmp1f14iyq4qrr0f9zzi";
|
2017-10-04 23:33:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
boost jsoncpp libbsd pcre
|
2019-04-17 02:38:26 +02:00
|
|
|
glibmm hicolor-icon-theme gsettings-desktop-schemas libappindicator-gtk3 libnotify
|
2017-10-04 23:33:21 +02:00
|
|
|
libxdg_basedir
|
|
|
|
lsb-release
|
2018-01-06 22:12:56 +01:00
|
|
|
wxGTK
|
2018-08-08 20:15:17 +02:00
|
|
|
] ++ gstInputs
|
2017-10-04 23:33:21 +02:00
|
|
|
++ pythonInputs;
|
|
|
|
|
2019-03-16 17:10:52 +01:00
|
|
|
patches = [ ./no-dl-googletest.patch ];
|
|
|
|
|
2018-08-08 20:15:17 +02:00
|
|
|
postPatch = ''
|
2018-02-20 14:29:26 +01:00
|
|
|
for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
|
|
|
|
substituteInPlace $x --replace /usr $out
|
|
|
|
done
|
2017-10-04 23:33:21 +02:00
|
|
|
|
2018-01-06 22:12:56 +01:00
|
|
|
# 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
|
|
|
|
'';
|
2017-10-04 23:33:21 +02:00
|
|
|
|
2018-08-08 20:15:17 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
|
|
|
];
|
2018-02-20 14:29:26 +01:00
|
|
|
|
2017-10-04 23:33:21 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-08 20:15:17 +02:00
|
|
|
checkInputs = [ gtest ];
|
2019-03-17 07:03:32 +01:00
|
|
|
doCheck = !stdenv.isAarch64; # single failure that I can't explain
|
2017-10-04 23:33:21 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|