Merge pull request #247359 from xworld21/R-sweave-tex

R: split tex output for use with texlive.combine

authored by 7c6f434c and committed by GitHub 6221aed0 a471325e

+16 -1
+16 -1
pkgs/applications/science/math/R/default.nix
··· 1 { lib, stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng 2 - , libtiff, ncurses, pango, pcre2, perl, readline, tcl, texLive, tk, xz, zlib 3 , less, texinfo, graphviz, icu, pkg-config, bison, imake, which, jdk, blas, lapack 4 , curl, Cocoa, Foundation, libobjc, libcxx, tzdata 5 , withRecommendedPackages ? true ··· 23 url = "https://cran.r-project.org/src/base/R-${lib.versions.major version}/${pname}-${version}.tar.gz"; 24 sha256 = "sha256-jdC/JPECPG9hjDsxc4PSkbSklPQNc7mDrCL/6pnkupk="; 25 }; 26 27 dontUseImakeConfigure = true; 28 ··· 89 90 installTargets = [ "install" "install-info" "install-pdf" ]; 91 92 # The store path to "which" is baked into src/library/base/R/unix/system.unix.R, 93 # but Nix cannot detect it as a run-time dependency because the installed file 94 # is compiled and compressed, which hides the store path. ··· 102 setupHook = ./setup-hook.sh; 103 104 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 105 106 meta = with lib; { 107 homepage = "http://www.r-project.org/";
··· 1 { lib, stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng 2 + , libtiff, ncurses, pango, pcre2, perl, readline, tcl, texlive, texLive, tk, xz, zlib 3 , less, texinfo, graphviz, icu, pkg-config, bison, imake, which, jdk, blas, lapack 4 , curl, Cocoa, Foundation, libobjc, libcxx, tzdata 5 , withRecommendedPackages ? true ··· 23 url = "https://cran.r-project.org/src/base/R-${lib.versions.major version}/${pname}-${version}.tar.gz"; 24 sha256 = "sha256-jdC/JPECPG9hjDsxc4PSkbSklPQNc7mDrCL/6pnkupk="; 25 }; 26 + 27 + outputs = [ "out" "tex" ]; 28 29 dontUseImakeConfigure = true; 30 ··· 91 92 installTargets = [ "install" "install-info" "install-pdf" ]; 93 94 + # move tex files to $tex for use with texlive.combine 95 + # add link in $out since ${R_SHARE_DIR}/texmf is hardcoded in several places 96 + postInstall = '' 97 + mv -T "$out/lib/R/share/texmf" "$tex" 98 + ln -s "$tex" "$out/lib/R/share/texmf" 99 + ''; 100 + 101 # The store path to "which" is baked into src/library/base/R/unix/system.unix.R, 102 # but Nix cannot detect it as a run-time dependency because the installed file 103 # is compiled and compressed, which hides the store path. ··· 111 setupHook = ./setup-hook.sh; 112 113 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 114 + 115 + # make tex output available to texlive.combine 116 + passthru.pkgs = [ finalAttrs.finalPackage.tex ]; 117 + passthru.tlType = "run"; 118 + # dependencies (based on \RequirePackage in jss.cls, Rd.sty, Sweave.sty) 119 + passthru.tlDeps = with texlive; [ amsfonts amsmath fancyvrb graphics hyperref iftex jknapltx latex lm tools upquote url ]; 120 121 meta = with lib; { 122 homepage = "http://www.r-project.org/";