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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,96 @@
{ stdenv
, lib
, fetchFromGitHub
, bluez-tools
, cinnamon
, gnome
, gobject-introspection
, intltool
, pavucontrol
, python3Packages
, util-linux
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "blueberry";
version = "1.4.7";
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
rev = version;
sha256 = "sha256-ziAdLFSZS8bh+OBSYLqxJ3g7mgFai/psvlBw3Qt17w0=";
};
nativeBuildInputs = [
gobject-introspection
python3Packages.wrapPython
wrapGAppsHook
];
buildInputs = [
bluez-tools
cinnamon.xapps
gnome.gnome-bluetooth_1_0
python3Packages.python
util-linux
];
pythonPath = with python3Packages; [
dbus-python
pygobject3
setproctitle
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -a etc usr/* $out
# Fix paths
substituteInPlace $out/bin/blueberry \
--replace /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/bin/blueberry-tray \
--replace /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/etc/xdg/autostart/blueberry-obex-agent.desktop \
--replace /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/etc/xdg/autostart/blueberry-tray.desktop \
--replace Exec=blueberry-tray Exec=$out/bin/blueberry-tray
substituteInPlace $out/lib/blueberry/blueberry-obex-agent.py \
--replace /usr/share $out/share
substituteInPlace $out/lib/blueberry/blueberry-tray.py \
--replace /usr/share $out/share
substituteInPlace $out/lib/blueberry/blueberry.py \
--replace '"bt-adapter"' '"${bluez-tools}/bin/bt-adapter"' \
--replace /usr/bin/pavucontrol ${pavucontrol}/bin/pavucontrol \
--replace /usr/lib/blueberry $out/lib/blueberry \
--replace /usr/share $out/share
substituteInPlace $out/lib/blueberry/rfkillMagic.py \
--replace /usr/bin/rfkill ${util-linux}/bin/rfkill \
--replace /usr/sbin/rfkill ${util-linux}/bin/rfkill \
--replace /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/share/applications/blueberry.desktop \
--replace Exec=blueberry Exec=$out/bin/blueberry
glib-compile-schemas --strict $out/share/glib-2.0/schemas
runHook postInstall
'';
dontWrapGApps = true;
postFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonProgramsIn $out/lib "$out $pythonPath"
'';
meta = with lib; {
description = "Bluetooth configuration tool";
homepage = "https://github.com/linuxmint/blueberry";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.romildo ];
};
}

View file

@ -0,0 +1,58 @@
{ config, stdenv, lib, fetchurl, intltool, pkg-config, python3Packages, bluez, gtk3
, obex_data_server, xdg-utils, dnsmasq, dhcp, libappindicator, iproute2
, gnome, librsvg, wrapGAppsHook, gobject-introspection, autoreconfHook
, networkmanager, withPulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio, fetchpatch }:
let
pythonPackages = python3Packages;
binPath = lib.makeBinPath [ xdg-utils dnsmasq dhcp iproute2 ];
in stdenv.mkDerivation rec {
pname = "blueman";
version = "2.2.4";
src = fetchurl {
url = "https://github.com/blueman-project/blueman/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "sha256-VdY5/u2gtDsYplnmWYUhOlS0fcsTSPO07/tSONskJgI=";
};
nativeBuildInputs = [
gobject-introspection intltool pkg-config pythonPackages.cython
pythonPackages.wrapPython wrapGAppsHook
autoreconfHook # drop when below patch is removed
];
buildInputs = [ bluez gtk3 pythonPackages.python librsvg
gnome.adwaita-icon-theme iproute2 libappindicator networkmanager ]
++ pythonPath
++ lib.optional withPulseAudio libpulseaudio;
postPatch = lib.optionalString withPulseAudio ''
sed -i 's,CDLL(",CDLL("${libpulseaudio.out}/lib/,g' blueman/main/PulseAudioUtils.py
'';
pythonPath = with pythonPackages; [ pygobject3 pycairo ];
propagatedUserEnvPkgs = [ obex_data_server ];
configureFlags = [
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
"--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
(lib.enableFeature withPulseAudio "pulseaudio")
];
postFixup = ''
makeWrapperArgs="--prefix PATH ':' ${binPath}"
# This mimics ../../../development/interpreters/python/wrap.sh
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
'';
meta = with lib; {
homepage = "https://github.com/blueman-project/blueman";
description = "GTK-based Bluetooth Manager";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
};
}

View file

@ -0,0 +1,29 @@
{ lib, buildGoModule, fetchFromGitLab }:
buildGoModule rec {
pname = "bluewalker";
version = "0.3.0";
src = fetchFromGitLab {
owner = "jtaimisto";
repo = pname;
rev = "v${version}";
sha256 = "sha256-spuJRiNiaBV4EsetUq8vUfR6ejUNZxLhVzS3AZZyrrQ=";
};
vendorSha256 = "189qs6vmx63vwsjmc4qgf1y8xjsi7x6l1f5c3kd8j8jnagl26z4h";
ldflags = [
"-w"
"-s"
];
meta = with lib; {
description = "Simple command line Bluetooth LE scanner";
homepage = "https://gitlab.com/jtaimisto/bluewalker";
changelog = "https://gitlab.com/jtaimisto/bluewalker/-/tags/v${version}";
license = licenses.bsd2;
maintainers = with maintainers; [ cimm ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,68 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
, alsa-lib, bluez, glib, sbc, dbus
# optional, but useful utils
, readline, libbsd, ncurses
# optional codecs
, aacSupport ? true, fdk_aac
# TODO: aptxSupport
}:
with lib;
stdenv.mkDerivation rec {
pname = "bluez-alsa";
version = "3.1.0";
src = fetchFromGitHub {
owner = "Arkq";
repo = "bluez-alsa";
rev = "v${version}";
sha256 = "sha256-bohc/0hUr1mcV2JbFy71TjY8MXOU3oBBPCcupgkWsWY=";
};
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [
alsa-lib bluez glib sbc dbus
readline libbsd ncurses
]
++ optional aacSupport fdk_aac;
configureFlags = [
"--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib"
"--with-dbusconfdir=${placeholder "out"}/share/dbus-1/system.d"
"--enable-rfcomm"
"--enable-hcitop"
]
++ optional aacSupport "--enable-aac";
meta = {
description = "Bluez 5 Bluetooth Audio ALSA Backend";
longDescription = ''
Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
Bluez-ALSA registers all Bluetooth devices with audio profiles in Bluez
under a virtual ALSA PCM device called `bluealsa` that supports both
playback and capture.
Some backstory: Bluez 5 removed built-in support for ALSA in favor of a
generic interface for 3rd party appliations. Thereafter, PulseAudio
implemented a backend for that interface and became the only way to get
Bluetooth audio with Bluez 5. Users prefering ALSA stayed on Bluez 4.
However, Bluez 4 eventually became deprecated.
This package is a rebirth of a direct interface between ALSA and Bluez 5,
that, unlike PulseAudio, provides KISS near-metal-like experience. It is
not possible to run BluezALSA and PulseAudio Bluetooth at the same time
due to limitations in Bluez, but it is possible to run PulseAudio over
BluezALSA if you disable `bluetooth-discover` and `bluez5-discover`
modules in PA and configure it to play/capture sound over `bluealsa` PCM.
'';
homepage = src.meta.homepage;
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.oxij maintainers.lheckemann ];
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, autoreconfHook, readline
, fetchFromGitHub, glib, pkg-config }:
stdenv.mkDerivation rec {
version = "unstable-2020-10-24";
pname = "bluez-tools";
src = fetchFromGitHub {
owner = "khvzak";
repo = "bluez-tools";
rev = "f65321736475429316f07ee94ec0deac8e46ec4a";
sha256 = "0xk39lz3hm8lcnb5fdbfz4ldbbq8gswg95vilzdwxzrglcr6xnqq";
};
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ readline glib ];
meta = with lib; {
description = "Command line bluetooth manager for Bluez5";
license = licenses.gpl2;
maintainers = [ maintainers.dasuxullebt ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchurl, pkg-config, libusb-compat-0_1, glib, dbus-glib, bluez, openobex, dbus }:
stdenv.mkDerivation rec {
pname = "obex-data-server";
version = "0.4.6";
src = fetchurl {
url = "http://tadas.dailyda.com/software/obex-data-server-${version}.tar.gz";
sha256 = "0kq940wqs9j8qjnl58d6l3zhx0jaszci356xprx23l6nvdfld6dk";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb-compat-0_1 glib dbus-glib bluez openobex dbus ];
patches = [ ./obex-data-server-0.4.6-build-fixes-1.patch ];
preConfigure = ''
addToSearchPath PKG_CONFIG_PATH ${openobex}/lib64/pkgconfig
export PKG_CONFIG_PATH="${dbus.dev}/lib/pkgconfig:$PKG_CONFIG_PATH"
'';
meta = with lib; {
homepage = "http://wiki.muiline.com/obex-data-server";
platforms = platforms.linux;
license = licenses.gpl2;
};
}

View file

@ -0,0 +1,56 @@
Submitted By: Armin K. <krejzi at email dot com>
Date: 2012-07-06
Initial Package Version: 0.4.6
Upstream Status: Unknown
Origin: Self
Description: Some build fixes.
--- obex-data-server.orig/src/ods-obex.c 2011-02-10 10:14:42.000000000 +0100
+++ obex-data-server/src/ods-obex.c 2012-07-06 20:10:09.208712553 +0200
@@ -412,7 +412,7 @@
goto err;
}
- interfaces_num = OBEX_FindInterfaces(obex_context->obex_handle, &obex_intf);
+ interfaces_num = OBEX_EnumerateInterfaces(obex_context->obex_handle);
if (intf_num >= interfaces_num) {
g_set_error (error, ODS_ERROR, ODS_ERROR_FAILED, "Invalid interface number");
goto err;
@@ -1928,7 +1928,7 @@
gchar *uname;
gsize uname_len;
- if (action != OBEX_ACTION_SETPERM)
+ if (action != 0x03)
g_assert (src && dst);
object = OBEX_ObjectNew (obex_context->obex_handle, OBEX_CMD_ACTION);
@@ -1974,7 +1974,7 @@
OBEX_HDR_ACTION_ID, hv, 1, 0);
/* permissions header */
- if (action == OBEX_ACTION_SETPERM) {
+ if (action == 0x03) {
hv.bq4 = perms;
ret = OBEX_ObjectAddHeader (obex_context->obex_handle, object,
OBEX_HDR_PERMISSIONS, hv, 4, 0);
--- obex-data-server.orig/src/ods-session.c 2011-02-10 09:57:31.000000000 +0100
+++ obex-data-server/src/ods-session.c 2012-07-06 20:10:09.208712553 +0200
@@ -1761,7 +1761,7 @@
DBusGMethodInvocation *context)
{
return ods_session_remote_action (session, remote_source,
- remote_destination, OBEX_ACTION_COPY,
+ remote_destination, 0x00,
context);
}
@@ -1772,7 +1772,7 @@
DBusGMethodInvocation *context)
{
return ods_session_remote_action (session, remote_source,
- remote_destination, OBEX_ACTION_MOVE,
+ remote_destination, 0x01,
context);
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl, pkg-config, glib, dbus, openobex, bluez, libical }:
stdenv.mkDerivation rec {
pname = "obexd";
version = "0.48";
src = fetchurl {
url = "mirror://kernel/linux/bluetooth/obexd-${version}.tar.bz2";
sha256 = "1i20dnibvnq9lnkkhajr5xx3kxlwf9q5c4jm19kyb0q1klzgzlb8";
};
buildInputs = [ glib dbus openobex bluez libical ];
nativeBuildInputs = [ pkg-config ];
meta = with lib; {
homepage = "http://www.bluez.org/";
platforms = platforms.linux;
license = licenses.gpl3;
};
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl, pkg-config, bluez, fuse, obexftp }:
stdenv.mkDerivation rec {
pname = "obexfs";
version = "0.12";
src = fetchurl {
url = "mirror://sourceforge/openobex/obexfs-${version}.tar.gz";
sha256 = "1g3krpygk6swa47vbmp9j9s8ahqqcl9ra8r25ybgzv2d9pmjm9kj";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ fuse obexftp bluez ];
meta = with lib; {
homepage = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFs";
description = "A tool to mount OBEX-based devices (such as Bluetooth phones)";
platforms = platforms.linux;
license = licenses.lgpl2Plus;
};
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchurl, pkg-config, openobex, bluez, cmake }:
stdenv.mkDerivation rec {
pname = "obexftp";
version = "0.24.2";
src = fetchurl {
url = "mirror://sourceforge/openobex/obexftp-${version}-Source.tar.gz";
sha256 = "18w9r78z78ri5qc8fjym4nk1jfbrkyr789sq7rxrkshf1a7b83yl";
};
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ bluez ];
propagatedBuildInputs = [ openobex ];
# There's no such thing like "bluetooth" library; possibly they meant "bluez" but it links correctly without this.
postFixup = ''
sed -i 's,^Requires: bluetooth,Requires:,' $out/lib/pkgconfig/obexftp.pc
'';
meta = with lib; {
homepage = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp";
description = "A library and tool to access files on OBEX-based devices (such as Bluetooth phones)";
platforms = platforms.linux;
license = licenses.lgpl2Plus;
};
}

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchurl, pkg-config, bluez, libusb-compat-0_1, cmake }:
stdenv.mkDerivation rec {
pname = "openobex";
version = "1.7.2";
src = fetchurl {
url = "mirror://sourceforge/openobex/openobex-${version}-Source.tar.gz";
sha256 = "1z6l7pbwgs5pjx3861cyd3r6vq5av984bdp4r3hgrw2jxam6120m";
};
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ bluez libusb-compat-0_1 ];
configureFlags = [ "--enable-apps" ];
patchPhase = ''
sed -i "s!/lib/udev!$out/lib/udev!" udev/CMakeLists.txt
sed -i "/if ( PKGCONFIG_UDEV_FOUND )/,/endif ( PKGCONFIG_UDEV_FOUND )/d" udev/CMakeLists.txt
'';
meta = with lib; {
homepage = "http://dev.zuckschwerdt.org/openobex/";
description = "An open source implementation of the Object Exchange (OBEX) protocol";
platforms = platforms.linux;
license = licenses.lgpl2Plus;
};
}