diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-07-09 12:30:28 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:11:31 +0000 |
commit | 55cc63c079f49e81d695a25bc2f5b3902f2bd290 (patch) | |
tree | e705335d97f50b927c76ccb4a3fbde9fab8372b9 /nixpkgs/pkgs/tools/typesetting/tex | |
parent | c26eb6f74d9393127a21eee7a9620a920769f613 (diff) | |
parent | 87807e64a5ef5206b745a40af118c7be8db73681 (diff) | |
download | nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.gz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.bz2 nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.lz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.xz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.zst nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.zip |
Merge commit '87807e64a5ef5206b745a40af118c7be8db73681'
Diffstat (limited to 'nixpkgs/pkgs/tools/typesetting/tex')
-rw-r--r-- | nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix b/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix index c21a5dda994a..c26b944522c9 100644 --- a/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix @@ -160,35 +160,12 @@ let "https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/archive" ]; - src = fetchurl { inherit urls sha512; }; - - passthru = { - inherit pname tlType version; - } // lib.optionalAttrs (sha512 != "") { inherit src; }; - unpackCmd = file: '' - tar -xf ${file} \ - '--strip-components=${toString stripPrefix}' \ - -C "$out" --anchored --exclude=tlpkg --keep-old-files - '' + postUnpack; - - in if sha512 == "" then - # hash stripped from pkgs.nix to save space -> fetch&unpack in a single step - # currently unused as we prefer to keep the sha512 hashes for reproducibility - fetchurl { - inherit urls; - sha1 = if fixedHash == null then throw "TeX Live package ${tlName} is missing hash!" - else fixedHash; - name = tlName; - recursiveHash = true; - downloadToTemp = true; - postFetch = ''mkdir "$out";'' + unpackCmd "$downloadedFile"; - # TODO: perhaps override preferHashedMirrors and allowSubstitutes - } - // passthru - - else runCommand "texlive-${tlName}" + in runCommand "texlive-${tlName}" ( { - inherit passthru; + src = fetchurl { inherit urls sha512; }; + inherit stripPrefix; + # metadata for texlive.combine + passthru = { inherit pname tlType version; }; } // lib.optionalAttrs (fixedHash != null) { outputHash = fixedHash; outputHashAlgo = "sha1"; @@ -197,7 +174,10 @@ let ) ( '' mkdir "$out" - '' + unpackCmd "'${src}'" + tar -xf "$src" \ + --strip-components="$stripPrefix" \ + -C "$out" --anchored --exclude=tlpkg --keep-old-files + '' + postUnpack ); # combine a set of TL packages into a single TL meta-package |