2015-07-14 09:25:35 +01:00
|
|
|
{ stdenv, fetchFromGitHub, go }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-28 18:56:15 +01:00
|
|
|
version = "0.8.0";
|
2015-07-14 09:25:35 +01:00
|
|
|
name = "xurls-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvdan";
|
|
|
|
repo = "xurls";
|
|
|
|
rev = "v${version}";
|
2015-09-28 18:56:15 +01:00
|
|
|
sha256 = "0j35x6hl5hiwzpi6vjw9d2sn83rrsd9w07ql9kndhkngz8n6yr98";
|
2015-07-14 09:25:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Extract urls from text";
|
|
|
|
homepage = https://github.com/mvdan/xurls;
|
|
|
|
maintainers = [ maintainers.koral ];
|
|
|
|
};
|
|
|
|
}
|