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

36 lines
748 B
Nix
Raw Normal View History

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