2023-01-27 23:08:52 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, openssl, libogg, libopus, fetchpatch }:
|
2013-12-07 20:09:08 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-04-27 19:59:41 +02:00
|
|
|
pname = "opusfile";
|
|
|
|
version = "0.12";
|
2013-12-07 20:09:08 +01:00
|
|
|
src = fetchurl {
|
2021-04-27 19:59:41 +02:00
|
|
|
url = "http://downloads.xiph.org/releases/opus/opusfile-${version}.tar.gz";
|
2020-07-06 00:24:39 +02:00
|
|
|
sha256 = "02smwc5ah8nb3a67mnkjzqmrzk43j356hgj2a97s9midq40qd38i";
|
2013-12-07 20:09:08 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2016-09-13 07:00:39 +02:00
|
|
|
buildInputs = [ openssl libogg ];
|
|
|
|
propagatedBuildInputs = [ libopus ];
|
2022-09-18 12:57:37 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
2023-01-27 23:08:52 +01:00
|
|
|
patches = [
|
|
|
|
./include-multistream.patch
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2022-47021.patch";
|
|
|
|
url = "https://github.com/xiph/opusfile/commit/0a4cd796df5b030cb866f3f4a5e41a4b92caddf5.patch";
|
|
|
|
sha256 = "sha256-XThI/ys5caB+OncFVfxm5IsvQPy1MbLQKwIlYjPvTJQ=";
|
|
|
|
})
|
|
|
|
]
|
2021-04-27 19:59:41 +02:00
|
|
|
# fixes problem with openssl 1.1 dependency
|
|
|
|
# see https://github.com/xiph/opusfile/issues/13
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isWindows [ ./disable-cert-store.patch ];
|
2016-10-13 03:10:42 +02:00
|
|
|
configureFlags = [ "--disable-examples" ];
|
2013-12-07 20:09:08 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2013-12-07 20:09:08 +01:00
|
|
|
description = "High-level API for decoding and seeking in .opus files";
|
2020-10-02 09:58:50 +02:00
|
|
|
homepage = "https://www.opus-codec.org/";
|
2017-02-25 20:25:51 +01:00
|
|
|
license = licenses.bsd3;
|
2021-04-27 19:59:41 +02:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ taeer ];
|
2013-12-07 20:09:08 +01:00
|
|
|
};
|
|
|
|
}
|