From bab3fd7c37ee8a5cfd4af960799f08360a3a96aa Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 22 Jun 2022 23:34:12 +0100 Subject: [PATCH] harvid: fix pending upstream inclusion to support parallel builds Without the change parallel build fails as: make -C src make[1]: Entering directory '/build/harvid/src' ld -r -b binary -o seek.o ../doc/seek.js ld -r -b binary -o logo.o ../doc/harvid.jpg make[1]: *** No rule to make target '../libharvid/libharvid.a', needed by 'harvid'. Stop. --- pkgs/tools/video/harvid/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/video/harvid/default.nix b/pkgs/tools/video/harvid/default.nix index 729c26de57ea..90ed6d425869 100644 --- a/pkgs/tools/video/harvid/default.nix +++ b/pkgs/tools/video/harvid/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, ffmpeg, libjpeg, libpng, pkg-config }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, ffmpeg, libjpeg, libpng, pkg-config }: stdenv.mkDerivation rec { pname = "harvid"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-qt6aep7iMF8/lnlT2wLqu6LkFDqzdfsGLZvrOlXttG8="; }; + patches = [ + # Fix pending upstream inclusion to support parallel builds: + # https://github.com/x42/harvid/pull/10 + (fetchpatch { + name = "parallel-build.patch"; + url = "https://github.com/x42/harvid/commit/a3f85c57ad2559558706d9b22989de36452704d9.patch"; + sha256 = "sha256-0aBfM/4XEqM7C1nFw996IVwaeL0tNgMUQ1C3kblOobI="; + }) + ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ ffmpeg libjpeg libpng ];