2019-11-03 22:41:41 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl
|
|
|
|
, autoreconfHook, bison, glm, yacc, flex
|
|
|
|
, freeglut, ghostscriptX, imagemagick, fftw
|
|
|
|
, boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv
|
|
|
|
, python3Packages
|
|
|
|
, zlib, perl
|
|
|
|
, texLive, texinfo
|
2017-02-06 19:05:55 +00:00
|
|
|
, darwin
|
2015-02-09 21:27:51 +00:00
|
|
|
}:
|
2016-02-05 18:09:01 +00:00
|
|
|
|
2019-11-03 22:41:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-01-20 03:07:05 +00:00
|
|
|
version = "2.62";
|
2019-11-03 22:41:41 +00:00
|
|
|
pname = "asymptote";
|
2016-02-02 13:53:49 +00:00
|
|
|
|
2019-11-03 22:41:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vectorgraphics";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-01-20 03:07:05 +00:00
|
|
|
sha256 = "1lb3a8r2gv0437viwy25s34g05x5v81gk0nxlgx7hzwv7b9zkv5s";
|
2015-02-09 21:27:51 +00:00
|
|
|
};
|
2016-02-02 13:53:49 +00:00
|
|
|
|
2019-11-03 22:41:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
yacc
|
|
|
|
texinfo
|
2018-10-08 19:37:27 +01:00
|
|
|
];
|
|
|
|
|
2019-11-03 22:41:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
ghostscriptX imagemagick fftw
|
|
|
|
boehmgc ncurses readline gsl libsigsegv
|
|
|
|
zlib perl
|
|
|
|
texLive
|
|
|
|
] ++ (with python3Packages; [
|
|
|
|
python
|
|
|
|
pyqt5
|
|
|
|
]);
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glm
|
|
|
|
] ++ stdenv.lib.optionals stdenv.isLinux [
|
|
|
|
freeglut libGLU libGL mesa.osmesa
|
|
|
|
] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
|
|
OpenGL GLUT Cocoa
|
|
|
|
]);
|
|
|
|
|
2015-02-09 21:27:51 +00:00
|
|
|
preConfigure = ''
|
2019-11-03 22:41:41 +00:00
|
|
|
HOME=$TMP
|
2010-02-21 17:36:41 +00:00
|
|
|
'';
|
2016-02-02 13:53:49 +00:00
|
|
|
|
2019-11-03 22:41:41 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-latex=$out/share/texmf/tex/latex"
|
|
|
|
"--with-context=$out/share/texmf/tex/context/third"
|
|
|
|
];
|
|
|
|
|
2019-10-30 00:40:49 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";
|
2016-02-02 14:18:41 +00:00
|
|
|
|
2015-02-09 21:27:51 +00:00
|
|
|
postInstall = ''
|
2019-11-03 22:41:41 +00:00
|
|
|
mv $out/share/info/asymptote/*.info $out/share/info/
|
2011-12-24 18:28:23 +00:00
|
|
|
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info
|
2011-12-24 18:03:51 +00:00
|
|
|
rmdir $out/share/info/asymptote
|
2019-11-03 22:41:41 +00:00
|
|
|
rm -f $out/share/info/dir
|
2017-09-23 18:25:56 +01:00
|
|
|
|
2019-11-03 22:41:41 +00:00
|
|
|
rm -rf $out/share/texmf
|
|
|
|
install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
|
2011-12-24 18:03:51 +00:00
|
|
|
'';
|
2016-02-02 13:53:49 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-10-02 21:55:56 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-02-09 21:27:51 +00:00
|
|
|
description = "A tool for programming graphics intended to replace Metapost";
|
2016-10-02 21:55:56 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.raskin maintainers.peti ];
|
2018-09-12 21:39:38 +01:00
|
|
|
broken = stdenv.isDarwin; # https://github.com/vectorgraphics/asymptote/issues/69
|
2016-10-02 21:55:56 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2010-02-21 17:36:41 +00:00
|
|
|
};
|
|
|
|
}
|