tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nufraw: refactor, add patch for exiv2 0.28
Weijia Wang
2 years ago
880b7a5f
d90e8fdf
+21
-27
2 changed files
expand all
collapse all
unified
split
pkgs
applications
graphics
nufraw
default.nix
move-extern-c.patch
+21
-6
pkgs/applications/graphics/nufraw/default.nix
···
1
-
{ stdenv
0
2
, fetchurl
3
-
, lib
4
5
, autoreconfHook
6
, bzip2
···
49
"--enable-dst-correction"
50
];
51
0
0
52
postInstall = lib.optionalString addThumbnailer ''
53
mkdir -p $out/share/thumbnailers
54
substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer
55
'';
56
57
-
# Fixes an upstream issue where headers with templates were included in an extern-C scope
58
-
# which caused the build to fail
59
-
patches = [ ./move-extern-c.patch ];
0
0
0
0
0
0
0
0
0
0
0
0
60
61
meta = with lib; {
62
homepage = "https://nufraw.sourceforge.io/";
···
70
'';
71
license = licenses.gpl2Plus;
72
maintainers = with maintainers; [ asbachb ];
73
-
platforms = [ "x86_64-linux" "i686-linux" ];
74
};
75
}
···
1
+
{ lib
2
+
, stdenv
3
, fetchurl
4
+
, fetchpatch
5
6
, autoreconfHook
7
, bzip2
···
50
"--enable-dst-correction"
51
];
52
53
+
env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
54
+
55
postInstall = lib.optionalString addThumbnailer ''
56
mkdir -p $out/share/thumbnailers
57
substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer
58
'';
59
60
+
patches = [
61
+
# Fixes an upstream issue where headers with templates were included in an extern-C scope
62
+
# which caused the build to fail
63
+
(fetchpatch {
64
+
name = "0001-nufraw-glib-2.70.patch";
65
+
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/gimp-nufraw/-/raw/3405bc864752dbd04f2d182a21b4108d6cc3aa95/0001-nufraw-glib-2.70.patch";
66
+
hash = "sha256-XgzgjikWTcqymHa7bKmruNZaeb2/lpN19HXoRUt5rTk=";
67
+
})
68
+
] ++ lib.optionals (lib.versionAtLeast exiv2.version "0.28") [
69
+
(fetchpatch {
70
+
name = "0002-exiv2-error.patch";
71
+
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/gimp-nufraw/-/raw/3405bc864752dbd04f2d182a21b4108d6cc3aa95/0002-exiv2-error.patch";
72
+
hash = "sha256-40/Wwk1sWiaIWp077EYgP8jFO4k1cvf30heRDMYJw3M=";
73
+
})
74
+
];
75
76
meta = with lib; {
77
homepage = "https://nufraw.sourceforge.io/";
···
85
'';
86
license = licenses.gpl2Plus;
87
maintainers = with maintainers; [ asbachb ];
88
+
platforms = platforms.linux;
89
};
90
}
-21
pkgs/applications/graphics/nufraw/move-extern-c.patch
···
1
-
diff --git a/uf_glib.h b/uf_glib.h
2
-
index c1a17bd..8a10800 100644
3
-
--- a/uf_glib.h
4
-
+++ b/uf_glib.h
5
-
@@ -13,13 +13,13 @@
6
-
#ifndef _UF_GLIB_H
7
-
#define _UF_GLIB_H
8
-
9
-
+#include <glib.h>
10
-
+#include <glib/gstdio.h>
11
-
+
12
-
#ifdef __cplusplus
13
-
extern "C" {
14
-
#endif
15
-
16
-
-#include <glib.h>
17
-
-#include <glib/gstdio.h>
18
-
-
19
-
// g_win32_locale_filename_from_utf8 is needed only on win32
20
-
#ifdef _WIN32
21
-
#define uf_win32_locale_filename_from_utf8(__some_string__) \
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0