nixpkgs/pkgs/applications/audio/radiotray-ng/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

102 lines
2.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, cmake, pkg-config
# 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 21:58:29 +00:00
pname = "radiotray-ng";
2021-08-23 02:06:14 +00:00
version = "0.2.8";
src = fetchFromGitHub {
owner = "ebruck";
repo = pname;
rev = "v${version}";
2021-08-23 02:06:14 +00:00
sha256 = "sha256-/0GlQdSsIPKGrDT9CgxvaH8TpAbqxFduwL2A2+BSrEI=";
};
nativeBuildInputs = [ cmake pkg-config 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 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
# 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
2023-03-15 15:26:49 +00:00
# 'wxFont::wxFont(int, int, int, int, bool, const wxString&, wxFontEncoding)' is deprecated
env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
nativeCheckInputs = [ gtest ];
doCheck = !stdenv.isAarch64; # single failure that I can't explain
preFixup = ''
2021-01-15 13:21:58 +00:00
gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ dbus ]})
wrapProgram $out/bin/rt2rtng --prefix PYTHONPATH : $PYTHONPATH
'';
meta = with lib; {
description = "An internet radio player for linux";
homepage = "https://github.com/ebruck/radiotray-ng";
license = licenses.gpl3;
maintainers = with maintainers; [ dtzWill ];
2022-10-28 15:08:47 +00:00
platforms = platforms.linux;
};
}