blob: 74240a859c89977b3eb8c20ad525c888519d5cb1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# This file was generated by go2nix.
{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }:
with goPackages;
let
tools = [
"bsondump" "mongodump" "mongoexport" "mongofiles" "mongoimport"
"mongooplog" "mongorestore" "mongostat" "mongotop"
];
in
buildGoPackage rec {
name = "mongo-tools-${version}";
version = "3.0.12";
rev = "r${version}";
goPackagePath = "github.com/mongodb/mongo-tools";
subPackages = map (t: t + "/main") tools;
src = fetchgit {
inherit rev;
url = "https://github.com/mongodb/mongo-tools";
sha256 = "142vxgniri1mfy2xmfgxhbdp6k6h8c5milv454krv1b51v43hsbm";
};
goDeps = ./deps.json;
# Mongodb incorrectly names all of their binaries main
# Let's work around this with our own installer
preInstall = ''
mkdir -p $bin/bin
'' + toString (map (t: ''
go install $goPackagePath/${t}/main
mv go/bin/main $bin/bin/${t}
''
) tools) + ''
rm -r go/bin
'';
}
|