summary refs log tree commit diff
path: root/pkgs/servers/mirrorbits
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-09-18 21:52:51 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-09-18 21:55:41 +0200
commitad13618c9be274e44dc40f4a27979db6243b5ec0 (patch)
tree894c9ee4414260d73d0a893c122a65f45944bf3e /pkgs/servers/mirrorbits
parent316858466afb7330e4062bc2aa3b1af597bcc0c9 (diff)
downloadnixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.tar
nixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.tar.gz
nixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.tar.bz2
nixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.tar.lz
nixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.tar.xz
nixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.tar.zst
nixpkgs-ad13618c9be274e44dc40f4a27979db6243b5ec0.zip
mirrorbits: init at 0.4
Diffstat (limited to 'pkgs/servers/mirrorbits')
-rw-r--r--pkgs/servers/mirrorbits/default.nix48
-rw-r--r--pkgs/servers/mirrorbits/deps.nix66
2 files changed, 114 insertions, 0 deletions
diff --git a/pkgs/servers/mirrorbits/default.nix b/pkgs/servers/mirrorbits/default.nix
new file mode 100644
index 00000000000..98ac1534cf8
--- /dev/null
+++ b/pkgs/servers/mirrorbits/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub, fetchpatch
+, pkgconfig, zlib, geoip }:
+
+buildGoPackage rec {
+  name = "mirrorbits-${version}";
+  version = "0.4";
+  rev = "v${version}";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "etix";
+    repo = "mirrorbits";
+    sha256 = "11f9wczajba147qk5j73pxjrvlxkgr598sjvgjn2b8nxm49g2pan";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/etix/mirrorbits/commit/03a4e02214bdb7bb60240ddf25b887ccac5fb118.patch";
+      sha256 = "08332cfxmp2nsfdj2ymg3lxkav8h44f6cf2h6g9jkn03mkliblm5";
+    })
+  ];
+
+  postPatch = ''
+    rm -rf testing
+  '';
+
+  goPackagePath = "github.com/etix/mirrorbits";
+  goDeps = ./deps.nix;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ zlib geoip ];
+
+  meta = {
+    description = "geographical download redirector for distributing files efficiently across a set of mirrors";
+    homepage = "https://github.com/etix/mirrorbits";
+    longDescription = ''
+      Mirrorbits is a geographical download redirector written in Go for
+      distributing files efficiently across a set of mirrors. It offers
+      a simple and economic way to create a Content Delivery Network
+      layer using a pure software stack. It is primarily designed for
+      the distribution of large-scale Open-Source projects with a lot
+      of traffic.
+    '';
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ fpletz ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/pkgs/servers/mirrorbits/deps.nix b/pkgs/servers/mirrorbits/deps.nix
new file mode 100644
index 00000000000..37365412661
--- /dev/null
+++ b/pkgs/servers/mirrorbits/deps.nix
@@ -0,0 +1,66 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/etix/geoip";
+    fetch = {
+      type = "git";
+      url = "https://github.com/etix/geoip";
+      rev = "db8457352061099b2a1840c712b3223900216588";
+      sha256 = "1768237bngcjgw0s8wba0f4nw1xahg28cq2nd6vrbmhavd1ppim9";
+    };
+  }
+  {
+    goPackagePath = "github.com/etix/goftp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/etix/goftp";
+      rev = "0c13163a1028e83f0f1cce113dddd3900e935bc7";
+      sha256 = "15kwk57yk63j28d1lwrykc9nr7ickqgk2fpw4g0b0404b95l101k";
+    };
+  }
+  {
+    goPackagePath = "github.com/garyburd/redigo";
+    fetch = {
+      type = "git";
+      url = "https://github.com/garyburd/redigo";
+      rev = "70e1b1943d4fc9c56791abaa6f4d1e727b9ab925";
+      sha256 = "1nw22r0vagmayjg51rz55yi9ppkd60ya0nzmp113mcz25vhxa0d0";
+    };
+  }
+  {
+    goPackagePath = "github.com/op/go-logging";
+    fetch = {
+      type = "git";
+      url = "https://github.com/op/go-logging";
+      rev = "970db520ece77730c7e4724c61121037378659d9";
+      sha256 = "1cpna2x5l071z1vrnk7zipdkka8dzwsjyx7m79xk0lr08rip0kcj";
+    };
+  }
+  {
+    goPackagePath = "github.com/youtube/vitess";
+    fetch = {
+      type = "git";
+      url = "https://github.com/youtube/vitess";
+      rev = "6cf14dbf97f28eebd37dc2bc36374852946336a8";
+      sha256 = "1g76q84wipyprn05brpjxf8xri87293r7nyf647crjy5d9k950lz";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/tylerb/graceful.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/tylerb/graceful.v1";
+      rev = "4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb";
+      sha256 = "1qspbrzr3h6c89v75c99avn7iizkfnjh901wp650vyy0j3p6ydnd";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "eb3733d160e74a9c7e442f435eb3bea458e1d19f";
+      sha256 = "1srhvcaa9db3a6xj29mkjr5kg33y71pclrlx4vcwz5m1lgb5c7q6";
+    };
+  }
+]