Skip to content

Commit

Permalink
texlive.combine: add repstopdf, in a bit hacky way
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jul 3, 2017
1 parent c64d8ea commit 7aa1404
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/tools/typesetting/tex/texlive/combine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,20 @@ in buildEnv {
ln -sv "$(realpath $s)" "$out/bin/$tName" # wrapped below
done
)
'' +
# add a missing repstopdf link + patch its argv0 later;
# and do the final round of wrapping
''
if [[ -L "$out"/bin/epstopdf ]]; then
cp -P "$out"/bin/{epstopdf,repstopdf}
fi
rm "$out"/bin/*-sys
wrapBin
if [[ -f "$out"/bin/repstopdf ]]; then
sed 's|^exec |exec -a "$0" |' -i "$out"/bin/repstopdf
fi
'' +
# TODO: a context trigger https://www.preining.info/blog/2015/06/debian-tex-live-2015-the-new-layout/
# http://wiki.contextgarden.net/ConTeXt_Standalone#Unix-like_platforms_.28Linux.2FMacOS_X.2FFreeBSD.2FSolaris.29
Expand Down

10 comments on commit 7aa1404

@sveitser
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vcunat Thank you. This helped. I'm wondering why it was never merged.

@vcunat
Copy link
Member Author

@vcunat vcunat commented on 7aa1404 Oct 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My memory isn't so good :-) Can you back-link the discussion that linked this commit?

@sveitser
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why it's checking for symlink. That didn't work for me. In the end I ended up using the following in a shell.nix.

with import <nixpkgs> { };

let
 tl = (texlive.combine {
   inherit (texlive) scheme-small
   epstopdf
   ; }).overrideAttrs (old: {
      postBuild = old.postBuild + ''
      cp -P "$out"/bin/{epstopdf,repstopdf}
      sed 's|^exec |exec -a "$0" |' -i "$out"/bin/repstopdf
      '';
   });
in mkShell {
  buildInputs = [ dia plantuml ghostscript imagemagick tl ];
}

@sveitser
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the commit via #27086

@bbarker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recently I also needed to sue the above shell.nix

@veprbl
Copy link
Member

@veprbl veprbl commented on 7aa1404 Apr 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the #49405 was fixed a while ago? The above shell.nix will not work properly anymore.

@bbarker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@veprbl

I'm using the following system, and the shell.nix worked, whereas things did not work without it:

  • system: "x86_64-linux"
  • host os: Linux 4.15.0-47-generic, Ubuntu, 18.04 LTS (Bionic Beaver)
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.2.1
  • channels(brandon): "nixpkgs-18.09.2327.37694c8cc0e, nixos-18.09.2327.37694c8cc0e"
  • nixpkgs: /nix/var/nix/profiles/per-user/brandon/channels/nixpkgs

I tried running git log | grep 37694c8cc0e in nixpkgs and nixpkgs-channels, but came up empty in both cases, so not sure how to determine the date of my channel.

@veprbl
Copy link
Member

@veprbl veprbl commented on 7aa1404 Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbarker The fix 20643a7 was never backported to 18.09, so the workaround is still needed there. I think we could still backport it now if you need it.

@vcunat
Copy link
Member Author

@vcunat vcunat commented on 7aa1404 May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's possible, but people in general shouldn't be staying on 18.09 anymore.

@bbarker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries from me in that case, I shall upgrade soon.

Please sign in to comment.