nixpkgs/pkgs/servers/hylafaxplus/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

128 lines
3.7 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fakeroot
, fetchurl
, libfaketime
, substituteAll
## runtime dependencies
, coreutils
, file
, findutils
, gawk
, ghostscript
, gnugrep
, gnused
, libtiff
2022-09-30 00:10:31 +00:00
, libxcrypt
, openssl
, psmisc
, sharutils
2020-11-24 15:29:28 +00:00
, util-linux
, 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
pname = "hylafaxplus";
version = "7.0.8";
hash = "sha512-6wTLVcaHpASy+2i+jeoJ1cM2aLgI5vznGrLd4NCkLHiOxlfCh/ASRaj2Nxt9ZZ5NN/deEwf9tNSZ7MkFZHVsqA==";
configSite = substituteAll {
name = "${pname}-config.site";
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 {
name = "${pname}-post-patch.sh";
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 {
name = "${pname}-post-install.sh";
src = ./post-install.sh;
inherit fakeroot libfaketime;
};
in
stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "mirror://sourceforge/hylafax/hylafax-${version}.tar.gz";
inherit hash;
};
2021-05-11 22:02:59 +00:00
patches = [
# adjust configure check to work with libtiff > 4.1
2021-07-21 00:33:50 +00:00
./libtiff-4.patch
2021-05-11 22:02:59 +00: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
2022-09-30 00:10:31 +00:00
libxcrypt
openssl
psmisc # for `fuser` command
sharutils # for `uuencode` command
2020-11-24 15:29:28 +00:00
util-linux # for `agetty` command
zlib
jbigkit # optional
lcms2 # optional
openldap # optional
pam # optional
];
2022-01-29 10:35:07 +00:00
# Disable parallel build, errors:
# *** No rule to make target '../util/libfaxutil.so.7.0.4', needed by 'faxmsg'. Stop.
enableParallelBuilding = false;
postPatch = ". ${postPatch}";
dontAddPrefix = true;
postInstall = ". ${postInstall}";
postInstallCheck = ". ${./post-install-check.sh}";
meta = {
2022-02-05 10:37:23 +00:00
changelog = "https://hylafax.sourceforge.io/news/${version}.php";
description = "enterprise-class system for sending and receiving facsimiles";
downloadPage = "https://hylafax.sourceforge.io/download.php";
homepage = "https://hylafax.sourceforge.io";
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+.
'';
};
}