xurls: 1.1.0 -> 2.0.0

This commit is contained in:
Jörg Thalheim 2018-12-11 18:28:09 +00:00
parent 56fdf7a296
commit 26572ea27d
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -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";