2010-07-28 20:01:17 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, freetype, lcms, libtiff, libxml2
|
2016-10-18 09:19:33 +02:00
|
|
|
, libart_lgpl, qt4, python2, cups, fontconfig, libjpeg
|
2019-03-10 20:54:38 +01:00
|
|
|
, zlib, libpng, xorg, cairo, podofo, hunspell, boost, cmake, imagemagick, ghostscript }:
|
2012-08-07 17:41:18 +02:00
|
|
|
|
2016-10-13 22:11:30 +02:00
|
|
|
let
|
2019-01-13 00:01:05 +01:00
|
|
|
icon = fetchurl {
|
|
|
|
url = "https://gist.githubusercontent.com/ejpcmac/a74b762026c9bc4000be624c3d085517/raw/18edc497c5cb6fdeef1c8aede37a0ee68413f9d3/scribus-icon-centered.svg";
|
|
|
|
sha256 = "0hq3i7c2l50445an9glhhg47kj26y16svfajc6naqn307ph9vzc3";
|
|
|
|
};
|
|
|
|
|
2019-03-10 20:54:38 +01:00
|
|
|
pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
|
2016-10-13 22:11:30 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-03-10 20:54:38 +01:00
|
|
|
pname = "scribus";
|
|
|
|
version = "1.4.8";
|
2009-10-18 06:44:01 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-03-10 20:54:38 +01:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "0bq433myw6h1siqlsakxv6ghb002rp3mfz5k12bg68s0k6skn992";
|
2009-10-18 06:44:01 +02:00
|
|
|
};
|
|
|
|
|
2011-11-02 16:00:11 +01:00
|
|
|
enableParallelBuilding = true;
|
2009-10-18 06:44:01 +02:00
|
|
|
|
2019-03-10 20:54:38 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
2012-08-07 17:41:18 +02:00
|
|
|
buildInputs = with xorg;
|
2019-03-10 20:54:38 +01:00
|
|
|
[ freetype lcms libtiff libxml2 libart_lgpl qt4
|
2016-10-13 22:11:30 +02:00
|
|
|
pythonEnv cups fontconfig
|
2019-03-10 20:54:38 +01:00
|
|
|
libjpeg zlib libpng podofo hunspell cairo
|
2014-09-15 00:53:05 +02:00
|
|
|
boost # for internal 2geom library
|
2012-08-07 17:41:18 +02:00
|
|
|
libXaw libXext libX11 libXtst libXi libXinerama
|
|
|
|
libpthreadstubs libXau libXdmcp
|
2019-01-13 00:01:05 +01:00
|
|
|
imagemagick # To build the icon
|
2011-11-02 16:00:11 +01:00
|
|
|
];
|
2009-10-18 06:44:01 +02:00
|
|
|
|
2019-03-10 20:54:38 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace scribus/util_ghostscript.cpp \
|
|
|
|
--replace 'QString gsName("gs");' \
|
|
|
|
'QString gsName("${ghostscript}/bin/gs");'
|
|
|
|
'';
|
|
|
|
|
2019-01-13 00:01:05 +01:00
|
|
|
postInstall = ''
|
|
|
|
for i in 16 24 48 64 96 128 256 512; do
|
|
|
|
mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps
|
|
|
|
convert -background none -resize ''${i}x''${i} ${icon} $out/share/icons/hicolor/''${i}x''${i}/apps/scribus.png
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2009-10-18 06:44:01 +02:00
|
|
|
meta = {
|
2010-07-28 20:01:17 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
description = "Desktop Publishing (DTP) and Layout program for Linux";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.scribus.net";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2009-10-20 12:33:38 +02:00
|
|
|
};
|
2009-10-18 06:44:01 +02:00
|
|
|
}
|