2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, file
|
|
|
|
, docbook_xsl
|
|
|
|
, gtk-doc ? null
|
2020-11-21 19:51:51 +00:00
|
|
|
, buildDevDoc ? gtk-doc != null
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, gnuradio
|
|
|
|
, gst_all_1
|
|
|
|
, qt6
|
|
|
|
, vips
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
}: 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";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.4.38";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-pVqY1HclZ6o/rtj7hNVAw9t36roW0+LhCwRPvJIoZo0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
|
2022-01-26 04:04:25 +00:00
|
|
|
# This benchmark times out on Hydra.nixos.org
|
|
|
|
sed -i '/memcpy_speed/d' testsuite/meson.build
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
|
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 =
|
2022-10-30 15:09:59 +00:00
|
|
|
optionals (!buildDevDoc) [ "-Dgtk_doc=disabled" ]
|
2020-11-21 19:51:51 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja ]
|
|
|
|
++ optionals buildDevDoc [ gtk-doc file docbook_xsl ]
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
# https://gitlab.freedesktop.org/gstreamer/orc/-/issues/41
|
|
|
|
doCheck = !(stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12");
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (gst_all_1) gst-plugins-good gst-plugins-bad gst-plugins-ugly;
|
|
|
|
inherit gnuradio vips;
|
|
|
|
qt6-qtmultimedia = qt6.qtmultimedia;
|
|
|
|
};
|
|
|
|
|
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";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://cgit.freedesktop.org/gstreamer/orc/plain/RELEASE?h=${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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 = [ ];
|
|
|
|
};
|
|
|
|
}
|