2021-12-23 10:43:49 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-09-03 13:02:34 +02:00
|
|
|
, writeShellScript
|
2023-11-04 21:02:26 +01:00
|
|
|
, texliveBasic
|
2021-12-23 10:43:49 +01:00
|
|
|
}:
|
|
|
|
|
2023-09-03 13:02:34 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2022-01-25 14:22:25 +01:00
|
|
|
pname = "sagetex";
|
2022-10-01 03:37:04 +02:00
|
|
|
version = "3.6.1";
|
2021-12-23 10:43:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sagemath";
|
|
|
|
repo = "sagetex";
|
|
|
|
rev = "v${version}";
|
2022-10-01 03:37:04 +02:00
|
|
|
sha256 = "sha256-OfhbXHbGI+DaDHqZCOGiSHJPHjGuT7ZqSEjKweloW38=";
|
2021-12-23 10:43:49 +01:00
|
|
|
};
|
|
|
|
|
2023-09-03 13:02:34 +02:00
|
|
|
outputs = [ "tex" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-11-04 21:02:26 +01:00
|
|
|
texliveBasic
|
2023-09-03 13:02:34 +02:00
|
|
|
# multiple-outputs.sh fails if $out is not defined
|
|
|
|
(writeShellScript "force-tex-output.sh" ''
|
|
|
|
out="''${tex-}"
|
|
|
|
'')
|
2021-12-23 10:43:49 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make sagetex.sty
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
path="$out/tex/latex/sagetex"
|
|
|
|
mkdir -p "$path"
|
|
|
|
cp -va *.sty *.cfg *.def "$path/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Embed code, results of computations, and plots from Sage into LaTeX documents";
|
|
|
|
homepage = "https://github.com/sagemath/sagetex";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ alexnortung ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2023-09-03 13:02:34 +02:00
|
|
|
}
|