diff options
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/go.xml | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/doc/languages-frameworks/go.xml b/doc/languages-frameworks/go.xml index e56d7dd389d95..026acb4e8fb94 100644 --- a/doc/languages-frameworks/go.xml +++ b/doc/languages-frameworks/go.xml @@ -24,7 +24,7 @@ deis = buildGoPackage rec { sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw"; }; - goDeps = ./deps.json; <co xml:id='ex-buildGoPackage-3' /> + goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-3' /> buildFlags = "--tags release"; <co xml:id='ex-buildGoPackage-4' /> } @@ -56,7 +56,9 @@ the following arguments are of special significance to the function: <callout arearefs='ex-buildGoPackage-3'> <para> <varname>goDeps</varname> is where the Go dependencies of a Go program are listed - in a JSON format described below. + as a list of package source identified by Go import path. + It could be imported as a separate <varname>deps.nix</varname> file for + readability. The dependency data structure is described below. </para> </callout> @@ -70,23 +72,32 @@ the following arguments are of special significance to the function: </para> -<para>The <varname>goDeps</varname> attribute should point to a JSON file that defines which Go libraries - are needed and should be included in <varname>GOPATH</varname> for <varname>buildPhase</varname>. - +<para>The <varname>goDeps</varname> attribute can be imported from a separate + <varname>nix</varname> file that defines which Go libraries are needed and should + be included in <varname>GOPATH</varname> for <varname>buildPhase</varname>. </para> -<example xml:id='ex-goDeps'><title>deps.json</title> +<example xml:id='ex-goDeps'><title>deps.nix</title> <programlisting> [ <co xml:id='ex-goDeps-1' /> - { - "goPackagePath": "gopkg.in/yaml.v2", <co xml:id='ex-goDeps-2' /> - "fetch": { - "type": "git", <co xml:id='ex-goDeps-3' /> - "url": "https://gopkg.in/yaml.v2", - "rev": "a83829b6f1293c91addabc89d0571c246397bbf4", - "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh" - } - } + { + goPackagePath = "gopkg.in/yaml.v2"; <co xml:id='ex-goDeps-2' /> + fetch = { + type = "git"; <co xml:id='ex-goDeps-3' /> + url = "https://gopkg.in/yaml.v2"; + rev = "a83829b6f1293c91addabc89d0571c246397bbf4"; + sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"; + }; + } + { + goPackagePath = "github.com/docopt/docopt-go"; + fetch = { + type = "git"; + url = "https://github.com/docopt/docopt-go"; + rev = "784ddc588536785e7299f7272f39101f7faccc3f"; + sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj"; + }; + } ] </programlisting> </example> |