2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, meson, ninja
|
2020-11-21 19:51:51 +00:00
|
|
|
, gtk-doc ? null, file, docbook_xsl
|
|
|
|
, buildDevDoc ? gtk-doc != null
|
|
|
|
}: let
|
2021-02-05 17:12:51 +00:00
|
|
|
inherit (lib) optional optionals;
|
2020-11-21 19:51:51 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "orc";
|
|
|
|
version = "0.4.32";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-11-21 19:51:51 +00:00
|
|
|
url = "https://gstreamer.freedesktop.org/src/orc/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "1w0qmyj3v9sb2g7ff39pp38b9850y9hyy0bag26ifrby5f7ksvm6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isAarch32 ''
|
|
|
|
# https://gitlab.freedesktop.org/gstreamer/orc/-/issues/20
|
|
|
|
sed -i '/exec_opcodes_sys/d' testsuite/meson.build
|
|
|
|
'';
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
outputs = [ "out" "dev" ]
|
|
|
|
++ optional buildDevDoc "devdoc"
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
outputBin = "dev"; # compilation tools
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
mesonFlags =
|
|
|
|
optional (!buildDevDoc) [ "-Dgtk_doc=disabled" ]
|
|
|
|
;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja ]
|
|
|
|
++ optionals buildDevDoc [ gtk-doc file docbook_xsl ]
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The Oil Runtime Compiler";
|
|
|
|
homepage = "https://gstreamer.freedesktop.org/projects/orc.html";
|
|
|
|
# The source code implementing the Marsenne Twister algorithm is licensed
|
|
|
|
# under the 3-clause BSD license. The rest is 2-clause BSD license.
|
|
|
|
license = with licenses; [ bsd3 bsd2 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
|
|
|
}
|