1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/pkgs/tools/text/xurls/default.nix

37 lines
777 B
Nix
Raw Normal View History

2015-07-14 09:25:35 +01:00
{ stdenv, fetchFromGitHub, go }:
stdenv.mkDerivation rec {
2017-02-28 22:19:28 +00:00
version = "1.1.0";
2015-07-14 09:25:35 +01: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 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;
2017-02-28 22:19:28 +00:00
maintainers = with maintainers; [ koral ndowens ];
platforms = platforms.unix;
2018-07-22 15:57:28 +01:00
license = licenses.bsd3;
2015-07-14 09:25:35 +01:00
};
}