mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, ncurses, autoreconfHook }:
|
|
|
|
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";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
buildInputs = [ ncurses ];
|
|
|
|
preAutoreconf = ''
|
|
touch NEWS
|
|
'';
|
|
|
|
preConfigure = ''
|
|
mkdir -p $out/share/man/man1
|
|
'';
|
|
|
|
debianPatches = fetchurl {
|
|
url = urlBase + "urlview_${version}-${patchLevel}.diff.gz";
|
|
sha256 = "056883c17756f849fb9235596d274fbc5bc0d944fcc072bdbb13d1e828301585";
|
|
};
|
|
|
|
patches = debianPatches;
|
|
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Extract URLs from text";
|
|
homepage = "https://packages.qa.debian.org/u/urlview.html";
|
|
license = licenses.gpl2;
|
|
platforms = with platforms; linux ++ darwin;
|
|
maintainers = with maintainers; [ ma27 ];
|
|
};
|
|
}
|