2019-11-03 23:41:41 +01: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 20:05:55 +01:00
|
|
|
, darwin
|
2015-02-09 22:27:51 +01:00
|
|
|
}:
|
2016-02-05 19:09:01 +01:00
|
|
|
|
2019-11-03 23:41:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2020-07-08 23:52:14 +02:00
|
|
|
version = "2.66";
|
2019-11-03 23:41:41 +01:00
|
|
|
pname = "asymptote";
|
2016-02-02 14:53:49 +01:00
|
|
|
|
2019-11-03 23:41:41 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vectorgraphics";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-07-08 23:52:14 +02:00
|
|
|
sha256 = "0c445j950n6nxgr1zxj7a26daa5d9f3i91506b7r7627s943b1kd";
|
2015-02-09 22:27:51 +01:00
|
|
|
};
|
2016-02-02 14:53:49 +01:00
|
|
|
|
2019-11-03 23:41:41 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
yacc
|
|
|
|
texinfo
|
2018-10-08 20:37:27 +02:00
|
|
|
];
|
|
|
|
|
2019-11-03 23:41:41 +01: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 22:27:51 +01:00
|
|
|
preConfigure = ''
|
2019-11-03 23:41:41 +01:00
|
|
|
HOME=$TMP
|
2010-02-21 18:36:41 +01:00
|
|
|
'';
|
2016-02-02 14:53:49 +01:00
|
|
|
|
2019-11-03 23:41:41 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-latex=$out/share/texmf/tex/latex"
|
|
|
|
"--with-context=$out/share/texmf/tex/context/third"
|
|
|
|
];
|
|
|
|
|
2019-10-30 01:40:49 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";
|
2016-02-02 15:18:41 +01:00
|
|
|
|
2015-02-09 22:27:51 +01:00
|
|
|
postInstall = ''
|
2019-11-03 23:41:41 +01:00
|
|
|
mv $out/share/info/asymptote/*.info $out/share/info/
|
2011-12-24 19:28:23 +01:00
|
|
|
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info
|
2011-12-24 19:03:51 +01:00
|
|
|
rmdir $out/share/info/asymptote
|
2019-11-03 23:41:41 +01:00
|
|
|
rm -f $out/share/info/dir
|
2017-09-23 19:25:56 +02:00
|
|
|
|
2019-11-03 23:41:41 +01:00
|
|
|
rm -rf $out/share/texmf
|
|
|
|
install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
|
2011-12-24 19:03:51 +01:00
|
|
|
'';
|
2016-02-02 14:53:49 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-10-02 22:55:56 +02:00
|
|
|
meta = with stdenv.lib; {
|
2015-02-09 22:27:51 +01:00
|
|
|
description = "A tool for programming graphics intended to replace Metapost";
|
2016-10-02 22:55:56 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.raskin maintainers.peti ];
|
2018-09-12 22:39:38 +02:00
|
|
|
broken = stdenv.isDarwin; # https://github.com/vectorgraphics/asymptote/issues/69
|
2016-10-02 22:55:56 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2010-02-21 18:36:41 +01:00
|
|
|
};
|
|
|
|
}
|