Merge pull request #240004 from xworld21/asymptote-xasy-lsp

asymptote: make xasy work, enable lsp
This commit is contained in:
7c6f434c 2023-06-26 22:52:29 +00:00 committed by GitHub
commit d9895270b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 73 additions and 8 deletions

View File

@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, speg
}:
buildPythonPackage rec {
pname = "cson";
version = "0.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-7owBZvzR9ReJiHGX4+g1Sse++jlvwpcGvOta8l7cngE=";
};
propagatedBuildInputs = [ speg ];
pythonImportChecks = [ "cson" ];
meta = with lib; {
description = "A python parser for the Coffeescript Object Notation (CSON)";
homepage = "https://github.com/avakar/pycson";
license = with licenses; [ mit ];
maintainers = with maintainers; [ xworld21 ];
};
}

View File

@ -0,0 +1,28 @@
{ lib
, buildPythonPackage
, fetchPypi
, speg
}:
buildPythonPackage rec {
pname = "speg";
version = "0.3";
src = fetchPypi {
inherit pname version;
hash = "sha256-EMvvR+Fo38YvFNtXXPHEKAN6K4gc7mw8/O2gQ5wkPnE=";
extension = "zip";
};
pythonImportChecks = [ "speg" ];
# checks fail for seemingly spurious reasons
doCheck = false;
meta = with lib; {
description = "A PEG-based parser interpreter with memoization (in time)";
homepage = "https://github.com/avakar/speg";
license = with licenses; [ mit ];
maintainers = with maintainers; [ xworld21 ];
};
}

View File

@ -1,8 +1,8 @@
{ lib, stdenv, fetchFromGitHub, fetchurl, fetchpatch
, autoreconfHook, bison, glm, flex
, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake
, freeglut, ghostscriptX, imagemagick, fftw
, boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv
, python3Packages
, python3, qtbase, qtsvg, boost
, zlib, perl, curl
, texLive, texinfo
, darwin
@ -25,17 +25,17 @@ stdenv.mkDerivation rec {
flex
bison
texinfo
wrapQtAppsHook
cmake
];
buildInputs = [
ghostscriptX imagemagick fftw
boehmgc ncurses readline gsl libsigsegv
zlib perl curl
zlib perl curl qtbase qtsvg boost
texLive
] ++ (with python3Packages; [
python
pyqt5
]);
(python3.withPackages (ps: with ps; [ cson numpy pyqt5 ]))
];
propagatedBuildInputs = [
glm
@ -45,6 +45,8 @@ stdenv.mkDerivation rec {
OpenGL GLUT Cocoa
]);
dontWrapQtApps = true;
preConfigure = ''
HOME=$TMP
'';
@ -57,6 +59,9 @@ stdenv.mkDerivation rec {
env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";
postInstall = ''
rm "$out"/bin/xasy
makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin
mv $out/share/info/asymptote/*.info $out/share/info/
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info
rmdir $out/share/info/asymptote
@ -66,6 +71,8 @@ stdenv.mkDerivation rec {
install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
'';
dontUseCmakeConfigure = true;
enableParallelBuilding = true;
# Missing install depends:
# ...-coreutils-9.1/bin/install: cannot stat 'asy-keywords.el': No such file or directory

View File

@ -3030,7 +3030,7 @@ with pkgs;
astc-encoder = callPackage ../tools/graphics/astc-encoder { };
asymptote = callPackage ../tools/graphics/asymptote {
asymptote = libsForQt5.callPackage ../tools/graphics/asymptote {
texLive = texlive.combine { inherit (texlive) scheme-small epsf cm-super texinfo media9 ocgx2 collection-latexextra; };
};

View File

@ -2211,6 +2211,8 @@ self: super: with self; {
crytic-compile = callPackage ../development/python-modules/crytic-compile { };
cson = callPackage ../development/python-modules/cson { };
csrmesh = callPackage ../development/python-modules/csrmesh { };
csscompressor = callPackage ../development/python-modules/csscompressor { };
@ -11540,6 +11542,8 @@ self: super: with self; {
speedtest-cli = callPackage ../development/python-modules/speedtest-cli { };
speg = callPackage ../development/python-modules/speg { };
spglib = callPackage ../development/python-modules/spglib { };
sphfile = callPackage ../development/python-modules/sphfile { };