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