unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Huang, Ying" <huang_ying_caritas@163.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Could anyone help me to pack the shellcheck (haskell)
Date: Wed, 8 Mar 2017 22:04:38 +0100	[thread overview]
Message-ID: <20170308220438.74ffa36c@scratchpost.org> (raw)
In-Reply-To: <87innkkm2e.fsf@163.com>

Hi,

On Wed, 08 Mar 2017 20:08:41 +0800
"Huang\, Ying" <huang_ying_caritas@163.com> wrote:

> I know very little about Haskell, but I use shellcheck
> (https://github.com/koalaman/shellcheck) to check my shell scripts.  I
> tried myself, but found it is hard for me.  Could anyone help me on
> that?

If it's distributed by Haskell people then you can generate the package spec form by:

$ guix import stackage shellcheck

Or

$ guix import hackage shellcheck

It will be printed to the standard output device. You can then copy it from there.

The difference is that the first one, stackage, has long-term-support (i.e. well-tested and stable) package combinations. The latter has newer packages.

But it seems that shellcheck is not distributed that way. Then you have to write it by hand. It works really similar to any other package.

So put the following into gnu/packages/haskell.scm :

(define-public ghc-json
  (package <---- this block was generated by: guix import hackage json
    (name "ghc-json")
    (version "0.9.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hackage.haskell.org/package/json/"
                            "json-" version ".tar.gz"))
        (sha256
          (base32
            "18l5027vc68hnnxrxlnyl59vkkg95a92m1zzms0dqiby2r6pxdcn"))))
    (build-system haskell-build-system)
    (inputs
     `(("ghc-syb" ,ghc-syb)
       ("ghc-mtl" ,ghc-mtl)
       ("ghc-text" ,ghc-text)
       ("ghc-parsec" ,ghc-parsec)))
    (home-page "http://hackage.haskell.org/package/json")
    (synopsis "Support for serialising Haskell to and from JSON")
    (description "JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.  It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. . This library provides a parser and pretty printer for converting between Haskell values and JSON.")
    (license license:bsd-3)))

(define-public shellcheck
  (package
    (name "shellcheck")
    (version "0.4.5")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/koalaman/shellcheck/archive/"
                           "v" version ".tar.gz"))
       (sha256 (base32
                "14r84fcn28rin339avlvca5g0kz832f01x8dpmwb5ql8mbc4rlxr"))
       (file-name (string-append name "-" version ".tar.gz"))))
    (build-system haskell-build-system)
    (inputs
     `(("ghc-quickcheck" ,ghc-quickcheck)
       ("ghc-json" ,ghc-json)
       ("ghc-mtl" ,ghc-mtl)
       ("ghc-parsec" ,ghc-parsec)
       ("ghc-regex-tdfa" ,ghc-regex-tdfa)))
    (home-page "https://github.com/koalaman/shellcheck")
    (synopsis "Static analysis for shell scripts")
    (description "@code{ghc-shellcheck} provides static analysis for shell scripts.")
    (license license:gpl3+)))

The "ghc-" prefix is only used for libraries. I think from your description that shellcheck is not a library. Is that correct?

  reply	other threads:[~2017-03-08 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 12:08 Could anyone help me to pack the shellcheck (haskell) Huang, Ying
2017-03-08 21:04 ` Danny Milosavljevic [this message]
2017-03-09 11:39   ` Huang, Ying
2017-03-09 18:34     ` Danny Milosavljevic
2017-03-11  0:28       ` Huang, Ying
2017-03-12  8:03       ` Huang, Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170308220438.74ffa36c@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=huang_ying_caritas@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).