10 stdenv.mkDerivation (finalAttrs: {
14 src = fetchFromGitHub {
17 rev = "v${finalAttrs.version}";
18 hash = "sha256-/DcYv2fInr8MN1wpOgJHcFWEvW//7SIXccheRfeaTHM=";
22 builtins.map fetchpatch2 [
24 url = "https://github.com/mpeg5/xeve/commit/954ed6e0494cd2438fd15c717c0146e88e582b33.patch?full_index=1";
25 hash = "sha256-//NtOUm1fqPFvOM955N6gF+QgmOdmuVunwx/3s/G/J8=";
28 url = "https://github.com/mpeg5/xeve/commit/07a6f2a6d13dfaa0f73c3752f8cd802c251d8252.patch?full_index=1";
29 hash = "sha256-P9J7Y9O/lb/MSa5oCfft7z764AbLBLZnMmrmPEZPcws=";
32 url = "https://github.com/mpeg5/xeve/commit/0a0f3bd397161253b606bdbeaa518fbe019d24e1.patch?full_index=1";
33 hash = "sha256-PoZpE64gWkTUS4Q+SK+DH1I1Ac0UEzwwnlvpYN16hsI=";
36 url = "https://github.com/mpeg5/xeve/commit/e029f1619ecedbda152b8680641fa10eea9eeace.patch?full_index=1";
37 hash = "sha256-ooIBzNtGSjDgYvTzA8T0KB+QzsUiy14mPpoRqrHF3Pg=";
41 # Backport to 0.5.0 of upstream patch c564ac77c103dbba472df3e13f4733691fd499ed
42 ./0001-CMakeLists.txt-Disable-static-linking-on-Darwin.patch
44 # Rejected upstream, can be dropped when a fix for
45 # https://github.com/mpeg5/xeve/pull/123 is in a version bump.
46 ./0002-sse2neon-Cast-to-variable-type.patch
50 echo v$version > version.txt
53 nativeBuildInputs = [ cmake ];
57 inherit (lib) cmakeBool cmakeFeature optional;
58 inherit (stdenv.hostPlatform) isAarch64 isDarwin;
60 optional isAarch64 (cmakeBool "ARM" true)
61 ++ optional isDarwin (cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin");
63 env.NIX_CFLAGS_COMPILE = builtins.toString (
64 builtins.map (w: "-Wno-" + w) [
65 # Patch addressing an if without a body was rejected upstream, third
66 # line-based comment in this thread, https://github.com/mpeg5/xeve/pull/122#pullrequestreview-2187744305
67 # Evaluate on version bump whether still necessary.
70 # Evaluate on version bump whether still necessary.
71 "parentheses-equality"
72 "unknown-warning-option"
74 # Fixed upstream in 325fd9f94f3fdf0231fa931a31ebb72e63dc3498 but might
75 # change behavior, therefore opted to leave it out for now.
81 ln $dev/include/xeve/* $dev/include/
90 passthru.updateScript = gitUpdater { rev-prefix = "v"; };
93 homepage = "https://github.com/mpeg5/xeve";
94 description = "eXtra-fast Essential Video Encoder, MPEG-5 EVC";
95 license = lib.licenses.bsd3;
96 mainProgram = "xeve_app";
97 maintainers = with lib.maintainers; [ jopejoe1 ];
98 platforms = lib.platforms.all;
99 broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;