From ad13618c9be274e44dc40f4a27979db6243b5ec0 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 18 Sep 2017 21:52:51 +0200 Subject: mirrorbits: init at 0.4 --- pkgs/servers/mirrorbits/default.nix | 48 +++++++++++++++++++++++++++ pkgs/servers/mirrorbits/deps.nix | 66 +++++++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 116 insertions(+) create mode 100644 pkgs/servers/mirrorbits/default.nix create mode 100644 pkgs/servers/mirrorbits/deps.nix diff --git a/pkgs/servers/mirrorbits/default.nix b/pkgs/servers/mirrorbits/default.nix new file mode 100644 index 000000000000..98ac1534cf8a --- /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 000000000000..373654126614 --- /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"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06f577bd9298..b8262eb8dbd8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3288,6 +3288,8 @@ with pkgs; miredo = callPackage ../tools/networking/miredo { }; + mirrorbits = callPackage ../servers/mirrorbits { }; + mitmproxy = callPackage ../tools/networking/mitmproxy { }; mjpegtoolsFull = callPackage ../tools/video/mjpegtools { }; -- cgit 1.4.1