summary refs log tree commit diff
path: root/pkgs/applications/graphics/nufraw/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:21 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:48 +0100
commit048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch)
treef8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/applications/graphics/nufraw/default.nix
parent030c5028b07afcedce7c5956015c629486cc79d9 (diff)
parent4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff)
downloadnixpkgs-rootfs.tar
nixpkgs-rootfs.tar.gz
nixpkgs-rootfs.tar.bz2
nixpkgs-rootfs.tar.lz
nixpkgs-rootfs.tar.xz
nixpkgs-rootfs.tar.zst
nixpkgs-rootfs.zip
Rebase onto e4ad989506ec7d71f7302cc3067abd82730a4beb HEAD rootfs
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/applications/graphics/nufraw/default.nix')
-rw-r--r--pkgs/applications/graphics/nufraw/default.nix27
1 files changed, 21 insertions, 6 deletions
diff --git a/pkgs/applications/graphics/nufraw/default.nix b/pkgs/applications/graphics/nufraw/default.nix
index f6031bea069..8b5966bbaf0 100644
--- a/pkgs/applications/graphics/nufraw/default.nix
+++ b/pkgs/applications/graphics/nufraw/default.nix
@@ -1,6 +1,7 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchurl
-, lib
+, fetchpatch
 
 , autoreconfHook
 , bzip2
@@ -49,14 +50,28 @@ stdenv.mkDerivation rec {
     "--enable-dst-correction"
   ];
 
+  env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
+
   postInstall = lib.optionalString addThumbnailer ''
     mkdir -p $out/share/thumbnailers
     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 ];
+  patches = [
+    # Fixes an upstream issue where headers with templates were included in an extern-C scope
+    # which caused the build to fail
+    (fetchpatch {
+      name = "0001-nufraw-glib-2.70.patch";
+      url = "https://gitlab.archlinux.org/archlinux/packaging/packages/gimp-nufraw/-/raw/3405bc864752dbd04f2d182a21b4108d6cc3aa95/0001-nufraw-glib-2.70.patch";
+      hash = "sha256-XgzgjikWTcqymHa7bKmruNZaeb2/lpN19HXoRUt5rTk=";
+    })
+  ] ++ lib.optionals (lib.versionAtLeast exiv2.version "0.28") [
+    (fetchpatch {
+      name = "0002-exiv2-error.patch";
+      url = "https://gitlab.archlinux.org/archlinux/packaging/packages/gimp-nufraw/-/raw/3405bc864752dbd04f2d182a21b4108d6cc3aa95/0002-exiv2-error.patch";
+      hash = "sha256-40/Wwk1sWiaIWp077EYgP8jFO4k1cvf30heRDMYJw3M=";
+    })
+  ];
 
   meta = with lib; {
     homepage = "https://nufraw.sourceforge.io/";
@@ -70,6 +85,6 @@ stdenv.mkDerivation rec {
       '';
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ asbachb ];
-    platforms   = [ "x86_64-linux" "i686-linux" ];
+    platforms = platforms.linux;
   };
 }