nixpkgs/pkgs/tools/text/xurls/default.nix

35 lines
702 B
Nix
Raw Normal View History

2015-07-14 10:25:35 +02:00
{ stdenv, fetchFromGitHub, go }:
stdenv.mkDerivation rec {
2015-08-29 12:29:19 +02:00
version = "0.7.0";
2015-07-14 10:25:35 +02:00
name = "xurls-${version}";
src = fetchFromGitHub {
owner = "mvdan";
repo = "xurls";
rev = "v${version}";
2015-08-29 12:29:19 +02:00
sha256 = "1sdxz1vqm9kidva7lilway69n4fdkqa4kdldx47jriq2hr96s7n0";
2015-07-14 10:25:35 +02: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 ];
};
}