nixpkgs/pkgs/by-name/en/enscript/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

53 lines
1.5 KiB
Nix

{ lib, stdenv, fetchurl, gettext }:
stdenv.mkDerivation rec {
pname = "enscript";
version = "1.6.6";
src = fetchurl {
url = "mirror://gnu/enscript/enscript-${version}.tar.gz";
sha256 = "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd";
};
patches = [
# fix compile failure on macos. use system getopt like linux
# requires that compat/getopt.h is also removed
# https://savannah.gnu.org/bugs/?64307
./0001-use-system-getopt.patch
];
postPatch = ''
# the delete component of 0001-use-system-getopt.patch
rm compat/getopt.h
# Fix building on Darwin with GCC.
substituteInPlace compat/regex.c --replace \
__private_extern__ '__attribute__ ((visibility ("hidden")))'
'';
buildInputs = [ gettext ];
doCheck = true;
meta = {
description = "Converter from ASCII to PostScript, HTML, or RTF";
longDescription = ''
GNU Enscript converts ASCII files to PostScript, HTML, or RTF and
stores generated output to a file or sends it directly to the
printer. It includes features for `pretty-printing'
(language-sensitive code highlighting) in several programming
languages.
Enscript can be easily extended to handle different output media and
it has many options that can be used to customize printouts.
'';
license = lib.licenses.gpl3Plus;
homepage = "https://www.gnu.org/software/enscript/";
maintainers = [ ];
platforms = lib.platforms.all;
};
}