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
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl
|
|
|
|
, SystemConfiguration ? null, Foundation ? null
|
|
}:
|
|
|
|
assert stdenv.isDarwin -> SystemConfiguration != null
|
|
&& Foundation != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.8.29";
|
|
pname = "htmldoc";
|
|
src = fetchurl {
|
|
url = "https://github.com/michaelrsweet/htmldoc/releases/download"
|
|
+ "/release-${version}/htmldoc-${version}-source.tar.gz";
|
|
sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0";
|
|
};
|
|
buildInputs = with stdenv;
|
|
lib.optional isDarwin SystemConfiguration
|
|
++ lib.optional isDarwin Foundation;
|
|
|
|
meta = with lib; {
|
|
description = "Converts HTML files to PostScript and PDF";
|
|
homepage = "https://michaelrsweet.github.io/htmldoc";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ shanemikel ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
longDescription = ''
|
|
HTMLDOC is a program that reads HTML source files or web pages and
|
|
generates corresponding HTML, PostScript, or PDF files with an optional
|
|
table of contents.
|
|
'';
|
|
};
|
|
}
|