1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 19:45:54 +00:00
nixpkgs/pkgs/tools/text/xurls/default.nix
Pascal Wittmann 7cda3b3042
xurls: add license
see issue #43716
2018-07-22 16:57:28 +02:00

37 lines
777 B
Nix

{ stdenv, fetchFromGitHub, go }:
stdenv.mkDerivation rec {
version = "1.1.0";
name = "xurls-${version}";
src = fetchFromGitHub {
owner = "mvdan";
repo = "xurls";
rev = "v${version}";
sha256 = "05q4nqbpgfb0a35sn22rn9mlag2ks4cgwb54dx925hipp6zgj1hx";
};
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 = with maintainers; [ koral ndowens ];
platforms = platforms.unix;
license = licenses.bsd3;
};
}