From 2bee32508cb660db6f46513b20589a51e65d2f05 Mon Sep 17 00:00:00 2001 From: Kamil Chmielewski Date: Sat, 4 Jun 2016 13:01:57 +0200 Subject: [PATCH] nsq: extracted from goPackages --- pkgs/development/go-modules/libs.json | 81 +++++++++++++++++++++++++++ pkgs/servers/nsq/default.nix | 20 +++++++ pkgs/servers/nsq/deps.json | 16 ++++++ pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/go-packages.nix | 11 ---- 5 files changed, 118 insertions(+), 12 deletions(-) create mode 100644 pkgs/servers/nsq/default.nix create mode 100644 pkgs/servers/nsq/deps.json diff --git a/pkgs/development/go-modules/libs.json b/pkgs/development/go-modules/libs.json index 8fe25540bc51..8e6d3d51e7a0 100644 --- a/pkgs/development/go-modules/libs.json +++ b/pkgs/development/go-modules/libs.json @@ -646,5 +646,86 @@ "rev": "56912fb08d85084aa318edcf2bba735b97cf35c5", "sha256": "0s01cqdab2f7fxkkjjk2wqx05a1shnwlvfn45h2pi3i4gapvcn0r" } + }, + { + "goPackagePath": "github.com/mreiferson/go-snappystream", + "fetch": { + "type": "git", + "url": "https://github.com/mreiferson/go-snappystream", + "rev": "028eae7ab5c4c9e2d1cb4c4ca1e53259bbe7e504", + "sha256": "0jdd5whp74nvg35d9hzydsi3shnb1vrnd7shi9qz4wxap7gcrid6" + } + }, + { + "goPackagePath": "github.com/bitly/go-nsq", + "fetch": { + "type": "git", + "url": "https://github.com/bitly/go-nsq", + "rev": "22a8bd48c443ec23bb559675b6df8284bbbdab29", + "sha256": "06hrkwk84w8rshkanvfgmgbiml7n06ybv192dvibhwgk2wz2dl46" + } + }, + { + "goPackagePath": "github.com/bitly/go-simplejson", + "fetch": { + "type": "git", + "url": "https://github.com/bitly/go-simplejson", + "rev": "fc395a5db941cf38922b1ccbc083640cd76fe4bc", + "sha256": "14lhdmzlc1pza10q8g957zqnc4kfqvamw90mj1ndj6s285h80m54" + } + }, + { + "goPackagePath": "github.com/blang/semver", + "fetch": { + "type": "git", + "url": "https://github.com/blang/semver", + "rev": "9bf7bff48b0388cb75991e58c6df7d13e982f1f2", + "sha256": "11sinbf942dpyc9wdpidkhmqn438cfp5n8x3xqnmq9aszkld9hy7" + } + }, + { + "goPackagePath": "github.com/bmizerany/perks", + "fetch": { + "type": "git", + "url": "https://github.com/bmizerany/perks", + "rev": "6cb9d9d729303ee2628580d9aec5db968da3a607", + "sha256": "0cdh84hmn21is6hvv6dy9qjdcg9w3l2k8avlk0881a8cqm09s90j" + } + }, + { + "goPackagePath": "github.com/BurntSushi/toml", + "fetch": { + "type": "git", + "url": "https://github.com/BurntSushi/toml", + "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4", + "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw" + } + }, + { + "goPackagePath": "github.com/bitly/go-hostpool", + "fetch": { + "type": "git", + "url": "https://github.com/bitly/go-hostpool", + "rev": "d0e59c22a56e8dadfed24f74f452cea5a52722d2", + "sha256": "14ph12krn5zlg00vh9g6g08lkfjxnpw46nzadrfb718yl1hgyk3g" + } + }, + { + "goPackagePath": "github.com/bitly/timer_metrics", + "fetch": { + "type": "git", + "url": "https://github.com/bitly/timer_metrics", + "rev": "afad1794bb13e2a094720aeb27c088aa64564895", + "sha256": "1b717vkwj63qb5kan4b92kx4rg6253l5mdb3lxpxrspy56a6rl0c" + } + }, + { + "goPackagePath": "github.com/mreiferson/go-options", + "fetch": { + "type": "git", + "url": "https://github.com/mreiferson/go-options", + "rev": "7c174072188d0cfbe6f01bb457626abb22bdff52", + "sha256": "0ksyi2cb4k6r2fxamljg42qbz5hdcb9kv5i7y6cx4ajjy0xznwgm" + } } ] diff --git a/pkgs/servers/nsq/default.nix b/pkgs/servers/nsq/default.nix new file mode 100644 index 000000000000..5831340eccd9 --- /dev/null +++ b/pkgs/servers/nsq/default.nix @@ -0,0 +1,20 @@ +# This file was generated by go2nix. +{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +with goPackages; + +buildGoPackage rec { + name = "nsq-${version}"; + version = "0.3.5"; + rev = "v${version}"; + + goPackagePath = "github.com/bitly/nsq"; + + src = fetchgit { + inherit rev; + url = "https://github.com/nsqio/nsq"; + sha256 = "1r7jgplzn6bgwhd4vn8045n6cmm4iqbzssbjgj7j1c28zbficy2f"; + }; + + goDeps = ./deps.json; +} diff --git a/pkgs/servers/nsq/deps.json b/pkgs/servers/nsq/deps.json new file mode 100644 index 000000000000..e23d3e15f669 --- /dev/null +++ b/pkgs/servers/nsq/deps.json @@ -0,0 +1,16 @@ +[ + { + "include": "../../libs.json", + "packages": [ + "github.com/mreiferson/go-snappystream", + "github.com/bitly/go-nsq", + "github.com/bitly/go-simplejson", + "github.com/blang/semver", + "github.com/bmizerany/perks", + "github.com/BurntSushi/toml", + "github.com/bitly/go-hostpool", + "github.com/bitly/timer_metrics", + "github.com/mreiferson/go-options" + ] + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6082f524c7d4..5464e581794f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10031,7 +10031,7 @@ in nsd = callPackage ../servers/dns/nsd (config.nsd or {}); - nsq = goPackages.nsq.bin // { outputs = [ "bin" ]; }; + nsq = callPackage ../servers/nsq { }; oauth2_proxy = goPackages.oauth2_proxy.bin // { outputs = [ "bin" ]; }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index df2d9db67962..63e67a9c9727 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -2489,17 +2489,6 @@ let subPackages = [ "." ]; }; - nsq = buildFromGitHub { - rev = "v0.3.5"; - owner = "bitly"; - repo = "nsq"; - sha256 = "1r7jgplzn6bgwhd4vn8045n6cmm4iqbzssbjgj7j1c28zbficy2f"; - - excludedPackages = "bench"; - - buildInputs = [ go-nsq go-options semver perks toml go-hostpool timer_metrics ]; - }; - ntp = buildFromGitHub { rev = "0a5264e2563429030eb922f258229ae3fee5b5dc"; owner = "beevik";