2020-02-09 03:39:23 +00:00
|
|
|
{ boost
|
|
|
|
, cairo
|
|
|
|
, cmake
|
|
|
|
, cups
|
|
|
|
, fetchpatch
|
|
|
|
, fetchurl
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, harfbuzzFull
|
|
|
|
, hunspell
|
|
|
|
, lcms2
|
|
|
|
, libjpeg
|
|
|
|
, libtiff
|
|
|
|
, libxml2
|
|
|
|
, mkDerivation
|
|
|
|
, pixman
|
|
|
|
, pkgconfig
|
|
|
|
, podofo
|
|
|
|
, poppler
|
|
|
|
, poppler_data
|
|
|
|
, python2
|
|
|
|
, qtbase
|
|
|
|
, qtimageformats
|
|
|
|
, qttools
|
|
|
|
, stdenv
|
|
|
|
}:
|
2018-10-05 13:03:11 +01:00
|
|
|
|
|
|
|
let
|
2020-02-09 03:39:23 +00:00
|
|
|
pythonEnv = python2.withPackages (
|
|
|
|
ps: [
|
|
|
|
ps.pillow
|
|
|
|
ps.tkinter
|
|
|
|
]
|
|
|
|
);
|
2019-07-05 16:42:08 +01:00
|
|
|
in
|
2019-08-09 16:28:49 +01:00
|
|
|
mkDerivation rec {
|
|
|
|
pname = "scribus";
|
2020-02-09 03:39:23 +00:00
|
|
|
|
2019-08-09 16:28:49 +01:00
|
|
|
version = "1.5.5";
|
2018-10-05 13:03:11 +01:00
|
|
|
|
2019-08-09 16:28:49 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-devel/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "eQiyGmzoQyafWM7fX495GJMlfmIBzOX73ccNrKL+P3E=";
|
2018-10-05 13:03:11 +01:00
|
|
|
};
|
|
|
|
|
2019-12-04 19:52:59 +00:00
|
|
|
patches = [
|
2020-04-17 00:22:16 +01:00
|
|
|
# Poppler patches from
|
|
|
|
# https://github.com/scribusproject/scribus/commits/master/scribus/plugins/import/pdf
|
|
|
|
|
2019-12-04 19:52:59 +00:00
|
|
|
# fix build with Poppler 0.82
|
2020-04-17 00:22:16 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/scribusproject/scribus/commit/6db15ec1af791377b28981601f8c296006de3c6f.patch";
|
|
|
|
sha256 = "1y6g3avmsmiyaj8xry1syaz8sfznsavh6l2rp13pj2bwsxfcf939";
|
|
|
|
})
|
2019-12-04 19:52:59 +00:00
|
|
|
# fix build with Poppler 0.83
|
2020-04-17 00:22:16 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/scribusproject/scribus/commit/b51c2bab4d57d685f96d427d6816bdd4ecfb4674.patch";
|
|
|
|
sha256 = "031yy9ylzksczfnpcc4glfccz025sn47zg6fqqzjnqqrc16bgdlx";
|
|
|
|
})
|
2020-02-09 03:39:23 +00:00
|
|
|
# fix build with Poppler 0.84
|
|
|
|
# TODO: Remove patches with scribus version > 1.5.5 as it should be fixed upstream in next version
|
2020-04-17 00:22:16 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/scribusproject/scribus/commit/3742559924136c2471ab15081c5b600dd5feaeb0.patch";
|
|
|
|
sha256 = "1d72h7jbajy9w83bnxmhn1ca947hpfxnfbmq30g5ljlj824c7y9y";
|
|
|
|
})
|
|
|
|
# Formating changes needed for the Poppler 0.86 patch to apply
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/scribusproject/scribus/commit/58613b5ce44335f202a55ab15ed303d97fe274cb.patch";
|
|
|
|
sha256 = "qwmVAZVYCijLNMVGwnOLJE8223vcRwPWfEvNKiDjw5o=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/scribusproject/scribus/commit/24aba508aac3f672f5f8cd629744a3b71e58ec37.patch";
|
|
|
|
sha256 = "sha256-OY+EIiGBTg2aIAmZOnkI8DPZVZYqFZAKnD7ychge1Dw=";
|
|
|
|
includes = [ "scribus/plugins/import/pdf/*" ];
|
|
|
|
})
|
|
|
|
# fix build with Poppler 0.86
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/scribusproject/scribus/commit/67f8771aaff2f55d61b8246f420e762f4b526944.patch";
|
|
|
|
sha256 = "51z+BYKhbH8a9dFph8X60NGpiogSb+5tOhW2d+m/X9M=";
|
|
|
|
})
|
2019-12-04 19:52:59 +00:00
|
|
|
];
|
|
|
|
|
2018-10-05 13:03:11 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-02-09 03:39:23 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkgconfig
|
|
|
|
];
|
|
|
|
|
2018-10-05 13:03:11 +01:00
|
|
|
buildInputs = [
|
2020-02-09 03:39:23 +00:00
|
|
|
boost
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
harfbuzzFull
|
|
|
|
hunspell
|
|
|
|
lcms2
|
|
|
|
libjpeg
|
|
|
|
libtiff
|
|
|
|
libxml2
|
|
|
|
pixman
|
|
|
|
podofo
|
|
|
|
poppler
|
|
|
|
poppler_data
|
|
|
|
pythonEnv
|
|
|
|
qtbase
|
|
|
|
qtimageformats
|
|
|
|
qttools
|
2018-10-05 13:03:11 +01:00
|
|
|
];
|
|
|
|
|
2020-02-09 03:39:23 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
maintainers = with maintainers; [
|
|
|
|
erictapen
|
|
|
|
kiwi
|
|
|
|
];
|
|
|
|
platforms = platforms.linux;
|
2018-10-05 13:03:11 +01:00
|
|
|
description = "Desktop Publishing (DTP) and Layout program for Linux";
|
2020-02-09 03:39:23 +00:00
|
|
|
homepage = "http://www.scribus.net";
|
|
|
|
# There are a lot of licenses... https://github.com/scribusproject/scribus/blob/20508d69ca4fc7030477db8dee79fd1e012b52d2/COPYING#L15-L19
|
|
|
|
license = with licenses; [
|
|
|
|
bsd3
|
|
|
|
gpl2
|
|
|
|
mit
|
|
|
|
publicDomain
|
|
|
|
];
|
2018-10-05 13:03:11 +01:00
|
|
|
};
|
|
|
|
}
|