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