guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Could anyone help me to pack the shellcheck (haskell)


From: Huang\, Ying
Subject: Re: Could anyone help me to pack the shellcheck (haskell)
Date: Thu, 09 Mar 2017 19:39:19 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Danny Milosavljevic <address@hidden> writes:

> Hi,
>
> On Wed, 08 Mar 2017 20:08:41 +0800
> "Huang\, Ying" <address@hidden> 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?
n>
> 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?

Great!  It works!  Thanks a lot!  Now I can use shellcheck.  Could you
make it merged by Guix?

Best Regards,
Huang, Ying




reply via email to

[Prev in Thread] Current Thread [Next in Thread]