From 6b8275eaf981aeacf3a1502b7e3282a4c37271a6 Mon Sep 17 00:00:00 2001 From: rushmorem Date: Fri, 16 Sep 2016 16:24:51 +0200 Subject: [PATCH] goa: init at 1.0.0 --- pkgs/development/tools/goa/default.nix | 45 ++++++++++ pkgs/development/tools/goa/deps.nix | 111 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 158 insertions(+) create mode 100644 pkgs/development/tools/goa/default.nix create mode 100644 pkgs/development/tools/goa/deps.nix diff --git a/pkgs/development/tools/goa/default.nix b/pkgs/development/tools/goa/default.nix new file mode 100644 index 000000000000..04c35f7b8bb7 --- /dev/null +++ b/pkgs/development/tools/goa/default.nix @@ -0,0 +1,45 @@ +{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper }: + +buildGoPackage rec { + name = "goa-${version}"; + version = "1.0.0"; + + goPackagePath = "github.com/goadesign/goa"; + subPackages = [ "goagen" ]; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "goadesign"; + repo = "goa"; + sha256 = "13401jf907z3qh11h9clb3z0i0fshwkmhx11fq9z6vx01x8x2in1"; + }; + + buildInputs = [ makeWrapper ]; + + allowGoReference = true; + + outputs = [ "out" ]; + + preInstall = '' + export bin=$out + ''; + + postInstall = '' + # goagen needs GOPATH to be set + wrapProgram $out/bin/goagen \ + --prefix GOPATH ":" $out/share/go + + # and it needs access to all its dependancies + mkdir -p $out/share/go + cp -Rv $NIX_BUILD_TOP/go/{pkg,src} $out/share/go/ + ''; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + homepage = https://goa.design; + description = "A framework for building microservices in Go using a unique design-first approach"; + license = licenses.mit; + maintainers = [ maintainers.rushmorem ]; + }; +} diff --git a/pkgs/development/tools/goa/deps.nix b/pkgs/development/tools/goa/deps.nix new file mode 100644 index 000000000000..14e9234be8a2 --- /dev/null +++ b/pkgs/development/tools/goa/deps.nix @@ -0,0 +1,111 @@ +# This file was generated by go2nix. +[ + { + goPackagePath = "github.com/armon/go-metrics"; + fetch = { + type = "git"; + url = "https://github.com/armon/go-metrics"; + rev = "3df31a1ada83e310c2e24b267c8e8b68836547b4"; + sha256 = "1l99f1bzvdhyqhnsrpi1pd07bps0msilzilrd7m4w7i1m5kra529"; + }; + } + { + goPackagePath = "github.com/dimfeld/httppath"; + fetch = { + type = "git"; + url = "https://github.com/dimfeld/httppath"; + rev = "c8e499c3ef3c3e272ed8bdcc1ccf39f73c88debc"; + sha256 = "0452zvrzjvy8pk5q6ykivz2cks082r4lmh7hghscxfqw6gf3siwi"; + }; + } + { + goPackagePath = "github.com/dimfeld/httptreemux"; + fetch = { + type = "git"; + url = "https://github.com/dimfeld/httptreemux"; + rev = "96acf0909c0b45ebf4a25a816cedc6d317e63679"; + sha256 = "0f9qbm1b8l7b21i2v8vmjyzfwf1mgkvxlk5250bwkp5i8n4ml2r6"; + }; + } + { + goPackagePath = "github.com/goadesign/goa"; + fetch = { + type = "git"; + url = "https://github.com/goadesign/goa"; + rev = "ea323df387ea68f8ac9fd79336f523c25e12c92e"; + sha256 = "13401jf907z3qh11h9clb3z0i0fshwkmhx11fq9z6vx01x8x2in1"; + }; + } + { + goPackagePath = "github.com/manveru/faker"; + fetch = { + type = "git"; + url = "https://github.com/manveru/faker"; + rev = "717f7cf83fb78669bfab612749c2e8ff63d5be11"; + sha256 = "1p6laz0hnb2vhfvam83rz6vl2amajqa6nifnsj2lg3mcs9ga8c0f"; + }; + } + { + goPackagePath = "github.com/satori/go.uuid"; + fetch = { + type = "git"; + url = "https://github.com/satori/go.uuid"; + rev = "0aa62d5ddceb50dbcb909d790b5345affd3669b6"; + sha256 = "1vfzfcspanxcbpdpv49580rh6kamzcs3lm70xnx724mkwi41zi8w"; + }; + } + { + goPackagePath = "github.com/spf13/cobra"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cobra"; + rev = "9c28e4bbd74e5c3ed7aacbc552b2cab7cfdfe744"; + sha256 = "02bgp0yy9bi05k2in9axqi3db1c6mjffdsmki51pn9iryxz4zkh3"; + }; + } + { + goPackagePath = "github.com/spf13/pflag"; + fetch = { + type = "git"; + url = "https://github.com/spf13/pflag"; + rev = "c7e63cf4530bcd3ba943729cee0efeff2ebea63f"; + sha256 = "197mlkgb01zk86fxfl8r8maymcxsspqblg7hmngjxf7ivdid1i1l"; + }; + } + { + goPackagePath = "github.com/zach-klippenstein/goregen"; + fetch = { + type = "git"; + url = "https://github.com/zach-klippenstein/goregen"; + rev = "795b5e3961ea1912fde60af417ad85e86acc0d6a"; + sha256 = "113kx47ryhyb803v8ckizlrc34cmwcwb0h28v34bahd2mir8nq3l"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "71a035914f99bb58fe82eac0f1289f10963d876c"; + sha256 = "06m16c9vkwc8m2mcxcxa7p8mb26ikc810lgzd5m8k1r6lp3hc8wm"; + }; + } + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "f1a397bba50dee815e8c73f3ec94ffc0e8df1a09"; + sha256 = "1wy8nn2vg70n98g80i1zrk49129phyfbzxbicj748bmf82rnaxzg"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "31c299268d302dd0aa9a0dcf765a3d58971ac83f"; + sha256 = "14jkpa8g0s448n2x5qdi05m59ncsdscby1wy2p089zxl9nqavm8h"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b77bcb54f7aa..aebcaa4bcac8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -849,6 +849,8 @@ in gmic = callPackage ../tools/graphics/gmic { }; + goa = callPackage ../development/tools/goa { }; + gringo = callPackage ../tools/misc/gringo { }; gti = callPackage ../tools/misc/gti { };