diff --git a/pkgs/by-name/mi/mirrorbits/package.nix b/pkgs/by-name/mi/mirrorbits/package.nix index a5d8bc041b7f..a542f022655f 100644 --- a/pkgs/by-name/mi/mirrorbits/package.nix +++ b/pkgs/by-name/mi/mirrorbits/package.nix @@ -2,34 +2,30 @@ lib, buildGoModule, fetchFromGitHub, - fetchpatch, pkg-config, zlib, geoip, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "mirrorbits"; - version = "0.5.1"; + version = "0.6"; src = fetchFromGitHub { owner = "etix"; repo = "mirrorbits"; - rev = "v${version}"; - hash = "sha256-Ta3+Y3P74cvx09Z4rB5ObgBZtfF4grVgyeZ57yFPlGM="; + tag = "v${finalAttrs.version}"; + hash = "sha256-99eOfVSlGIEzNm+0gI/y0+UPd+dnZiGzaHlkqUNtO1U="; }; - vendorHash = null; + postPatch = '' + rm -rf vendor + ''; - patches = [ - # Add Go Modules support - (fetchpatch { - url = "https://github.com/etix/mirrorbits/commit/955a8b2e1aacea1cae06396a64afbb531ceb36d4.patch"; - hash = "sha256-KJgj3ynnjjiXG5qsUmzBiMjGEwfvM/9Ap+ZgUdhclik="; - }) - ]; + vendorHash = "sha256-cdD9RvOtgN/SHtgrtrucnUI+nnO/FabUyPRdvgoL44o="; nativeBuildInputs = [ pkg-config ]; + buildInputs = [ zlib geoip @@ -42,8 +38,8 @@ buildGoModule rec { "-w" ]; - meta = with lib; { - description = "geographical download redirector for distributing files efficiently across a set of mirrors"; + 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 @@ -53,8 +49,8 @@ buildGoModule rec { the distribution of large-scale Open-Source projects with a lot of traffic. ''; - license = licenses.mit; - maintainers = with maintainers; [ fpletz ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fpletz ]; mainProgram = "mirrorbits"; }; -} +})