From 5e903ee0792c15804c8e648979d5bc9023d49a13 Mon Sep 17 00:00:00 2001 From: polygon Date: Thu, 3 Jun 2021 13:31:02 +0200 Subject: [PATCH] nufraw: fix build Sources would include glib-headers from within an extern-C scope. Since glib-headers contained templates, this would fail. Add a patch to move the header includes outside of the extern-C scope. --- pkgs/applications/graphics/nufraw/default.nix | 4 ++++ .../graphics/nufraw/move-extern-c.patch | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/applications/graphics/nufraw/move-extern-c.patch diff --git a/pkgs/applications/graphics/nufraw/default.nix b/pkgs/applications/graphics/nufraw/default.nix index e49093c568c..f6031bea069 100644 --- a/pkgs/applications/graphics/nufraw/default.nix +++ b/pkgs/applications/graphics/nufraw/default.nix @@ -54,6 +54,10 @@ stdenv.mkDerivation rec { substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer ''; + # Fixes an upstream issue where headers with templates were included in an extern-C scope + # which caused the build to fail + patches = [ ./move-extern-c.patch ]; + meta = with lib; { homepage = "https://nufraw.sourceforge.io/"; description = "Utility to read and manipulate raw images from digital cameras"; diff --git a/pkgs/applications/graphics/nufraw/move-extern-c.patch b/pkgs/applications/graphics/nufraw/move-extern-c.patch new file mode 100644 index 00000000000..43a4942d3e6 --- /dev/null +++ b/pkgs/applications/graphics/nufraw/move-extern-c.patch @@ -0,0 +1,21 @@ +diff --git a/uf_glib.h b/uf_glib.h +index c1a17bd..8a10800 100644 +--- a/uf_glib.h ++++ b/uf_glib.h +@@ -13,13 +13,13 @@ + #ifndef _UF_GLIB_H + #define _UF_GLIB_H + ++#include ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif + +-#include +-#include +- + // g_win32_locale_filename_from_utf8 is needed only on win32 + #ifdef _WIN32 + #define uf_win32_locale_filename_from_utf8(__some_string__) \