eukleides: unbreak, switch to mirror; texinfo4: drop (#415009)

This commit is contained in:
Peder Bergebakken Sundt 2025-06-09 02:04:50 +02:00 committed by GitHub
commit 047f31d25b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 48 additions and 31 deletions

View file

@ -1,23 +1,28 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitLab,
bison,
flex,
makeWrapper,
texinfo4,
getopt,
readline,
texinfo,
texlive,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "eukleides";
version = "1.5.4";
src = fetchurl {
url = "http://www.eukleides.org/files/eukleides-${finalAttrs.version}.tar.bz2";
sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
src = fetchFromGitLab {
# official upstream www.eukleides.org is down
domain = "salsa.debian.org";
owner = "georgesk";
repo = "eukleides";
rev = "upstream/${finalAttrs.version}";
hash = "sha256-keX7k14X/97zHh87A/7vUsfGc/S6fByd+rewW+LkJeM=";
};
patches = [
@ -25,12 +30,14 @@ stdenv.mkDerivation (finalAttrs: {
./use-CC.patch
# allow PostScript transparency in epstopdf call
./gs-allowpstransparency.patch
# fix curly brace escaping in eukleides.texi for newer texinfo compatiblity
./texinfo-escape.patch
];
nativeBuildInputs = [
bison
flex
texinfo4
texinfo
makeWrapper
];
@ -41,14 +48,14 @@ stdenv.mkDerivation (finalAttrs: {
preConfigure = ''
substituteInPlace Makefile \
--replace mktexlsr true
--replace-fail mktexlsr true
substituteInPlace doc/Makefile \
--replace ginstall-info install-info
--replace-fail ginstall-info install-info
substituteInPlace Config \
--replace '/usr/local' "$out" \
--replace '$(SHARE_DIR)/texmf' "$tex"
--replace-fail '/usr/local' "$out" \
--replace-fail '$(SHARE_DIR)/texmf' "$tex"
'';
# Workaround build failure on -fno-common toolchains like upstream
@ -57,6 +64,13 @@ stdenv.mkDerivation (finalAttrs: {
# eukleides_build/quadrilateral.o:(.bss+0x18): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
preBuild = ''
mkdir build/eukleides_build
mkdir build/euktopst_build
'';
enableParallelBuilding = true;
preInstall = ''
mkdir -p $out/bin
'';
@ -84,6 +98,10 @@ stdenv.mkDerivation (finalAttrs: {
pkgs = [ finalAttrs.finalPackage.tex ];
};
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "Geometry Drawing Language";
homepage = "http://www.eukleides.org/";

View file

@ -0,0 +1,19 @@
--- a/doc/eukleides.texi
+++ b/doc/eukleides.texi
@@ -6,12 +6,12 @@
% ------------------------------------------------------------------------------
-\def\LaTeX{L\kern-.34em\raise.49ex\hbox{\sevenrm A}\kern-.18em\TeX}
-\def\mdeg{$^\circ$}
+\def\LaTeX@{L\kern-.34em\raise.49ex\hbox@{\sevenrm A@}\kern-.18em\TeX@}
+\def\mdeg@{$^\circ$@}
\font\degfont=cmtt8
-\def\deg{\raise.7ex\hbox{\degfont o}}
-\def\exm#1{\noindent{\textit Example:}\quad{\texttt #1}}
-\def\exmp{\noindent{\textit Example:}}
+\def\deg@{\raise.7ex\hbox@{\degfont o@}@}
+\def\exm#1@{\noindent@{\textit Example:@}\quad@{\texttt #1@}@}
+\def\exmp@{\noindent@{\textit Example:@}@}
% ------------------------------------------------------------------------------

View file

@ -69,25 +69,6 @@ let
};
in
{
texinfo413 = stdenv.mkDerivation (finalAttrs: {
pname = "texinfo";
version = "4.13a";
src = fetchurl {
url = "mirror://gnu/texinfo/texinfo-${finalAttrs.version}.tar.lzma";
hash = "sha256-bSiwzq6GbjU2FC/FUuejvJ+EyDAxGcJXMbJHju9kyeU=";
};
buildInputs = [ ncurses ];
nativeBuildInputs = [ xz ];
# Disabled because we don't have zdiff in the stdenv bootstrap.
#doCheck = true;
meta = meta // {
branch = finalAttrs.version;
};
});
texinfo6_5 = buildTexinfo {
version = "6.5";
hash = "sha256-d3dLP0oGwgcFzC7xyASGRCLjz5UjXpZbHwCkbffaX2I=";

View file

@ -1899,6 +1899,7 @@ mapAliases {
tepl = libgedit-tepl; # Added 2024-04-29
termplay = throw "'termplay' has been removed due to lack of maintenance upstream"; # Added 2025-01-25
testVersion = testers.testVersion; # Added 2022-04-20
texinfo4 = throw "'texinfo4' has been removed in favor of the latest version"; # Added 2025-06-08
tezos-rust-libs = ligo; # Added 2025-06-03
tfplugindocs = terraform-plugin-docs; # Added 2023-11-01
thiefmd = throw "'thiefmd' has been removed due to lack of maintenance upstream and incompatible with newer Pandoc. Please use 'apostrophe' or 'folio' instead"; # Added 2025-02-20

View file

@ -7689,13 +7689,11 @@ with pkgs;
texinfoPackages = callPackages ../development/tools/misc/texinfo/packages.nix { };
inherit (texinfoPackages)
texinfo413
texinfo6_5 # needed for allegro
texinfo6_7 # needed for gpm, iksemel and fwknop
texinfo6
texinfo7
;
texinfo4 = texinfo413; # needed for eukleides and singular
texinfo = texinfo7;
texinfoInteractive = texinfo.override { interactive = true; };