mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 18:42:15 +00:00
7cda3b3042
see issue #43716
37 lines
777 B
Nix
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;
|
|
};
|
|
}
|