nixos/kubernetes/kubelet: Fix sandbox image load on containerd 2.x (#364558)
[NixPkgs.git] / pkgs / applications / audio / radiotray-ng / default.nix
blob439fa8e4a0dd774be2dd65a6b53ba4e561c4eb5a
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   cmake,
7   pkg-config,
8   # Transport
9   curl,
10   # Libraries
11   boost,
12   jsoncpp,
13   libbsd,
14   pcre,
15   # GUI/Desktop
16   dbus,
17   glibmm,
18   gsettings-desktop-schemas,
19   hicolor-icon-theme,
20   libappindicator-gtk3,
21   libnotify,
22   libxdg_basedir,
23   wxGTK,
24   # GStreamer
25   glib-networking,
26   gst_all_1,
27   # User-agent info
28   lsb-release,
29   # rt2rtng
30   python3,
31   # Testing
32   gtest,
33   # Fixup
34   wrapGAppsHook3,
35   makeWrapper,
38 let
39   gstInputs = with gst_all_1; [
40     gstreamer
41     gst-plugins-base
42     gst-plugins-good
43     gst-plugins-bad
44     gst-plugins-ugly
45     gst-libav
46   ];
47   # For the rt2rtng utility for converting bookmark file to -ng format
48   pythonInputs = with python3.pkgs; [
49     python
50     lxml
51   ];
53 stdenv.mkDerivation rec {
54   pname = "radiotray-ng";
55   version = "0.2.8";
57   src = fetchFromGitHub {
58     owner = "ebruck";
59     repo = pname;
60     rev = "v${version}";
61     sha256 = "sha256-/0GlQdSsIPKGrDT9CgxvaH8TpAbqxFduwL2A2+BSrEI=";
62   };
64   nativeBuildInputs = [
65     cmake
66     pkg-config
67     wrapGAppsHook3
68     makeWrapper
69   ];
71   buildInputs =
72     [
73       curl
74       boost
75       jsoncpp
76       libbsd
77       pcre
78       glibmm
79       hicolor-icon-theme
80       gsettings-desktop-schemas
81       libappindicator-gtk3
82       libnotify
83       libxdg_basedir
84       lsb-release
85       wxGTK
86       # for https gstreamer / libsoup
87       glib-networking
88     ]
89     ++ gstInputs
90     ++ pythonInputs;
92   patches = [
93     ./no-dl-googletest.patch
94     (fetchpatch {
95       name = "gcc13-fixes.patch";
96       url = "https://github.com/ebruck/radiotray-ng/commit/7a99bfa784f77be8f160961d25ab63dc2d5ccde0.patch";
97       hash = "sha256-7x3v0dp9WPgd/vsnxezgXIZGsBrIHkTwIiu+FMlLmyA=";
98     })
99   ];
101   postPatch = ''
102     for x in package/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
103       substituteInPlace $x --replace /usr $out
104     done
105     substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart
107     # We don't find the radiotray-ng-notification icon otherwise
108     substituteInPlace data/radiotray-ng.desktop \
109       --replace radiotray-ng-notification radiotray-ng-on
110     substituteInPlace data/rtng-bookmark-editor.desktop \
111       --replace radiotray-ng-notification radiotray-ng-on
112   '';
114   cmakeFlags = [
115     "-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
116   ];
118   # 'wxFont::wxFont(int, int, int, int, bool, const wxString&, wxFontEncoding)' is deprecated
119   env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
121   nativeCheckInputs = [ gtest ];
122   doCheck = !stdenv.hostPlatform.isAarch64; # single failure that I can't explain
124   preFixup = ''
125     gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ dbus ]})
126     wrapProgram $out/bin/rt2rtng --prefix PYTHONPATH : $PYTHONPATH
127   '';
129   meta = with lib; {
130     description = "Internet radio player for linux";
131     homepage = "https://github.com/ebruck/radiotray-ng";
132     license = licenses.gpl3;
133     maintainers = [ ];
134     platforms = platforms.linux;
135   };