2021-05-23 18:05:26 +00:00
|
|
|
{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo4, getopt, readline, texlive }:
|
2011-07-07 21:53:21 +00:00
|
|
|
|
2021-05-09 09:39:58 +00:00
|
|
|
lib.fix (eukleides: stdenv.mkDerivation rec {
|
|
|
|
pname = "eukleides";
|
2011-07-07 21:53:21 +00:00
|
|
|
version = "1.5.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-05-09 09:39:58 +00:00
|
|
|
url = "http://www.eukleides.org/files/${pname}-${version}.tar.bz2";
|
2011-07-07 21:53:21 +00:00
|
|
|
sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
|
|
|
|
};
|
|
|
|
|
2021-05-23 18:04:07 +00:00
|
|
|
patches = [
|
|
|
|
# use $CC instead of hardcoded gcc
|
|
|
|
./use-CC.patch
|
|
|
|
# allow PostScript transparency in epstopdf call
|
|
|
|
./gs-allowpstransparency.patch
|
|
|
|
];
|
2021-05-16 10:41:49 +00:00
|
|
|
|
2021-05-23 18:05:26 +00:00
|
|
|
nativeBuildInputs = [ bison flex texinfo4 makeWrapper ];
|
2011-07-07 21:53:21 +00:00
|
|
|
|
2021-05-23 18:02:36 +00:00
|
|
|
buildInputs = [ getopt readline ];
|
2021-05-09 09:39:58 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace mktexlsr true
|
|
|
|
|
|
|
|
substituteInPlace doc/Makefile \
|
|
|
|
--replace ginstall-info install-info
|
|
|
|
|
|
|
|
substituteInPlace Config \
|
|
|
|
--replace '/usr/local' "$out" \
|
|
|
|
--replace '$(SHARE_DIR)/texmf' "$tex"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-05-23 18:02:36 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/euktoeps \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ getopt ]}
|
|
|
|
'';
|
|
|
|
|
2021-05-09 09:39:58 +00:00
|
|
|
outputs = [ "out" "doc" "tex" ];
|
|
|
|
|
|
|
|
passthru.tlType = "run";
|
2021-05-23 18:02:36 +00:00
|
|
|
passthru.pkgs = [ eukleides.tex ]
|
|
|
|
# packages needed by euktoeps, euktopdf and eukleides.sty
|
|
|
|
++ (with texlive; collection-pstricks.pkgs ++ epstopdf.pkgs ++ iftex.pkgs ++ moreverb.pkgs);
|
2011-07-07 21:53:21 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Geometry Drawing Language";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.eukleides.org/";
|
2021-05-09 11:39:46 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2011-07-07 21:53:21 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Eukleides is a computer language devoted to elementary plane
|
|
|
|
geometry. It aims to be a fairly comprehensive system to create
|
|
|
|
geometric figures, either static or dynamic. Eukleides allows to
|
|
|
|
handle basic types of data: numbers and strings, as well as
|
|
|
|
geometric types of data: points, vectors, sets (of points), lines,
|
|
|
|
circles and conics.
|
|
|
|
'';
|
|
|
|
|
2021-05-16 10:41:49 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2011-07-07 21:53:21 +00:00
|
|
|
};
|
2021-05-09 09:39:58 +00:00
|
|
|
})
|