aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs/packages
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2022-02-22 05:17:09 -0500
committertdro <tdro@users.noreply.github.com>2022-02-22 05:17:09 -0500
commita4f45f2571b7fadfce75552eab64e3e9fc868718 (patch)
treeebd34a3217aa379947bab826ddaf55d676f9b7af /.config/nixpkgs/packages
parent7a681eb1c7b010545a684087d0f307457c86ea22 (diff)
downloaddotfiles-a4f45f2571b7fadfce75552eab64e3e9fc868718.tar.gz
dotfiles-a4f45f2571b7fadfce75552eab64e3e9fc868718.tar.bz2
dotfiles-a4f45f2571b7fadfce75552eab64e3e9fc868718.zip
.config/nixpkgs: Go back to scribus stable
Scribus unstable too unstable. Install/remove a few packages.
Diffstat (limited to '.config/nixpkgs/packages')
-rw-r--r--.config/nixpkgs/packages/scribus/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/.config/nixpkgs/packages/scribus/default.nix b/.config/nixpkgs/packages/scribus/default.nix
new file mode 100644
index 0000000..10be9e7
--- /dev/null
+++ b/.config/nixpkgs/packages/scribus/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchurl, pkg-config, freetype, lcms, libtiff, libxml2
+, gnome2, qt4, python2, cups, fontconfig, libjpeg, zlib, libpng, xorg
+, cairo, podofo, hunspell, boost, cmake, imagemagick, ghostscript }:
+
+let
+ icon = fetchurl {
+ url = "https://gist.githubusercontent.com/ejpcmac/a74b762026c9bc4000be624c3d085517/raw/18edc497c5cb6fdeef1c8aede37a0ee68413f9d3/scribus-icon-centered.svg";
+ sha256 = "0hq3i7c2l50445an9glhhg47kj26y16svfajc6naqn307ph9vzc3";
+ };
+
+ pythonEnv = python2.withPackages (ps: [ ps.tkinter ps.pillow ]);
+in stdenv.mkDerivation rec {
+ pname = "scribus";
+ version = "1.4.8";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/${pname}/${pname}/${pname}-${version}.tar.xz";
+ sha256 = "0bq433myw6h1siqlsakxv6ghb002rp3mfz5k12bg68s0k6skn992";
+ };
+
+ nativeBuildInputs = [ pkg-config cmake ];
+ buildInputs = with xorg; [
+ boost
+ cairo
+ cups
+ fontconfig
+ freetype
+ gnome2.libart_lgpl
+ hunspell
+ imagemagick
+ lcms
+ libX11
+ libXau
+ libXaw
+ libXdmcp
+ libXext
+ libXi
+ libXinerama
+ libXtst
+ libjpeg
+ libpng
+ libpthreadstubs
+ libtiff
+ libxml2
+ podofo
+ pythonEnv
+ qt4
+ zlib
+ ];
+
+ postPatch = ''
+ substituteInPlace scribus/util_ghostscript.cpp \
+ --replace 'QString gsName("gs");' \
+ 'QString gsName("${ghostscript}/bin/gs");'
+ '';
+
+ 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
+ '';
+
+ meta = {
+ maintainers = [ lib.maintainers.marcweber ];
+ platforms = lib.platforms.linux;
+ description = "Desktop Publishing (DTP) and Layout program for Linux";
+ homepage = "https://www.scribus.net";
+ license = lib.licenses.gpl2;
+ };
+}