Add MongoDB tools and build dependencies.

This commit is contained in:
Mikkel Christiansen 2015-05-13 14:15:06 +02:00
parent 70c79fa208
commit 734bc9f2e5
4 changed files with 152 additions and 5 deletions

View File

@ -133,6 +133,7 @@
meditans = "Carlo Nucera <meditans@gmail.com>";
meisternu = "Matt Miemiec <meister@krutt.org>";
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
mschristiansen = "Mikkel Christiansen <mikkel@rheosystems.com>";
modulistic = "Pablo Costa <modulistic@gmail.com>";
mornfall = "Petr Ročkai <me@mornfall.net>";
MP2E = "Cray Elliott <MP2E@archlinux.us>";

View File

@ -0,0 +1,39 @@
{ lib, goPackages, fetchurl, callPackage }:
with goPackages;
buildGoPackage rec {
version = "r3.1.2";
name = "mongodb-tools";
goPackagePath = "github.com/mongodb/mongo-tools";
src = fetchurl {
name = "${name}.tar.gz";
url = "https://github.com/mongodb/mongo-tools/archive/${version}.tar.gz";
sha256 = "1dag8ar95jlfk6rm99y4p3dymcy2s2qnwd9jwqhw9fxr110mgf5s";
};
buildInputs = [ gopass go-flags crypto mgo openssl spacelog
oglematchers goconvey tomb ];
subPackages = [ "bsondump/main" "mongostat/main" "mongofiles/main"
"mongoexport/main" "mongoimport/main" "mongorestore/main"
"mongodump/main" "mongotop/main" "mongooplog/main" ];
buildPhase = ''
for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog; do
echo Building $i
go build -o go/bin/$i go/src/${goPackagePath}/$i/main/$i.go
done
'';
dontInstallSrc = true;
meta = with lib; {
description = "Tools for MongoDB";
homepage = https://github.com/mongodb/mongo-tools;
license = licenses.asl20;
maintainers = with maintainers; [ mschristiansen ];
platforms = platforms.linux;
};
}

View File

@ -873,6 +873,8 @@ let
mcrypt = callPackage ../tools/misc/mcrypt { };
mongodb-tools = callPackage ../tools/misc/mongodb-tools { };
mstflint = callPackage ../tools/misc/mstflint { };
mcelog = callPackage ../os-specific/linux/mcelog { };

View File

@ -151,6 +151,21 @@ let self = _self // overrides; _self = with self; {
};
};
assertions = buildGoPackage rec {
version = "1.5.0";
name = "assertions-${version}";
goPackagePath = "github.com/smartystreets/assertions";
src = fetchurl {
name = "${name}.tar.gz";
url = "https://github.com/smartystreets/assertions/archive/${version}.tar.gz";
sha256 = "1s4b0v49yv7jmy4izn7grfqykjrg7zg79dg5hsqr3x40d5n7mk02";
};
buildInputs = [ oglematchers ];
propagatedBuildInputs = [ goconvey ];
# subPackages = [];
doCheck = false;
};
aws-sdk-go = buildGoPackage rec {
rev = "5e038f730cbb99b144eeb1dbf92cd06c2d00b503";
name = "aws-sdk-go-${stdenv.lib.strings.substring 0 7 rev}";
@ -356,6 +371,18 @@ let self = _self // overrides; _self = with self; {
subPackages = [ "./" ]; # don't try to build test fixtures
};
gls = buildGoPackage rec {
rev = "9a4a02dbe491bef4bab3c24fd9f3087d6c4c6690";
name = "gls-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/jtolds/gls";
src = fetchFromGitHub {
inherit rev;
owner = "jtolds";
repo = "gls";
sha256 = "1gvgkx7llklz6plapb95fcql7d34i6j7anlvksqhdirpja465jnm";
};
};
goamz = buildGoPackage rec {
rev = "2a8fed5e89ab9e16210fc337d1aac780e8c7bbb7";
name = "goamz-${rev}";
@ -480,6 +507,19 @@ let self = _self // overrides; _self = with self; {
buildInputs = [ net ];
};
gopass = buildGoPackage rec {
rev = "2c70fa70727c953c51695f800f25d6b44abb368e";
name = "gopass-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/howeyc/gopass";
src = fetchFromGitHub {
inherit rev;
owner = "howeyc";
repo = "gopass";
sha256 = "152lrkfxk205rlxiign0w5wb0fmfh910yz4jhlv4f4l1qr1h2lx8";
};
buildInputs = [ crypto ];
};
gosnappy = buildGoPackage rec {
rev = "ce8acff4829e0c2458a67ead32390ac0a381c862";
name = "gosnappy-${stdenv.lib.strings.substring 0 7 rev}";
@ -576,6 +616,18 @@ let self = _self // overrides; _self = with self; {
buildInputs = [ pkgs.etcd ];
};
go-flags = buildGoPackage rec {
rev = "5e118789801496c93ba210d34ef1f2ce5a9173bd";
name = "go-flags-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/jessevdk/go-flags";
src = fetchFromGitHub {
inherit rev;
owner = "jessevdk";
repo = "go-flags";
sha256 = "1davr5h936fhc8zy7digp5yqxr216d1mshksr7iiad5xb3r8r9ja";
};
};
go-fuse = buildGoPackage rec {
rev = "5d16aa11eef4643de2d91e88a64dcb6138705d58";
name = "go-fuse-${stdenv.lib.strings.substring 0 7 rev}";
@ -943,6 +995,18 @@ let self = _self // overrides; _self = with self; {
};
};
flagfile = buildGoPackage rec {
rev = "871ce569c29360f95d7596f90aa54d5ecef75738";
name = "flagfile-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/spacemonkeygo/flagfile";
src = fetchFromGitHub {
inherit rev;
owner = "spacemonkeygo";
repo = "flagfile";
sha256 = "1y6wf1s51c90qc1aki8qikkw1wqapzjzr690xrmnrngsfpdyvkrc";
};
};
iochan = buildGoPackage rec {
rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
name = "iochan-${stdenv.lib.strings.substring 0 7 rev}";
@ -1050,14 +1114,17 @@ let self = _self // overrides; _self = with self; {
};
mgo = buildGoPackage rec {
rev = "2";
rev = "c6a7dce14133ccac2dcac3793f1d6e2ef048503a";
name = "mgo-${rev}";
goPackagePath = "launchpad.net/mgo";
src = fetchbzr {
goPackagePath = "gopkg.in/mgo.v2";
src = fetchFromGitHub {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x";
owner = "go-mgo";
repo = "mgo";
sha256 ="0rg232q1bkq3y3kd5816hgk1jpf7i38aha5q5ia7j6p9xashz7vj";
};
buildInputs = [ pkgs.cyrus_sasl ];
};
mousetrap = buildGoPackage rec {
@ -1162,6 +1229,19 @@ let self = _self // overrides; _self = with self; {
doCheck = false; # check this again
};
openssl = buildGoPackage rec {
rev = "84b5df477423634115e53fb171a66007cece19f5";
name = "openssl-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/spacemonkeygo/openssl";
src = fetchFromGitHub {
inherit rev;
owner = "spacemonkeygo";
repo = "openssl";
sha256 = "1l0cyazxp8bwmi151djyr6pknj9jv8n53lgfhgj6l0zj32p5kh1v";
};
buildInputs = [ spacelog pkgconfig pkgs.openssl ];
};
osext = buildGoPackage rec {
rev = "10";
name = "osext-${rev}";
@ -1357,6 +1437,19 @@ let self = _self // overrides; _self = with self; {
};
};
spacelog = buildGoPackage rec {
rev = "ae95ccc1eb0c8ce2496c43177430efd61930f7e4";
name = "spacelog-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/spacemonkeygo/spacelog";
src = fetchFromGitHub {
inherit rev;
owner = "spacemonkeygo";
repo = "spacelog";
sha256 = "1i1awivsix0ch0vg6rwvx0536ziyw6phcx45b1rmrclp6b6dyacy";
};
buildInputs = [ flagfile ];
};
stathat = buildGoPackage rec {
rev = "01d012b9ee2ecc107cb28b6dd32d9019ed5c1d77";
name = "stathat-${stdenv.lib.strings.substring 0 7 rev}";
@ -1411,6 +1504,18 @@ let self = _self // overrides; _self = with self; {
propagatedBuildInputs = [ pty ];
};
tomb = buildGoPackage rec {
rev = "14b3d72120e8d10ea6e6b7f87f7175734b1faab8";
name = "tomb-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "gopkg.in/tomb.v2";
src = fetchFromGitHub {
inherit rev;
owner = "go-tomb";
repo = "tomb";
sha256 = "1nza31jvkpka5431c4bdbirvjdy36b1b55sbzljqhqih25jrcjx5";
};
};
toml = buildGoPackage rec {
rev = "f87ce853111478914f0bcffa34d43a93643e6eda";
name = "toml-${stdenv.lib.strings.substring 0 7 rev}";