Hacker News new | ask | show | jobs
by rekado 3736 days ago
A DSL already exists. It's just embedded in Scheme, not an external DSL. Here's a package definition. You can see that it mixes regular Scheme (`string-append`) with new package-specific syntax (`version`, `source`, etc).

  (define-public babl
    (package
      (name "babl")
      (version "0.1.10")
      (source (origin
                (method url-fetch)
                (uri (list (string-append "http://ftp.gtk.org/pub/babl/0.1/babl-"
                                          version ".tar.bz2")
                           (string-append "ftp://ftp.gtk.org/pub/babl/0.1/babl-"
                                          version ".tar.bz2")))
                (sha256
                 (base32
                  "1x2mb7zfbvk9d0a7h5cpdff9hhjsadxvqml2jay2bpf7x9nc6gwl"))))
      (build-system gnu-build-system)
      (home-page "http://gegl.org/babl/")
      (synopsis "Image pixel format conversion library")
      (description
       "Babl is a dynamic, any to any, pixel format translation library.
  It allows converting between different methods of storing pixels known as
  pixel formats that have with different bitdepths and other data
  representations, color models and component permutations.

  A vocabulary to formulate new pixel formats from existing primitives is
  provided as well as the framework to add new color models and data types.")
      (license license:lgpl3+)))