about summary refs log tree commit diff
path: root/pkgs/applications/graphics/gimp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2024-03-12 09:43:52 +0100
committerSefa Eyeoglu <contact@scrumplex.net>2024-04-13 20:55:22 +0200
commit26013573a799a46bb7e2de53b5e11335ed9fbdbc (patch)
tree2d7eb48b972e90ef8251b3dc6dc0e0d765873096 /pkgs/applications/graphics/gimp
parentc1616c55dc7bf5c64327c494b0e019889e5801a8 (diff)
gimpPlugins.gap: patch ffmpeg to avoid asm error
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'pkgs/applications/graphics/gimp')
-rw-r--r--pkgs/applications/graphics/gimp/plugins/default.nix19
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index 16d5ab6d33c1a..b628cf8166311 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -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:
@@ -123,6 +123,23 @@ in
 
     nativeBuildInputs = with pkgs; [autoreconfHook];
 
+    postUnpack = ''
+      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 = {