uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
98
pkgs/applications/audio/radiotray-ng/default.nix
Normal file
98
pkgs/applications/audio/radiotray-ng/default.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
{ 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
|
||||
, 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
|
||||
pythonInputs = with python3.pkgs; [ python lxml ];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "radiotray-ng";
|
||||
version = "0.2.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ebruck";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
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 = ''
|
||||
for x in package/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
|
||||
substituteInPlace $x --replace /usr $out
|
||||
done
|
||||
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"}"
|
||||
];
|
||||
|
||||
checkInputs = [ gtest ];
|
||||
doCheck = !stdenv.isAarch64; # single failure that I can't explain
|
||||
|
||||
preFixup = ''
|
||||
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 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
55
pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch
Normal file
55
pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
From b6f7a9e2e0194c6baed63a33b7beff359080b8d9 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Sat, 16 Mar 2019 11:40:00 -0500
|
||||
Subject: [PATCH] don't download googletest
|
||||
|
||||
---
|
||||
CMakeLists.txt | 18 ------------------
|
||||
tests/CMakeLists.txt | 1 -
|
||||
2 files changed, 19 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ddba1be..3396705 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,25 +70,7 @@ endif()
|
||||
|
||||
# build tests? Then we need googletest...
|
||||
if (BUILD_TESTS)
|
||||
- include(ExternalProject)
|
||||
-
|
||||
- ExternalProject_Add(googletest
|
||||
- PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest"
|
||||
- URL https://github.com/google/googletest/archive/release-1.8.1.tar.gz
|
||||
- URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
|
||||
- TIMEOUT 30
|
||||
- DOWNLOAD_NO_PROGRESS true
|
||||
- INSTALL_COMMAND "")
|
||||
-
|
||||
- ExternalProject_Get_Property(googletest SOURCE_DIR)
|
||||
- include_directories(${SOURCE_DIR}/googlemock/include ${SOURCE_DIR}/googletest/include)
|
||||
- ExternalProject_Get_Property(googletest BINARY_DIR)
|
||||
- link_directories(${BINARY_DIR}/googlemock ${BINARY_DIR}/googlemock/gtest)
|
||||
set(GMOCK_BOTH_LIBRARIES gmock_main gmock gtest)
|
||||
- set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM "${CMAKE_CURRENT_BINARY_DIR}/googletest")
|
||||
- unset(SOURCE_DIR)
|
||||
- unset(BINARY_DIR)
|
||||
-
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(tests/runners/)
|
||||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||
index 859c048..58ab5c2 100644
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -2,7 +2,6 @@ include(GoogleTest)
|
||||
|
||||
function(add_gmock_test target)
|
||||
add_executable(${target} ${ARGN})
|
||||
- add_dependencies(${target} googletest)
|
||||
target_link_libraries(${target} config playlist bookmarks event_bus ${GMOCK_BOTH_LIBRARIES} ${XDG_BASEDIR_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES} ${JSONCPP_LIBRARIES} pthread)
|
||||
target_include_directories(${target} PRIVATE ${JSONCPP_INCLUDE_DIRS})
|
||||
gtest_discover_tests(${target})
|
||||
--
|
||||
2.22.0
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue