about summary refs log tree commit diff
path: root/pkgs/tools/misc/mongodb-tools
diff options
context:
space:
mode:
authorMikkel Christiansen <mikkel@rheosystems.com>2015-05-13 14:15:06 +0200
committerMikkel Christiansen <mikkel@rheosystems.com>2015-05-18 10:29:22 +0200
commit734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef (patch)
tree3c818cd37c7e463c63851d570feae6dc957e076e /pkgs/tools/misc/mongodb-tools
parent70c79fa2082b62556b64c9492ab5ddb788610b2a (diff)
downloadnixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.tar
nixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.tar.gz
nixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.tar.bz2
nixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.tar.lz
nixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.tar.xz
nixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.tar.zst
nixlib-734bc9f2e52fe5e38c4df748d45a69fb6ed9fcef.zip
Add MongoDB tools and build dependencies.
Diffstat (limited to 'pkgs/tools/misc/mongodb-tools')
-rw-r--r--pkgs/tools/misc/mongodb-tools/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/misc/mongodb-tools/default.nix b/pkgs/tools/misc/mongodb-tools/default.nix
new file mode 100644
index 000000000000..81e05a8790e5
--- /dev/null
+++ b/pkgs/tools/misc/mongodb-tools/default.nix
@@ -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;
+  };
+}