2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, ncurses, autoreconfHook }:
|
2013-10-25 17:56:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.9";
|
|
|
|
patchLevel = "19";
|
|
|
|
|
|
|
|
name = "urlview-${version}-${patchLevel}";
|
|
|
|
|
|
|
|
urlBase = "mirror://debian/pool/main/u/urlview/";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = urlBase + "urlview_${version}.orig.tar.gz";
|
|
|
|
sha256 = "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42";
|
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ ncurses ];
|
2013-10-25 17:56:40 +01:00
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
touch NEWS
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
debianPatches = fetchurl {
|
|
|
|
url = urlBase + "urlview_${version}-${patchLevel}.diff.gz";
|
|
|
|
sha256 = "056883c17756f849fb9235596d274fbc5bc0d944fcc072bdbb13d1e828301585";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = debianPatches;
|
|
|
|
|
2019-09-09 00:54:41 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace urlview.c \
|
|
|
|
--replace '/etc/urlview/url_handler.sh' "$out/etc/urlview/url_handler.sh"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm755 url_handler.sh $out/etc/urlview/url_handler.sh
|
|
|
|
patchShebangs $out/etc/urlview
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-10-25 17:56:40 +01:00
|
|
|
description = "Extract URLs from text";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://packages.qa.debian.org/u/urlview.html";
|
2019-09-09 00:54:41 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
2013-10-25 17:56:40 +01:00
|
|
|
};
|
|
|
|
}
|