nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 65 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch2, 6 gettext, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "enscript"; 11 version = "1.6.6"; 12 13 src = fetchurl { 14 url = "mirror://gnu/enscript/enscript-${finalAttrs.version}.tar.gz"; 15 sha256 = "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd"; 16 }; 17 18 patches = [ 19 # fix compile failure on macos. use system getopt like linux 20 # requires that compat/getopt.h is also removed 21 # https://savannah.gnu.org/bugs/?64307 22 ./0001-use-system-getopt.patch 23 # Fix build with gcc15 24 # regex.c:3565:13: error: too many arguments to function 're_match_2_internal'; expected 0, have 8 25 (fetchpatch2 { 26 url = "https://salsa.debian.org/debian/enscript/-/raw/7a51479540a210dee5eee4ece5b54e3ce15dec52/debian/patches/1096582-gcc-15"; 27 hash = "sha256-0H8FNCKgQ1YCwcBaMChQSuFaYlmzSsoqtfsNSr567+Y="; 28 }) 29 ]; 30 31 postPatch = '' 32 # the delete component of 0001-use-system-getopt.patch 33 rm compat/getopt.h 34 # Fix building on Darwin with GCC. 35 substituteInPlace compat/regex.c --replace \ 36 __private_extern__ '__attribute__ ((visibility ("hidden")))' 37 ''; 38 39 buildInputs = [ gettext ]; 40 41 doCheck = true; 42 43 meta = { 44 description = "Converter from ASCII to PostScript, HTML, or RTF"; 45 46 longDescription = '' 47 GNU Enscript converts ASCII files to PostScript, HTML, or RTF and 48 stores generated output to a file or sends it directly to the 49 printer. It includes features for `pretty-printing' 50 (language-sensitive code highlighting) in several programming 51 languages. 52 53 Enscript can be easily extended to handle different output media and 54 it has many options that can be used to customize printouts. 55 ''; 56 57 license = lib.licenses.gpl3Plus; 58 59 homepage = "https://www.gnu.org/software/enscript/"; 60 61 maintainers = [ ]; 62 platforms = lib.platforms.all; 63 mainProgram = "enscript"; 64 }; 65})