diff options
author | Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> | 2023-08-05 18:31:26 +0100 |
---|---|---|
committer | Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> | 2023-08-08 11:37:56 +0100 |
commit | fb4da9bcad23e065a7dc8836fb573bb323c6590a (patch) | |
tree | 921db450329895e89fe8d3f7231107085ac79c2d | |
parent | 3c76f4df724151e1251c86185f96e666da979b46 (diff) | |
download | nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.tar nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.tar.gz nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.tar.bz2 nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.tar.lz nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.tar.xz nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.tar.zst nixpkgs-fb4da9bcad23e065a7dc8836fb573bb323c6590a.zip |
R: split tex output for use with texlive.combine
-rw-r--r-- | pkgs/applications/science/math/R/default.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index 9ff9d693a88..d3ca419c48d 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng -, libtiff, ncurses, pango, pcre2, perl, readline, tcl, texLive, tk, xz, zlib +, libtiff, ncurses, pango, pcre2, perl, readline, tcl, texlive, texLive, tk, xz, zlib , less, texinfo, graphviz, icu, pkg-config, bison, imake, which, jdk, blas, lapack , curl, Cocoa, Foundation, libobjc, libcxx, tzdata , withRecommendedPackages ? true @@ -24,6 +24,8 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-jdC/JPECPG9hjDsxc4PSkbSklPQNc7mDrCL/6pnkupk="; }; + outputs = [ "out" "tex" ]; + dontUseImakeConfigure = true; nativeBuildInputs = [ pkg-config ]; @@ -89,6 +91,13 @@ stdenv.mkDerivation (finalAttrs: { installTargets = [ "install" "install-info" "install-pdf" ]; + # move tex files to $tex for use with texlive.combine + # add link in $out since ${R_SHARE_DIR}/texmf is hardcoded in several places + postInstall = '' + mv -T "$out/lib/R/share/texmf" "$tex" + ln -s "$tex" "$out/lib/R/share/texmf" + ''; + # The store path to "which" is baked into src/library/base/R/unix/system.unix.R, # but Nix cannot detect it as a run-time dependency because the installed file # is compiled and compressed, which hides the store path. @@ -103,6 +112,12 @@ stdenv.mkDerivation (finalAttrs: { passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + # make tex output available to texlive.combine + passthru.pkgs = [ finalAttrs.finalPackage.tex ]; + passthru.tlType = "run"; + # dependencies (based on \RequirePackage in jss.cls, Rd.sty, Sweave.sty) + passthru.tlDeps = with texlive; [ amsfonts amsmath fancyvrb graphics hyperref iftex jknapltx latex lm tools upquote url ]; + meta = with lib; { homepage = "http://www.r-project.org/"; description = "Free software environment for statistical computing and graphics"; |