2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-01-19 06:50:56 +00:00
|
|
|
, cmake, pkg-config
|
2017-10-04 21:33:21 +00:00
|
|
|
# Transport
|
|
|
|
, curl
|
|
|
|
# Libraries
|
|
|
|
, boost
|
|
|
|
, jsoncpp
|
|
|
|
, libbsd
|
|
|
|
, pcre
|
|
|
|
# GUI/Desktop
|
|
|
|
, dbus
|
|
|
|
, glibmm
|
2019-04-17 00:38:26 +00:00
|
|
|
, gsettings-desktop-schemas
|
2018-02-25 02:23:58 +00:00
|
|
|
, hicolor-icon-theme
|
2017-10-04 21:33:21 +00:00
|
|
|
, libappindicator-gtk3
|
|
|
|
, libnotify
|
|
|
|
, libxdg_basedir
|
2018-01-06 21:12:56 +00:00
|
|
|
, wxGTK
|
2017-10-04 21:33:21 +00:00
|
|
|
# GStreamer
|
|
|
|
, gst_all_1
|
|
|
|
# User-agent info
|
|
|
|
, lsb-release
|
|
|
|
# rt2rtng
|
2019-10-28 06:49:08 +00:00
|
|
|
, python3
|
2017-10-04 21:33:21 +00:00
|
|
|
# Testing
|
2018-08-08 18:15:17 +00:00
|
|
|
, gtest
|
2017-10-04 21:33:21 +00: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
|
2019-10-28 06:49:08 +00:00
|
|
|
pythonInputs = with python3.pkgs; [ python lxml ];
|
2017-10-04 21:33:21 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-08 21:58:29 +00:00
|
|
|
pname = "radiotray-ng";
|
2019-10-28 06:43:53 +00:00
|
|
|
version = "0.2.7";
|
2017-10-04 21:33:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebruck";
|
2019-10-28 06:43:53 +00:00
|
|
|
repo = pname;
|
2017-10-04 21:33:21 +00:00
|
|
|
rev = "v${version}";
|
2019-10-28 06:43:53 +00:00
|
|
|
sha256 = "1v2nsz7s0jj0wmqabzk6akcf1353rachm1lfq77hxbq9z5pw8pgb";
|
2017-10-04 21:33:21 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config wrapGAppsHook makeWrapper ];
|
2017-10-04 21:33:21 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
boost jsoncpp libbsd pcre
|
2019-04-17 00:38:26 +00:00
|
|
|
glibmm hicolor-icon-theme gsettings-desktop-schemas libappindicator-gtk3 libnotify
|
2017-10-04 21:33:21 +00:00
|
|
|
libxdg_basedir
|
|
|
|
lsb-release
|
2018-01-06 21:12:56 +00:00
|
|
|
wxGTK
|
2018-08-08 18:15:17 +00:00
|
|
|
] ++ gstInputs
|
2017-10-04 21:33:21 +00:00
|
|
|
++ pythonInputs;
|
|
|
|
|
2019-03-16 16:10:52 +00:00
|
|
|
patches = [ ./no-dl-googletest.patch ];
|
|
|
|
|
2018-08-08 18:15:17 +00:00
|
|
|
postPatch = ''
|
2019-07-08 21:58:29 +00: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 21:58:29 +00:00
|
|
|
substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart
|
2017-10-04 21:33:21 +00:00
|
|
|
|
2018-01-06 21:12:56 +00: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 21:33:21 +00:00
|
|
|
|
2018-08-08 18:15:17 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
|
|
|
];
|
2018-02-20 13:29:26 +00:00
|
|
|
|
2018-08-08 18:15:17 +00:00
|
|
|
checkInputs = [ gtest ];
|
2019-03-17 06:03:32 +00:00
|
|
|
doCheck = !stdenv.isAarch64; # single failure that I can't explain
|
2017-10-04 21:33:21 +00:00
|
|
|
|
|
|
|
preFixup = ''
|
2021-01-15 13:21:58 +00:00
|
|
|
gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ dbus ]})
|
2017-10-04 21:33:21 +00:00
|
|
|
wrapProgram $out/bin/rt2rtng --prefix PYTHONPATH : $PYTHONPATH
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-10-04 21:33:21 +00:00
|
|
|
description = "An internet radio player for linux";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ebruck/radiotray-ng";
|
2017-10-04 21:33:21 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|