tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
eukleides: unbreak, switch to mirror
Petr Zahradnik
7 months ago
055b892a
dbe4980a
+47
-10
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
eu
eukleides
package.nix
texinfo-escape.patch
+28
-10
pkgs/by-name/eu/eukleides/package.nix
···
1
{
2
lib,
3
stdenv,
4
-
fetchurl,
5
bison,
6
flex,
7
makeWrapper,
8
-
texinfo4,
9
getopt,
10
readline,
0
11
texlive,
0
12
}:
13
14
stdenv.mkDerivation (finalAttrs: {
15
pname = "eukleides";
16
version = "1.5.4";
17
18
-
src = fetchurl {
19
-
url = "http://www.eukleides.org/files/eukleides-${finalAttrs.version}.tar.bz2";
20
-
sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
0
0
0
0
21
};
22
23
patches = [
···
25
./use-CC.patch
26
# allow PostScript transparency in epstopdf call
27
./gs-allowpstransparency.patch
0
0
28
];
29
30
nativeBuildInputs = [
31
bison
32
flex
33
-
texinfo4
34
makeWrapper
35
];
36
···
41
42
preConfigure = ''
43
substituteInPlace Makefile \
44
-
--replace mktexlsr true
45
46
substituteInPlace doc/Makefile \
47
-
--replace ginstall-info install-info
48
49
substituteInPlace Config \
50
-
--replace '/usr/local' "$out" \
51
-
--replace '$(SHARE_DIR)/texmf' "$tex"
52
'';
53
54
# Workaround build failure on -fno-common toolchains like upstream
···
56
# ld: eukleides_build/triangle.o:(.bss+0x28): multiple definition of `A';
57
# eukleides_build/quadrilateral.o:(.bss+0x18): first defined here
58
env.NIX_CFLAGS_COMPILE = "-fcommon";
0
0
0
0
0
0
0
59
60
preInstall = ''
61
mkdir -p $out/bin
···
83
];
84
pkgs = [ finalAttrs.finalPackage.tex ];
85
};
0
0
0
0
86
87
meta = {
88
description = "Geometry Drawing Language";
···
1
{
2
lib,
3
stdenv,
4
+
fetchFromGitLab,
5
bison,
6
flex,
7
makeWrapper,
0
8
getopt,
9
readline,
10
+
texinfo,
11
texlive,
12
+
versionCheckHook,
13
}:
14
15
stdenv.mkDerivation (finalAttrs: {
16
pname = "eukleides";
17
version = "1.5.4";
18
19
+
src = fetchFromGitLab {
20
+
# official upstream www.eukleides.org is down
21
+
domain = "salsa.debian.org";
22
+
owner = "georgesk";
23
+
repo = "eukleides";
24
+
rev = "upstream/${finalAttrs.version}";
25
+
hash = "sha256-keX7k14X/97zHh87A/7vUsfGc/S6fByd+rewW+LkJeM=";
26
};
27
28
patches = [
···
30
./use-CC.patch
31
# allow PostScript transparency in epstopdf call
32
./gs-allowpstransparency.patch
33
+
# fix curly brace escaping in eukleides.texi for newer texinfo compatiblity
34
+
./texinfo-escape.patch
35
];
36
37
nativeBuildInputs = [
38
bison
39
flex
40
+
texinfo
41
makeWrapper
42
];
43
···
48
49
preConfigure = ''
50
substituteInPlace Makefile \
51
+
--replace-fail mktexlsr true
52
53
substituteInPlace doc/Makefile \
54
+
--replace-fail ginstall-info install-info
55
56
substituteInPlace Config \
57
+
--replace-fail '/usr/local' "$out" \
58
+
--replace-fail '$(SHARE_DIR)/texmf' "$tex"
59
'';
60
61
# Workaround build failure on -fno-common toolchains like upstream
···
63
# ld: eukleides_build/triangle.o:(.bss+0x28): multiple definition of `A';
64
# eukleides_build/quadrilateral.o:(.bss+0x18): first defined here
65
env.NIX_CFLAGS_COMPILE = "-fcommon";
66
+
67
+
preBuild = ''
68
+
mkdir build/eukleides_build
69
+
mkdir build/euktopst_build
70
+
'';
71
+
72
+
enableParallelBuilding = true;
73
74
preInstall = ''
75
mkdir -p $out/bin
···
97
];
98
pkgs = [ finalAttrs.finalPackage.tex ];
99
};
100
+
101
+
doInstallCheck = true;
102
+
nativeInstallCheckInputs = [ versionCheckHook ];
103
+
versionCheckProgramArg = "--version";
104
105
meta = {
106
description = "Geometry Drawing Language";
+19
pkgs/by-name/eu/eukleides/texinfo-escape.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
--- a/doc/eukleides.texi
2
+
+++ b/doc/eukleides.texi
3
+
@@ -6,12 +6,12 @@
4
+
5
+
% ------------------------------------------------------------------------------
6
+
7
+
-\def\LaTeX{L\kern-.34em\raise.49ex\hbox{\sevenrm A}\kern-.18em\TeX}
8
+
-\def\mdeg{$^\circ$}
9
+
+\def\LaTeX@{L\kern-.34em\raise.49ex\hbox@{\sevenrm A@}\kern-.18em\TeX@}
10
+
+\def\mdeg@{$^\circ$@}
11
+
\font\degfont=cmtt8
12
+
-\def\deg{\raise.7ex\hbox{\degfont o}}
13
+
-\def\exm#1{\noindent{\textit Example:}\quad{\texttt #1}}
14
+
-\def\exmp{\noindent{\textit Example:}}
15
+
+\def\deg@{\raise.7ex\hbox@{\degfont o@}@}
16
+
+\def\exm#1@{\noindent@{\textit Example:@}\quad@{\texttt #1@}@}
17
+
+\def\exmp@{\noindent@{\textit Example:@}@}
18
+
19
+
% ------------------------------------------------------------------------------