unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Could anyone help me to pack the shellcheck (haskell)
@ 2017-03-08 12:08 Huang, Ying
  2017-03-08 21:04 ` Danny Milosavljevic
  0 siblings, 1 reply; 6+ messages in thread
From: Huang, Ying @ 2017-03-08 12:08 UTC (permalink / raw)
  To: guix-devel

Hi, All,

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?

Thanks in advance!

Best Regards,
Huang, Ying

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Could anyone help me to pack the shellcheck (haskell)
  2017-03-08 12:08 Could anyone help me to pack the shellcheck (haskell) Huang, Ying
@ 2017-03-08 21:04 ` Danny Milosavljevic
  2017-03-09 11:39   ` Huang, Ying
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Milosavljevic @ 2017-03-08 21:04 UTC (permalink / raw)
  To: Huang, Ying; +Cc: guix-devel

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Could anyone help me to pack the shellcheck (haskell)
  2017-03-08 21:04 ` Danny Milosavljevic
@ 2017-03-09 11:39   ` Huang, Ying
  2017-03-09 18:34     ` Danny Milosavljevic
  0 siblings, 1 reply; 6+ messages in thread
From: Huang, Ying @ 2017-03-09 11:39 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Danny Milosavljevic <dannym@scratchpost.org> writes:

> 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?
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Could anyone help me to pack the shellcheck (haskell)
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2017-03-09 18:34 UTC (permalink / raw)
  To: Huang, Ying; +Cc: guix-devel

Hi,

On Thu, 09 Mar 2017 19:39:19 +0800
"Huang\, Ying" <huang_ying_caritas@163.com> wrote:

> Danny Milosavljevic <dannym@scratchpost.org> writes:
> 
> > 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?  
> 
> Great!  It works! 

Nice. Good to know that it works for you as-is.

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

Eventually, but it has to go through the normal review process in any case.

Could you give some details for the description? I'm not a user of shellcheck so I have no idea what else to put there.

Also, could you do a license review (check the shellcheck source files for header comments which say what license to use) and make sure it's actually gpl3 or later ?

Then I'll post an updated patch to guix-patches (to be merged eventually after review) if you want.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Could anyone help me to pack the shellcheck (haskell)
  2017-03-09 18:34     ` Danny Milosavljevic
@ 2017-03-11  0:28       ` Huang, Ying
  2017-03-12  8:03       ` Huang, Ying
  1 sibling, 0 replies; 6+ messages in thread
From: Huang, Ying @ 2017-03-11  0:28 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi,
>
> On Thu, 09 Mar 2017 19:39:19 +0800
> "Huang\, Ying" <huang_ying_caritas@163.com> wrote:
>
>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>> 
>> > 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?  
>> 
>> Great!  It works! 
>
> Nice. Good to know that it works for you as-is.
>
>>Thanks a lot!  Now I can use shellcheck.  Could you
>> make it merged by Guix?
>
> Eventually, but it has to go through the normal review process in any case.

Sure.

> Could you give some details for the description? I'm not a user of
> shellcheck so I have no idea what else to put there.

Sure.

> Also, could you do a license review (check the shellcheck source files
> for header comments which say what license to use) and make sure it's
> actually gpl3 or later ?

Sure.

> Then I'll post an updated patch to guix-patches (to be merged
> eventually after review) if you want.

Great! Thanks a lot!

Best Regards,
Huang, Ying

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Could anyone help me to pack the shellcheck (haskell)
  2017-03-09 18:34     ` Danny Milosavljevic
  2017-03-11  0:28       ` Huang, Ying
@ 2017-03-12  8:03       ` Huang, Ying
  1 sibling, 0 replies; 6+ messages in thread
From: Huang, Ying @ 2017-03-12  8:03 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi,
>
> On Thu, 09 Mar 2017 19:39:19 +0800
> "Huang\, Ying" <huang_ying_caritas@163.com> wrote:
>
>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>> 
>> > 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?  
>> 
>> Great!  It works! 
>
> Nice. Good to know that it works for you as-is.
>
>>Thanks a lot!  Now I can use shellcheck.  Could you
>> make it merged by Guix?
>
> Eventually, but it has to go through the normal review process in any case.
>
> Could you give some details for the description? I'm not a user of shellcheck so I have no idea what else to put there.

Copied from the README of the shellcheck, I think this is a more
detailed description.

ShellCheck is a GPLv3 tool that gives warnings and suggestions for
bash/sh shell scripts.  The goals of ShellCheck are,

- To point out and clarify typical beginner's syntax issues that cause
a shell to give cryptic error messages.

- To point out and clarify typical intermediate level semantic problems
that cause a shell to behave strangely and counter-intuitively.

- To point out subtle caveats, corner cases and pitfalls that may cause an
advanced user's otherwise working script to fail under future circumstances.

> Also, could you do a license review (check the shellcheck source files for header comments which say what license to use) and make sure it's actually gpl3 or later ?

Check all *.hs files in the shellcheck.  All files except
ShellCheck/Data.hs has header comments which say gpl3 or later is used.
The ShellCheck/Data.hs has no header comments about copyright and there
are only several variable definitions in the file.

Best Regards,
Huang, Ying

> Then I'll post an updated patch to guix-patches (to be merged eventually after review) if you want.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-12  8:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 12:08 Could anyone help me to pack the shellcheck (haskell) Huang, Ying
2017-03-08 21:04 ` Danny Milosavljevic
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

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).