From 26572ea27df5d665898d0b77d1938a80d57902d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 Dec 2018 18:28:09 +0000 Subject: [PATCH] xurls: 1.1.0 -> 2.0.0 --- pkgs/tools/text/xurls/default.nix | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/pkgs/tools/text/xurls/default.nix b/pkgs/tools/text/xurls/default.nix index 5e3f87828529..55619b416320 100644 --- a/pkgs/tools/text/xurls/default.nix +++ b/pkgs/tools/text/xurls/default.nix @@ -1,30 +1,18 @@ -{ stdenv, fetchFromGitHub, go }: +{ buildGoPackage, stdenv, fetchFromGitHub }: -stdenv.mkDerivation rec { - version = "1.1.0"; +buildGoPackage rec { + version = "2.0.0"; name = "xurls-${version}"; src = fetchFromGitHub { owner = "mvdan"; repo = "xurls"; rev = "v${version}"; - sha256 = "05q4nqbpgfb0a35sn22rn9mlag2ks4cgwb54dx925hipp6zgj1hx"; + sha256 = "1jdjwlp19r8cb7vycyrjmpwf8dz2fzrqphq4lkvy9x2v7x0kksx8"; }; - buildInputs = [ go ]; - - buildPhase = '' - mkdir -p src/github.com/mvdan - ln -s $(pwd) src/github.com/mvdan/xurls - export GOPATH=$(pwd) - cd cmd/xurls - go build -v - ''; - - installPhase = '' - mkdir -p $out/bin - mv xurls $out/bin - ''; + goPackagePath = "mvdan.cc/xurls/v2"; + subPackages = [ "cmd/xurls" ]; meta = with stdenv.lib; { description = "Extract urls from text";