tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
fim: fix cross / strictDeps build
FliegendeWurst
10 months ago
06f6e784
4534205b
+53
-5
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
fi
fim
native-tools.patch
package.nix
+26
pkgs/by-name/fi/fim/native-tools.patch
···
1
1
+
diff --git a/doc/Makefile.in b/doc/Makefile.in
2
2
+
index be8ebe5..13ae676 100644
3
3
+
--- a/doc/Makefile.in
4
4
+
+++ b/doc/Makefile.in
5
5
+
@@ -684,7 +684,7 @@ fimgs.man.html: fimgs.man
6
6
+
if test ! -s $@ ; then $(MAN2TXT) ./$< > $<.txt && $(srcdir)/vim2html.pl tags $<.txt && mv $<.txt.html $@ ; fi
7
7
+
8
8
+
doctags$(EXEEXT): doctags.c
9
9
+
- $(CC) -o $@ $<
10
10
+
+ @cc_for_build@ -o $@ $<
11
11
+
12
12
+
#clean:
13
13
+
# $(RM) -f doctags.o doctags$(EXEEXT) FIM.html tags fim-stylesheet.css fim.man.html fimgs.man.html
14
14
+
diff --git a/src/Makefile.in b/src/Makefile.in
15
15
+
index 76f5e1e..027159c 100644
16
16
+
--- a/src/Makefile.in
17
17
+
+++ b/src/Makefile.in
18
18
+
@@ -1132,7 +1132,7 @@ help-acm.cpp: fim.h
19
19
+
$(ECHO) '//#endif' >> $@
20
20
+
21
21
+
b2ba$(EXEEXT): b2ba.c
22
22
+
- $(CC) -o $@ $<
23
23
+
+ @cc_for_build@ -o $@ $<
24
24
+
25
25
+
@FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE@@HAVE_RUNNABLE_TESTS_TRUE@default_font_byte_array.h: $(FIM_CUSTOM_HARDCODED_CONSOLEFONT) b2ba$(EXEEXT)
26
26
+
@FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE@@HAVE_RUNNABLE_TESTS_TRUE@ ./b2ba$(EXEEXT) < $< > $@
+27
-5
pkgs/by-name/fi/fim/package.nix
···
4
4
autoconf,
5
5
automake,
6
6
pkg-config,
7
7
+
substituteAll,
7
8
lib,
8
9
perl,
9
10
flex,
10
11
bison,
11
12
readline,
12
13
libexif,
13
13
-
x11Support ? true,
14
14
+
bash,
15
15
+
buildPackages,
16
16
+
# SDL depends on Qt, which doesn't cross-compile
17
17
+
x11Support ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform),
14
18
SDL,
15
19
svgSupport ? true,
16
20
inkscape,
···
35
39
sha256 = "sha256-/p7bjeZM46DJOQ9sgtebhkNpBPj2RJYY3dMXhzHnNmg=";
36
40
};
37
41
42
42
+
patches = [
43
43
+
# build tools with a build compiler
44
44
+
(substituteAll {
45
45
+
src = ./native-tools.patch;
46
46
+
cc_for_build = lib.getExe buildPackages.stdenv.cc;
47
47
+
})
48
48
+
];
49
49
+
38
50
postPatch = ''
39
39
-
substituteInPlace doc/vim2html.pl \
40
40
-
--replace /usr/bin/perl ${perl}/bin/perl
51
51
+
patchShebangs --build doc/vim2html.pl
41
52
'';
42
53
43
54
nativeBuildInputs = [
44
55
autoconf
45
56
automake
57
57
+
bison
58
58
+
flex
59
59
+
perl
46
60
pkg-config
47
61
];
48
62
49
63
buildInputs =
50
64
[
51
51
-
perl
52
65
flex
53
53
-
bison
54
66
readline
55
67
libexif
68
68
+
bash
56
69
]
57
70
++ lib.optional x11Support SDL
58
71
++ lib.optional svgSupport inkscape
···
62
75
++ lib.optional jpegSupport libjpeg
63
76
++ lib.optional pngSupport libpng;
64
77
78
78
+
configureFlags = [
79
79
+
# mmap works on all relevant platforms
80
80
+
"ac_cv_func_mmap_fixed_mapped=yes"
81
81
+
# system regexp works on all relevant platforms
82
82
+
"fim_cv_regex_broken=no"
83
83
+
];
84
84
+
85
85
+
env.LIBAA_CONFIG = lib.getExe' (lib.getDev aalib) "aalib-config";
86
86
+
env.LIBPNG_CONFIG = lib.getExe' (lib.getDev libpng) "libpng-config";
65
87
env.NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL";
66
88
67
89
meta = with lib; {