electron_32: fix log spam when building on aarch64-linux (#378988)
[NixPkgs.git] / pkgs / by-name / hy / hylafaxplus / package.nix
blobc99f8977d86729cd0b0a15a6ebe638203dccedf2
2   stdenv,
3   lib,
4   fakeroot,
5   fetchurl,
6   libfaketime,
7   replaceVars,
8   ## runtime dependencies
9   coreutils,
10   file,
11   findutils,
12   gawk,
13   ghostscript,
14   gnugrep,
15   gnused,
16   libtiff,
17   libxcrypt,
18   openssl,
19   psmisc,
20   sharutils,
21   util-linux,
22   zlib,
23   ## optional packages (using `null` disables some functionality)
24   jbigkit ? null,
25   lcms2 ? null, # for colored faxes
26   openldap ? null,
27   pam ? null,
28   ## system-dependent settings that have to be hardcoded
29   maxgid ? 65534, # null -> try to auto-detect (bad on linux)
30   maxuid ? 65534, # null -> hardcoded value 60002
33 let
35   pname = "hylafaxplus";
36   version = "7.0.9";
37   hash = "sha512-3OJwM4vFC9pzPozPobFLiNNx/Qnkl8BpNNziRUpJNBDLBxjtg/eDm3GnprS2hpt7VUoV4PCsFvp1hxhNnhlUwQ==";
39   configSite = replaceVars ./config.site {
40     config_maxgid = lib.optionalString (maxgid != null) ''CONFIG_MAXGID=${builtins.toString maxgid}'';
41     ghostscript_version = ghostscript.version;
42     out = null; # "out" will be resolved in post-install.sh
43     inherit coreutils ghostscript libtiff;
44   };
46   postPatch = replaceVars ./post-patch.sh {
47     inherit configSite;
48     maxuid = lib.optionalString (maxuid != null) (builtins.toString maxuid);
49     faxcover_binpath = lib.makeBinPath [
50       stdenv.shellPackage
51       coreutils
52     ];
53     faxsetup_binpath = lib.makeBinPath [
54       stdenv.shellPackage
55       coreutils
56       findutils
57       gnused
58       gnugrep
59       gawk
60     ];
61   };
63   postInstall = replaceVars ./post-install.sh {
64     inherit fakeroot libfaketime;
65   };
69 stdenv.mkDerivation {
70   inherit pname version;
71   src = fetchurl {
72     url = "mirror://sourceforge/hylafax/hylafax-${version}.tar.gz";
73     inherit hash;
74   };
75   patches = [
76     # adjust configure check to work with libtiff > 4.1
77     ./libtiff-4.patch
78   ];
79   # Note that `configure` (and maybe `faxsetup`) are looking
80   # for a couple of standard binaries in the `PATH` and
81   # hardcode their absolute paths in the new package.
82   buildInputs = [
83     file # for `file` command
84     ghostscript
85     libtiff
86     libxcrypt
87     openssl
88     psmisc # for `fuser` command
89     sharutils # for `uuencode` command
90     util-linux # for `agetty` command
91     zlib
92     jbigkit # optional
93     lcms2 # optional
94     openldap # optional
95     pam # optional
96   ];
97   # Disable parallel build, errors:
98   #  *** No rule to make target '../util/libfaxutil.so.7.0.4', needed by 'faxmsg'.  Stop.
99   enableParallelBuilding = false;
101   postPatch = ". ${postPatch}";
102   dontAddPrefix = true;
103   postInstall = ". ${postInstall}";
104   postInstallCheck = ". ${./post-install-check.sh}";
105   meta = {
106     changelog = "https://hylafax.sourceforge.io/news/${version}.php";
107     description = "enterprise-class system for sending and receiving facsimiles";
108     downloadPage = "https://hylafax.sourceforge.io/download.php";
109     homepage = "https://hylafax.sourceforge.io";
110     license = lib.licenses.bsd3;
111     maintainers = [ lib.maintainers.yarny ];
112     platforms = lib.platforms.linux;
113     longDescription = ''
114       HylaFAX is a scalable and time-proven solution
115       for sending and receiving facsimiles via modem(s).
116       It is based on a client-server architecture,
117       loosely comparable to CUPS:
118       A client connects to a server to issue outbound jobs,
119       the server then chooses a modem to
120       connect to the receiving fax machine.
121       The server notifies users about their
122       outbound jobs as well as about inbound jobs.
123       HylaFAX+ is a fork of HylaFAX that -- in general --
124       contains a superset of the features of
125       HylaFAX and produces releases more often.
126       This package contains the client
127       and the server parts of HylaFAX+.
128     '';
129   };