2018-08-04 13:10:28 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fakeroot
|
|
|
|
, fetchurl
|
|
|
|
, libfaketime
|
|
|
|
, substituteAll
|
|
|
|
## runtime dependencies
|
|
|
|
, coreutils
|
|
|
|
, file
|
|
|
|
, findutils
|
|
|
|
, gawk
|
|
|
|
, ghostscript
|
|
|
|
, gnugrep
|
|
|
|
, gnused
|
|
|
|
, libtiff
|
|
|
|
, psmisc
|
|
|
|
, sharutils
|
2020-11-24 15:29:28 +00:00
|
|
|
, util-linux
|
2018-08-04 13:10:28 +01:00
|
|
|
, zlib
|
|
|
|
## optional packages (using `null` disables some functionality)
|
|
|
|
, jbigkit ? null
|
|
|
|
, lcms2 ? null # for colored faxes
|
|
|
|
, openldap ? null
|
|
|
|
, pam ? null
|
|
|
|
## system-dependent settings that have to be hardcoded
|
|
|
|
, maxgid ? 65534 # null -> try to auto-detect (bad on linux)
|
|
|
|
, maxuid ? 65534 # null -> hardcoded value 60002
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2021-05-08 16:44:30 +01:00
|
|
|
pname = "hylafaxplus";
|
2021-09-04 11:51:41 +01:00
|
|
|
version = "7.0.4";
|
|
|
|
sha256 = "1y4b178rxa4ivxm8cnypnnyc8db7cjqyyzy60hiw215x4cyyj4i5";
|
2018-08-04 13:10:28 +01:00
|
|
|
|
|
|
|
configSite = substituteAll {
|
2021-05-08 16:44:30 +01:00
|
|
|
name = "${pname}-config.site";
|
2018-08-04 13:10:28 +01:00
|
|
|
src = ./config.site;
|
|
|
|
config_maxgid = lib.optionalString (maxgid!=null) ''CONFIG_MAXGID=${builtins.toString maxgid}'';
|
|
|
|
ghostscript_version = ghostscript.version;
|
|
|
|
out_ = "@out@"; # "out" will be resolved in post-install.sh
|
|
|
|
inherit coreutils ghostscript libtiff;
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = substituteAll {
|
2021-05-08 16:44:30 +01:00
|
|
|
name = "${pname}-post-patch.sh";
|
2018-08-04 13:10:28 +01:00
|
|
|
src = ./post-patch.sh;
|
|
|
|
inherit configSite;
|
|
|
|
maxuid = lib.optionalString (maxuid!=null) (builtins.toString maxuid);
|
|
|
|
faxcover_binpath = lib.makeBinPath
|
|
|
|
[stdenv.shellPackage coreutils];
|
|
|
|
faxsetup_binpath = lib.makeBinPath
|
|
|
|
[stdenv.shellPackage coreutils findutils gnused gnugrep gawk];
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = substituteAll {
|
2021-05-08 16:44:30 +01:00
|
|
|
name = "${pname}-post-install.sh";
|
2018-08-04 13:10:28 +01:00
|
|
|
src = ./post-install.sh;
|
|
|
|
inherit fakeroot libfaketime;
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-05-08 16:44:30 +01:00
|
|
|
inherit pname version;
|
2018-08-04 13:10:28 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/hylafax/hylafax-${version}.tar.gz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
2021-05-11 23:02:59 +01:00
|
|
|
patches = [
|
2021-05-08 16:13:18 +01:00
|
|
|
# adjust configure check to work with libtiff > 4.1
|
2021-07-21 01:33:50 +01:00
|
|
|
./libtiff-4.patch
|
2021-05-11 23:02:59 +01:00
|
|
|
];
|
2018-08-04 13:10:28 +01:00
|
|
|
# Note that `configure` (and maybe `faxsetup`) are looking
|
|
|
|
# for a couple of standard binaries in the `PATH` and
|
|
|
|
# hardcode their absolute paths in the new package.
|
|
|
|
buildInputs = [
|
|
|
|
file # for `file` command
|
|
|
|
ghostscript
|
|
|
|
libtiff
|
|
|
|
psmisc # for `fuser` command
|
|
|
|
sharutils # for `uuencode` command
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux # for `agetty` command
|
2018-08-04 13:10:28 +01:00
|
|
|
zlib
|
|
|
|
jbigkit # optional
|
|
|
|
lcms2 # optional
|
|
|
|
openldap # optional
|
|
|
|
pam # optional
|
|
|
|
];
|
2021-01-24 09:19:10 +00:00
|
|
|
postPatch = ". ${postPatch}";
|
2018-08-04 13:10:28 +01:00
|
|
|
dontAddPrefix = true;
|
2021-01-24 09:19:10 +00:00
|
|
|
postInstall = ". ${postInstall}";
|
|
|
|
postInstallCheck = ". ${./post-install-check.sh}";
|
2019-04-06 18:04:44 +01:00
|
|
|
meta = {
|
|
|
|
description = "enterprise-class system for sending and receiving facsimiles";
|
2020-04-01 02:11:51 +01:00
|
|
|
downloadPage = "https://hylafax.sourceforge.io/download.php";
|
|
|
|
homepage = "https://hylafax.sourceforge.io";
|
2019-04-06 18:04:44 +01:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = [ lib.maintainers.yarny ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
longDescription = ''
|
|
|
|
HylaFAX is a scalable and time-proven solution
|
|
|
|
for sending and receiving facsimiles via modem(s).
|
|
|
|
It is based on a client-server architecture,
|
|
|
|
loosely comparable to CUPS:
|
|
|
|
A client connects to a server to issue outbound jobs,
|
|
|
|
the server then chooses a modem to
|
|
|
|
connect to the receiving fax machine.
|
|
|
|
The server notifies users about their
|
|
|
|
outbound jobs as well as about inbound jobs.
|
|
|
|
HylaFAX+ is a fork of HylaFAX that -- in general --
|
|
|
|
contains a superset of the features of
|
|
|
|
HylaFAX and produces releases more often.
|
|
|
|
This package contains the client
|
|
|
|
and the server parts of HylaFAX+.
|
|
|
|
'';
|
|
|
|
};
|
2018-08-04 13:10:28 +01:00
|
|
|
}
|