From 20a457faf777dee002024aa425a9076c936e0d3f Mon Sep 17 00:00:00 2001 From: Kamil Chmielewski Date: Fri, 3 Jun 2016 20:03:09 +0200 Subject: [PATCH] gotty: extracted from goPackages --- pkgs/development/go-modules/libs.json | 63 +++++++++++++++++++++++++++ pkgs/servers/gotty/default.nix | 27 ++++++++++++ pkgs/servers/gotty/deps.json | 15 +++++++ pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/go-packages.nix | 16 ------- 5 files changed, 106 insertions(+), 17 deletions(-) create mode 100644 pkgs/servers/gotty/default.nix create mode 100644 pkgs/servers/gotty/deps.json diff --git a/pkgs/development/go-modules/libs.json b/pkgs/development/go-modules/libs.json index 18ddb080b19d..8fe25540bc51 100644 --- a/pkgs/development/go-modules/libs.json +++ b/pkgs/development/go-modules/libs.json @@ -583,5 +583,68 @@ "rev": "089c7181b8c728499929ff09b62d3fdd8df8adff", "sha256": "03dzxkxbs298pvfsjz4kdadfaf9jkzsdhshqmg4p12wbyaj09s4p" } + }, + { + "goPackagePath": "github.com/kr/pty", + "fetch": { + "type": "git", + "url": "https://github.com/kr/pty", + "rev": "67e2db24c831afa6c64fc17b4a143390674365ef", + "sha256": "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d" + } + }, + { + "goPackagePath": "github.com/braintree/manners", + "fetch": { + "type": "git", + "url": "https://github.com/braintree/manners", + "rev": "cab36f97339b1925cd89e158632728025557e550", + "sha256": "1q508c62iiklghkhwqz9c0zsn9hrij7kqb93gdywzj7ms7x6hlfh" + } + }, + { + "goPackagePath": "github.com/codegangsta/cli", + "fetch": { + "type": "git", + "url": "https://github.com/codegangsta/cli", + "rev": "71f57d300dd6a780ac1856c005c4b518cfd498ec", + "sha256": "1fxznirkvank5461789dm5aw5z8aqi0jvwligvz44659rfl376p3" + } + }, + { + "goPackagePath": "github.com/elazarl/go-bindata-assetfs", + "fetch": { + "type": "git", + "url": "https://github.com/elazarl/go-bindata-assetfs", + "rev": "d5cac425555ca5cf00694df246e04f05e6a55150", + "sha256": "636ce247ff6f85c14f38a421f46662fa77bdc29762692e1f72b3cd1f9d7a1d17" + } + }, + { + "goPackagePath": "github.com/fatih/structs", + "fetch": { + "type": "git", + "url": "https://github.com/fatih/structs", + "rev": "a9f7daa9c2729e97450c2da2feda19130a367d8f", + "sha256": "0pyrc7svc826g37al3db19n5l4r2m9h1mlhjh3hz2r41xfaqia50" + } + }, + { + "goPackagePath": "github.com/hashicorp/hcl", + "fetch": { + "type": "git", + "url": "https://github.com/hashicorp/hcl", + "rev": "54864211433d45cb780682431585b3e573b49e4a", + "sha256": "07l2dydzjpdgm2d4a72hkmincn455j3nrafg6hs3c23bkvizj950" + } + }, + { + "goPackagePath": "github.com/hashicorp/go-multierror", + "fetch": { + "type": "git", + "url": "https://github.com/hashicorp/go-multierror", + "rev": "56912fb08d85084aa318edcf2bba735b97cf35c5", + "sha256": "0s01cqdab2f7fxkkjjk2wqx05a1shnwlvfn45h2pi3i4gapvcn0r" + } } ] diff --git a/pkgs/servers/gotty/default.nix b/pkgs/servers/gotty/default.nix new file mode 100644 index 000000000000..c826180d7585 --- /dev/null +++ b/pkgs/servers/gotty/default.nix @@ -0,0 +1,27 @@ +# This file was generated by go2nix. +{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +with goPackages; + +buildGoPackage rec { + name = "gotty-${version}"; + version = "0.0.10"; + rev = "v${version}"; + + goPackagePath = "github.com/yudai/gotty"; + + src = fetchgit { + inherit rev; + url = "https://github.com/yudai/gotty"; + sha256 = "1jc620j4y2r8706r6qn7g2nghiidaaj7f8m2vjgq2gwv288qjafd"; + }; + + goDeps = ./deps.json; + + meta = with stdenv.lib; { + description = "Share your terminal as a web application"; + homepage = "https://github.com/yudai/gotty"; + maintainers = with maintainers; [ matthiasbeyer ]; + license = licenses.mit; + }; +} diff --git a/pkgs/servers/gotty/deps.json b/pkgs/servers/gotty/deps.json new file mode 100644 index 000000000000..ff0016df6233 --- /dev/null +++ b/pkgs/servers/gotty/deps.json @@ -0,0 +1,15 @@ +[ + { + "include": "../../libs.json", + "packages": [ + "github.com/kr/pty", + "github.com/braintree/manners", + "github.com/codegangsta/cli", + "github.com/elazarl/go-bindata-assetfs", + "github.com/fatih/structs", + "github.com/gorilla/websocket", + "github.com/hashicorp/hcl", + "github.com/hashicorp/go-multierror" + ] + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d9a60f50f464..89dc95eaeeb3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6216,7 +6216,7 @@ in gob2 = callPackage ../development/tools/misc/gob2 { }; - gotty = goPackages.gotty.bin // { outputs = [ "bin" ]; }; + gotty = (callPackage ../servers/gotty { }).bin; gradleGen = callPackage ../development/tools/build-managers/gradle { }; gradle = self.gradleGen.gradleLatest; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 3be6aa47dd88..3adaf33f8928 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -1134,22 +1134,6 @@ let sha256 = "1l1w4mczqmah0c154vb1daw5l3cc7vn5gmy5s67p3ad1lnz5l79x"; }; - gotty = buildFromGitHub { - rev = "v0.0.10"; - owner = "yudai"; - repo = "gotty"; - sha256 = "0gvnbr61d5si06ik2j075jg00r9b94ryfgg06nqxkf10dp8lgi09"; - - buildInputs = [ cli-go go manners go-bindata-assetfs go-multierror structs websocket hcl pty ]; - - meta = with stdenv.lib; { - description = "Share your terminal as a web application"; - homepage = "https://github.com/yudai/gotty"; - maintainers = with maintainers; [ matthiasbeyer ]; - license = licenses.mit; - }; - }; - govers = buildFromGitHub { rev = "3b5f175f65d601d06f48d78fcbdb0add633565b9"; version = "2015-01-09";