summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/graphics/djv/default.nix20
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/djv/default.nix b/pkgs/applications/graphics/djv/default.nix
index 95a29f243e4..250ff2b32ef 100644
--- a/pkgs/applications/graphics/djv/default.nix
+++ b/pkgs/applications/graphics/djv/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , cmake
 , fetchFromGitHub
+, fetchpatch
 , lib
 , alsa-lib
 , libGL
@@ -107,6 +108,25 @@ stdenv.mkDerivation rec {
   version = djvVersion;
 
   src = djvSrc;
+  patches = [
+    # Pull fix ending upstream inclusion for gcc-12+ support:
+    #   https://github.com/darbyjohnston/DJV/pull/477
+    (fetchpatch {
+      name = "gcc-11-limits.patch";
+      url = "https://github.com/darbyjohnston/DJV/commit/0544ffa1a263a6b8e8518b47277de7601b21b4f4.patch";
+      hash = "sha256-x6ye0xMwTlKyNW4cVFb64RvAayvo71kuOooPj3ROn0g=";
+    })
+    (fetchpatch {
+      name = "gcc-11-IO.patch";
+      url = "https://github.com/darbyjohnston/DJV/commit/ce79f2d2cb35d03322648323858834bff942c792.patch";
+      hash = "sha256-oPbXOnN5Y5QL+bs/bL5eJALu45YHnyTBLQcC8XcJi0c=";
+    })
+    (fetchpatch {
+      name = "gcc-11-sleep_for.patch";
+      url = "https://github.com/darbyjohnston/DJV/commit/6989f43db27f66a7691f6048a2eb3299ef43a92e.patch";
+      hash = "sha256-1kiF3VrZiO+FSoR7NHCbduQ8tMq/Uuu6Z+sQII4xBAw=";
+    })
+  ];
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8bf2278910d..f9b512b67f1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3817,7 +3817,7 @@ with pkgs;
     gst-plugins-good = gst_all_1.gst-plugins-good.override { gtkSupport = true; };
   };
 
-  djv = callPackage ../applications/graphics/djv { stdenv = gcc10StdenvCompat; };
+  djv = callPackage ../applications/graphics/djv { };
 
   dnschef = python3Packages.callPackage ../tools/networking/dnschef { };