Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 58 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 testers, 5 fetchFromGitHub, 6 zlib, 7 cups, 8 libpng, 9 libjpeg, 10 pkg-config, 11 htmldoc, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "htmldoc"; 16 version = "1.9.20"; 17 src = fetchFromGitHub { 18 owner = "michaelrsweet"; 19 repo = "htmldoc"; 20 rev = "v${version}"; 21 hash = "sha256-nEDvG2Q6uMYWyb49EKOZimkOfEavCjvfFgucwi3u64k="; 22 }; 23 24 nativeBuildInputs = [ pkg-config ]; 25 buildInputs = [ 26 zlib 27 cups 28 libpng 29 libjpeg 30 ]; 31 32 # do not generate universal binary on Darwin 33 # because it is not supported by Nix's clang 34 postPatch = '' 35 substituteInPlace configure --replace-fail "-arch x86_64 -arch arm64" "" 36 ''; 37 38 passthru.tests = testers.testVersion { 39 package = htmldoc; 40 command = "htmldoc --version"; 41 }; 42 43 meta = { 44 description = "Converts HTML files to PostScript and PDF"; 45 homepage = "https://michaelrsweet.github.io/htmldoc"; 46 changelog = "https://github.com/michaelrsweet/htmldoc/releases/tag/v${version}"; 47 license = lib.licenses.gpl2Only; 48 maintainers = with lib.maintainers; [ ]; 49 platforms = lib.platforms.unix; 50 51 longDescription = '' 52 HTMLDOC is a program that reads HTML source files or web pages and 53 generates corresponding HTML, PostScript, or PDF files with an optional 54 table of contents. 55 ''; 56 mainProgram = "htmldoc"; 57 }; 58}