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,38 @@
{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }:
buildPythonPackage rec {
pname = "pulsectl";
version = "22.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-zBdOHO69TmIixbePT0FfEugHU8mrdas1QVm0y1lQsIQ=";
};
patches = [
# substitute library paths for libpulse and librt
(substituteAll {
src = ./library-paths.patch;
libpulse = "${libpulseaudio.out}/lib/libpulse${stdenv.hostPlatform.extensions.sharedLibrary}";
librt = "${glibc.out}/lib/librt${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
pythonImportsCheck = [
"pulsectl"
];
checkInputs = [ pulseaudio ];
checkPhase = ''
export HOME=$TMPDIR
${python.interpreter} -m unittest discover
'';
meta = with lib; {
description = "Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)";
homepage = "https://pypi.python.org/pypi/pulsectl/";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}

View file

@ -0,0 +1,22 @@
diff --git a/pulsectl/_pulsectl.py b/pulsectl/_pulsectl.py
index 4422ddf..3fb2f39 100644
--- a/pulsectl/_pulsectl.py
+++ b/pulsectl/_pulsectl.py
@@ -31,7 +31,7 @@ else:
if not hasattr(mono_time, 'ts'):
class timespec(Structure):
_fields_ = [('tv_sec', c_long), ('tv_nsec', c_long)]
- librt = CDLL('librt.so.1', use_errno=True)
+ librt = CDLL('@librt@', use_errno=True)
mono_time.get = librt.clock_gettime
mono_time.get.argtypes = [c_int, POINTER(timespec)]
mono_time.ts = timespec
@@ -625,7 +625,7 @@ class LibPulse(object):
def __init__(self):
- p = CDLL(ctypes.util.find_library('libpulse') or 'libpulse.so.0')
+ p = CDLL('@libpulse@')
self.funcs = dict()
for k, spec in self.func_defs.items():