pre-srfi / package-scm

The package.scm file format
MIT License
1 stars 1 forks source link

Prior art (package metadata) #1

Open lassik opened 3 years ago

lassik commented 3 years ago

The metadata file for a Snow-fort package is in a file called package.scm in the root directory of each package's tar file. The contents look like this:

(package
  (maintainers "Alex Shinn <hidden@example.com>")
  (authors "Alex Shinn <hidden@example.com>")
  (version "0.7.4.1")
  (license bsd)
  (library
    (name
      (chibi term ansi))
    (path "chibi/term/ansi.sld")
    (depends
      (scheme base)
      (scheme write)
      (scheme process-context)))
  (library
    (name
      (chibi term ansi-test))
    (path "chibi/term/ansi-test.sld")
    (depends
      (scheme base)
      (scheme write)
      (chibi term ansi))
    (use-for test))
  (manual "chibi/term/ansi.html")
  (description "A library to use ANSI escape codes to format text and background [...]")
  (test "run-tests.scm"))
lassik commented 3 years ago

The metadata files for Chicken Scheme packages ("eggs") are as follows (assuming the egg's name is foo).

[EDIT: Here's the description of the full syntax.]

Chicken 4 foo.meta:

((synopsis "A more convenient HTTP library")
 (author "Peter Bex")
 (category web)
 (license "BSD")
 (depends defstruct (uri-common 0.2) (base64 3.0))
 (test-depends test))

Chicken 4 foo.setup:

(compile -s -O3 intarweb.scm -j intarweb)
(compile -s -O3 intarweb.import.scm)

(install-extension
  'intarweb
  '("intarweb.so" "intarweb.import.so")
  `((version "1.7")))

or:

(standard-extension 'foo "0.1.2")

Chicken 5 foo.egg:

((synopsis "A packrat parsing library")
 (author "Tony Garnock-Jones")
 (maintainer "felix winkelmann")
 (license "MIT")
 (category parsing)
 (dependencies srfi-1)
 (component-options
  (csc-options "-O3" "-d0"))
 (components
  (extension packrat)))

Chicken foo.release-info file for the egg index:

(repo git "git://github.com/lassik/chicken-{egg-name}.git")
(uri targz "https://github.com/lassik/chicken-{egg-name}/tarball/{egg-release}")
(release "0.1")
(release "0.1.1")
(release "0.1.2")
(release "0.1.3")
lassik commented 3 years ago

Akku package metadata (all aggregated here) looks like this:

(package
  (name "swish")
  (versions
    ((version "0.0.0-akku.259.842f51f") (synopsis "Swish Concurrency Engine (like Erlang/Node)")
      (description
        "The Swish Concurrency Engine is a framework used to write\nfault-tolerant programs with message-passing concurrency. It uses the\nChez Scheme programming language and embeds concepts from the Erlang\nprogramming language. Swish also provides a web server."
        "This package provides swish, swish-build and swish-test. Try\nrunning swish with and enter this expression to start up a web server\nthat serves files from the ./web directory:"
        "  (parameterize ((http-port-number 8080)) (http-sup:start&link))"
        "More information, including a manual, is available on the homepage."
        "This package requires Akku 0.4.0+ and Chez Scheme 9.5.2+. It is\nquite experimental and unlike any other Akku package. Any problems or\nrequests for the packaging go to Akku's bug tracker! If installation\ndoesn't work then try to debug it with \"env AKKU_LOG_LEVEL=debug akku\ninstall\".")
      (authors "Bob Burger" "Chris Payne" "Oscar Waddell")
      (homepage "https://github.com/becls/swish") (license "MIT")
      (scripts
        (cond-expand
          (pre-install
            (run "unset CHEZSCHEMELIBDIRS;./configure --prefix=\"$akku_path_root\" ")
            (run "cd libuv; git checkout a4fc9a66cc35256dbc4dcd67c910174f05b6daa6")
            (run "cd libuv/build/gyp; git checkout 5c270f76748e52bf8579316ee66b0facb4962628")
            (run "ls -la;unset CHEZSCHEMELIBDIRS GIT_DIR; touch src/swish/submodules; make LDFLAGS=-lz"))
          (post-install
            (run "unset CHEZSCHEMELIBDIRS GIT_DIR;make install"))))
      (lock
        (location
          (url "https://archive.akkuscm.org/archive/pkg/s/swish_0.0.0-akku.259.842f51f_repack.tar.xz"))
        (content
          (sha256
            "45f47f2619faaf3193a29bcfc86f46701d646f3e0e46e42a16b11a197e278d18")))
      (depends) (depends/dev) (conflicts))))