2015-07-14 08:25:35 +00:00
|
|
|
{ stdenv, fetchFromGitHub, go }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-02-28 22:19:28 +00:00
|
|
|
version = "1.1.0";
|
2015-07-14 08:25:35 +00:00
|
|
|
name = "xurls-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvdan";
|
|
|
|
repo = "xurls";
|
|
|
|
rev = "v${version}";
|
2017-02-28 22:19:28 +00:00
|
|
|
sha256 = "05q4nqbpgfb0a35sn22rn9mlag2ks4cgwb54dx925hipp6zgj1hx";
|
2015-07-14 08:25:35 +00: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;
|
2017-02-28 22:19:28 +00:00
|
|
|
maintainers = with maintainers; [ koral ndowens ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = platforms.unix;
|
2015-07-14 08:25:35 +00:00
|
|
|
};
|
|
|
|
}
|