package.nix (1405B)
1 { 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 buildPackages, 7 installShellFiles, 8 }: 9 10 buildGoModule (finalAttrs: { 11 pname = "wms-tiles-downloader"; 12 version = "0.3.2"; 13 14 __structuredAttrs = true; 15 16 src = fetchFromGitHub { 17 owner = "lmikolajczak"; 18 repo = "wms-tiles-downloader"; 19 tag = "v${finalAttrs.version}"; 20 hash = "sha256-b1QaquI0s8D9MeXbUNVZpGy3u9eCjakP5BQsyoMne1A="; 21 }; 22 23 vendorHash = "sha256-9ICZowuE2qBxH12bJ8nDxr/sTM0I0JSKe5YtHJsYgi0="; 24 25 ldflags = [ "-s" ]; 26 27 nativeBuildInputs = [ installShellFiles ]; 28 29 postInstall = 30 let 31 wms-tiles-downloader = 32 if stdenv.buildPlatform.canExecute stdenv.hostPlatform then 33 placeholder "out" 34 else 35 buildPackages.wms-tiles-downloader; 36 in 37 '' 38 installShellCompletion --cmd wms-tiles-downloader \ 39 --bash <(${wms-tiles-downloader}/bin/wms-tiles-downloader completion bash) \ 40 --fish <(${wms-tiles-downloader}/bin/wms-tiles-downloader completion fish) \ 41 --zsh <(${wms-tiles-downloader}/bin/wms-tiles-downloader completion zsh) 42 ''; 43 44 __darwinAllowLocalNetworking = true; 45 46 meta = { 47 description = "CLI for downloading map tiles from WMS server"; 48 homepage = "https://github.com/lmikolajczak/wms-tiles-downloader"; 49 license = lib.licenses.mit; 50 mainProgram = "wms-tiles-downloader"; 51 maintainers = [ lib.maintainers.sikmir ]; 52 }; 53 })
