Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

gimpPlugins.gap: patch ffmpeg to avoid asm error #295257

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 18 additions & 1 deletion pkgs/applications/graphics/gimp/plugins/default.nix
Expand Up @@ -5,7 +5,7 @@
{ config, lib, pkgs }:

let
inherit (pkgs) stdenv fetchurl fetchpatch pkg-config intltool glib fetchFromGitHub fetchFromGitLab;
inherit (pkgs) stdenv fetchurl fetchpatch fetchpatch2 pkg-config intltool glib fetchFromGitHub fetchFromGitLab;
in

lib.makeScope pkgs.newScope (self:
Expand Down Expand Up @@ -123,6 +123,23 @@ in

nativeBuildInputs = with pkgs; [autoreconfHook];

postUnpack = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we unvendor ffmpeg?

Copy link
Member Author

@Scrumplex Scrumplex Mar 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried yet. The version that's being used by gap is more than a decade old

Edit: I also thought we should add at least a handful of ffmpeg CVEs to this package because of that :/

tar -xf $sourceRoot/extern_libs/ffmpeg.tar.gz -C $sourceRoot/extern_libs
'';

postPatch = let
ffmpegPatch = fetchpatch2 {
name = "fix-ffmpeg-binutil-2.41.patch";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb";
hash = "sha256-vLSltvZVMcQ0CnkU0A29x6fJSywE8/aU+Mp9os8DZYY=";
};
in ''
patch -Np1 -i ${ffmpegPatch} -d extern_libs/ffmpeg
ffmpegSrc=$(realpath extern_libs/ffmpeg)
'';

configureFlags = ["--with-ffmpegsrcdir=${placeholder "ffmpegSrc"}"];

hardeningDisable = [ "format" ];

env = {
Expand Down