captive-browser: Use buildGoModule

+19 -7
+19 -7
pkgs/applications/networking/browsers/captive-browser/default.nix
··· 1 - { lib, fetchFromGitHub, buildGoPackage }: 1 + { lib, fetchFromGitHub, buildGoModule, fetchpatch }: 2 2 3 - buildGoPackage rec { 3 + buildGoModule rec { 4 4 pname = "captive-browser"; 5 - version = "2021-08-01"; 6 - goPackagePath = pname; 5 + version = "unstable-2021-08-01"; 7 6 8 7 src = fetchFromGitHub { 9 - owner = "FiloSottile"; 10 - repo = "captive-browser"; 11 - rev = "9c707dc32afc6e4146e19b43a3406329c64b6f3c"; 8 + owner = "FiloSottile"; 9 + repo = "captive-browser"; 10 + rev = "9c707dc32afc6e4146e19b43a3406329c64b6f3c"; 12 11 sha256 = "sha256-65lPo5tpE0M/VyyvlzlcVSuHX4AhhVuqK0UF4BIAH/Y="; 13 12 }; 13 + 14 + vendorHash = "sha256-2MFdQ2GIDAdLPuwAiGPO9wU3mm2BDXdyTwoVA1xVlcQ="; 15 + deleteVendor = true; 16 + 17 + patches = [ 18 + # Add go modules support 19 + (fetchpatch { 20 + url = "https://github.com/FiloSottile/captive-browser/commit/ef50837778ef4eaf38b19887e79c8b6fa830c342.patch"; 21 + hash = "sha256-w+jDFeO94pMu4ir+G5CzqYlXxYOm9+YfyzbU3sbTyiY="; 22 + }) 23 + ]; 24 + 25 + ldflags = [ "-s" "-w" ]; 14 26 15 27 meta = with lib; { 16 28 description = "Dedicated Chrome instance to log into captive portals without messing with DNS settings";