blob: 66fd57edbe666844b80d0e9fd563a65dfc5d01b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
meson,
ninja,
pkg-config,
libsndfile,
libsamplerate,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libresample";
version = "0.1.4-unstable-2024-08-23";
outputs = [
"bin"
"dev"
"out"
];
src = fetchFromGitHub {
owner = "minorninth";
repo = "libresample";
rev = "7cb7f9c3f72d4e6774d964dc324af827192df7c3";
hash = "sha256-8gyGZVblqeHYXKFM79AcfX455+l3Tsoq3xQse5nrKAo=";
};
patches = [
# Fix testresample.c output span; add exit code
# https://github.com/minorninth/libresample/pull/7
./fix-test.patch
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs =
[
# For `resample-sndfile`
libsndfile
]
++ lib.optionals (!libsamplerate.meta.broken) [
# For `compareresample`
libsamplerate
];
mesonFlags = [ (lib.mesonEnable "compareresample" (!libsamplerate.meta.broken)) ];
doCheck = true;
meta = {
description = "Real-time library for sampling rate conversion library";
homepage = "https://github.com/minorninth/libresample";
license = lib.licenses.bsd2; # OR LGPL-2.1-or-later
sourceProvenance = [ lib.sourceTypes.fromSource ];
platforms = lib.platforms.all;
maintainers = [
lib.maintainers.sander
lib.maintainers.emily
];
mainProgram = "resample-sndfile";
};
})
|