Loading pkgs/tools/typesetting/tex/texlive/tl2nix.sed +43 −33 Original line number Diff line number Diff line Loading @@ -2,19 +2,16 @@ 1itl: { # no indentation $a} # trash packages we don't want /^name .*\./,/^$/d # form an attrmap per package # ignore packages whose name contains "." (such as binaries) /^name ([^.]+)$/,/^$/{ # quote package names, as some start with a number :-/ s/^name (.*)/name "\1"/ s/^name (.*)$/"\1" = {/p /^$/,1i}; # extract revision s/^revision ([0-9]*)$/ revision = \1;/p # form an attrmap per package /^name /s/^name (.*)/\1 = {/p /^$/,1i}; # extract hashes of *.tar.xz s/^containerchecksum (.*)/ sha512.run = "\1";/p s/^doccontainerchecksum (.*)/ sha512.doc = "\1";/p Loading @@ -30,9 +27,22 @@ s/^srccontainerchecksum (.*)/ sha512.source = "\1";/p s/^catalogue-version_(.*)/ version = "\1";/p # extract deps s/^depend ([^.]*)$/ deps."\1" = tl."\1";/p /^depend [^.]+$/{ s/^depend (.+)$/ deps."\1" = tl."\1";/ # loop through following depend lines :next h ; N # save & read next line s/\ndepend (.+)\.(.+)$// s/\ndepend (.+)$/\n deps."\1" = tl."\1";/ t next # loop if the previous lines matched x; p; x # print saved deps s/^.*\n// # remove deps, resume processing } # extract hyphenation patterns and formats # (this may create duplicate lines, use uniq to remove them) /^execute\sAddHyphen/i\ hasHyphens = true; /^execute\sAddFormat/i\ hasFormats = true; } Loading
pkgs/tools/typesetting/tex/texlive/tl2nix.sed +43 −33 Original line number Diff line number Diff line Loading @@ -2,19 +2,16 @@ 1itl: { # no indentation $a} # trash packages we don't want /^name .*\./,/^$/d # form an attrmap per package # ignore packages whose name contains "." (such as binaries) /^name ([^.]+)$/,/^$/{ # quote package names, as some start with a number :-/ s/^name (.*)/name "\1"/ s/^name (.*)$/"\1" = {/p /^$/,1i}; # extract revision s/^revision ([0-9]*)$/ revision = \1;/p # form an attrmap per package /^name /s/^name (.*)/\1 = {/p /^$/,1i}; # extract hashes of *.tar.xz s/^containerchecksum (.*)/ sha512.run = "\1";/p s/^doccontainerchecksum (.*)/ sha512.doc = "\1";/p Loading @@ -30,9 +27,22 @@ s/^srccontainerchecksum (.*)/ sha512.source = "\1";/p s/^catalogue-version_(.*)/ version = "\1";/p # extract deps s/^depend ([^.]*)$/ deps."\1" = tl."\1";/p /^depend [^.]+$/{ s/^depend (.+)$/ deps."\1" = tl."\1";/ # loop through following depend lines :next h ; N # save & read next line s/\ndepend (.+)\.(.+)$// s/\ndepend (.+)$/\n deps."\1" = tl."\1";/ t next # loop if the previous lines matched x; p; x # print saved deps s/^.*\n// # remove deps, resume processing } # extract hyphenation patterns and formats # (this may create duplicate lines, use uniq to remove them) /^execute\sAddHyphen/i\ hasHyphens = true; /^execute\sAddFormat/i\ hasFormats = true; }