Unverified Commit 63a869db authored by Vincenzo Mantova's avatar Vincenzo Mantova Committed by GitHub
Browse files

texlivePackages: add homepage (#321744)

parent 6ff1f11b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@
, hasManpages ? false
, hasRunfiles ? false
, hasTlpkg ? false
, hasCatalogue ? true
, catalogue ? pname
, extraNativeBuildInputs ? [ ]
, ...
}@args:
@@ -73,6 +75,8 @@ let
    hydraPlatforms = [ ];
  } // lib.optionalAttrs (args ? shortdesc) {
    description = args.shortdesc;
  } // lib.optionalAttrs hasCatalogue {
    homepage = "https://ctan.org/pkg/${catalogue}";
  };

  hasBinfiles = args ? binfiles && args.binfiles != [ ];
+71 −35
Original line number Diff line number Diff line
@@ -37,11 +37,17 @@ $a}
  # number of path components to strip, defaulting to 1 ("texmf-dist/")
  /^relocated 1/i\  stripPrefix = 0;

  /^catalogue(-| )/{
    :next-cat

    s/^catalogue (.*)/  catalogue = "\1";/p

    # extract version and clean unwanted chars from it
    /^catalogue-version/y/ \/~/_--/
    /^catalogue-version/s/[\#,:\(\)]//g
    s/^catalogue-version_(.*)/  version = "\1";/p

    # extract license
    /^catalogue-license/{
      # wrap licenses in quotes
      s/ ([^ ]+)/ "\1"/g
@@ -73,6 +79,18 @@ $a}
      s/^catalogue-license (.*)/  license = [ \1 ];/p
    }

    s/^.*$//
    N
    s/^\ncatalogue(-| )/catalogue\1/
    t next-cat

    # flag existence of catalogue info in hold space
    x ; s/$/\n  hasCatalogue = true;/ ; x

    # restart cycle
    D
  }

  # extract deps
  /^depend ([^.]+|texlive\.infra)$/{
    # open a list
@@ -221,7 +239,25 @@ $a}
  }

  # close attrmap
  /^$/i};
  /^$/{
    # process content of hold space
    x

    # change hasCatalogue default from false to true
    s/^  hasCatalogue = true;$//Mg
    t had-catalogue
    s/(\n?)$/\1  hasCatalogue = false;/
    :had-catalogue

    # print hold space if not empty
    /./Mp

    # erase hold space
    s/.*//
    x

    i};
  }
}

# add list of binaries from one of the architecture-specific packages
+168 −0

File changed.

Preview size limit exceeded, changes collapsed.