Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 52 lines 1.4 kB view raw
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, fetchpatch 5, pkg-config 6, zlib 7, geoip 8}: 9 10buildGoModule rec { 11 pname = "mirrorbits"; 12 version = "0.5.1"; 13 14 src = fetchFromGitHub { 15 owner = "etix"; 16 repo = "mirrorbits"; 17 rev = "v${version}"; 18 hash = "sha256-Ta3+Y3P74cvx09Z4rB5ObgBZtfF4grVgyeZ57yFPlGM="; 19 }; 20 21 vendorHash = null; 22 23 patches = [ 24 # Add Go Modules support 25 (fetchpatch { 26 url = "https://github.com/etix/mirrorbits/commit/955a8b2e1aacea1cae06396a64afbb531ceb36d4.patch"; 27 hash = "sha256-KJgj3ynnjjiXG5qsUmzBiMjGEwfvM/9Ap+ZgUdhclik="; 28 }) 29 ]; 30 31 nativeBuildInputs = [ pkg-config ]; 32 buildInputs = [ zlib geoip ]; 33 34 subPackages = [ "." ]; 35 36 ldflags = [ "-s" "-w" ]; 37 38 meta = with lib; { 39 description = "geographical download redirector for distributing files efficiently across a set of mirrors"; 40 homepage = "https://github.com/etix/mirrorbits"; 41 longDescription = '' 42 Mirrorbits is a geographical download redirector written in Go for 43 distributing files efficiently across a set of mirrors. It offers 44 a simple and economic way to create a Content Delivery Network 45 layer using a pure software stack. It is primarily designed for 46 the distribution of large-scale Open-Source projects with a lot 47 of traffic. 48 ''; 49 license = licenses.mit; 50 maintainers = with maintainers; [ fpletz ]; 51 }; 52}