gimp: format with nixpkgs-format

This commit is contained in:
Jan Tojnar 2019-10-31 23:20:09 +01:00
parent c75c6b588a
commit 43c3f471b8
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,9 +1,50 @@
{ stdenv, fetchurl, substituteAll, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk-pixbuf, isocodes
, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, poppler_data, libtiff
, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info
, python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2
, harfbuzz, mypaint-brushes, libwebp, libheif, libgudev, openexr
, AppKit, Cocoa, gtk-mac-integration-gtk2 }:
{ stdenv
, lib
, fetchurl
, substituteAll
, pkgconfig
, intltool
, babl
, gegl
, gtk2
, glib
, gdk-pixbuf
, isocodes
, pango
, cairo
, freetype
, fontconfig
, lcms
, libpng
, libjpeg
, poppler
, poppler_data
, libtiff
, libmng
, librsvg
, libwmf
, zlib
, libzip
, ghostscript
, aalib
, shared-mime-info
, python2Packages
, libexif
, gettext
, xorg
, glib-networking
, libmypaint
, gexiv2
, harfbuzz
, mypaint-brushes
, libwebp
, libheif
, libgudev
, openexr
, AppKit
, Cocoa
, gtk-mac-integration-gtk2
}:
let
inherit (python2Packages) pygtk wrapPython python;
@ -12,20 +53,66 @@ in stdenv.mkDerivation rec {
version = "2.10.14";
src = fetchurl {
url = "http://download.gimp.org/pub/gimp/v${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz";
};
nativeBuildInputs = [ pkgconfig intltool gettext wrapPython ];
propagatedBuildInputs = [ gegl ]; # needed by gimp-2.0.pc
nativeBuildInputs = [
pkgconfig
intltool
gettext
wrapPython
];
buildInputs = [
babl gegl gtk2 glib gdk-pixbuf pango cairo gexiv2 harfbuzz isocodes
freetype fontconfig lcms libpng libjpeg poppler poppler_data libtiff openexr
libmng librsvg libwmf zlib libzip ghostscript aalib shared-mime-info libwebp libheif
python pygtk libexif xorg.libXpm glib-networking libmypaint mypaint-brushes
] ++ stdenv.lib.optionals stdenv.isDarwin [
AppKit Cocoa gtk-mac-integration-gtk2
] ++ stdenv.lib.optionals stdenv.isLinux [ libgudev ];
babl
gegl
gtk2
glib
gdk-pixbuf
pango
cairo
gexiv2
harfbuzz
isocodes
freetype
fontconfig
lcms
libpng
libjpeg
poppler
poppler_data
libtiff
openexr
libmng
librsvg
libwmf
zlib
libzip
ghostscript
aalib
shared-mime-info
libwebp
libheif
python
pygtk
libexif
xorg.libXpm
glib-networking
libmypaint
mypaint-brushes
] ++ lib.optionals stdenv.isDarwin [
AppKit
Cocoa
gtk-mac-integration-gtk2
] ++ lib.optionals stdenv.isLinux [
libgudev
];
# needed by gimp-2.0.pc
propagatedBuildInputs = [
gegl
];
pythonPath = [ pygtk ];
@ -48,7 +135,7 @@ in stdenv.mkDerivation rec {
postFixup = ''
wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/
wrapProgram $out/bin/gimp-${stdenv.lib.versions.majorMinor version} \
wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \
--prefix PYTHONPATH : "$PYTHONPATH" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
'';
@ -56,7 +143,7 @@ in stdenv.mkDerivation rec {
passthru = rec {
# The declarations for `gimp-with-plugins` wrapper,
# used for determining plug-in installation paths
majorVersion = "${stdenv.lib.versions.major version}.0";
majorVersion = "${lib.versions.major version}.0";
targetPluginDir = "lib/gimp/${majorVersion}/plug-ins";
targetScriptDir = "lib/gimp/${majorVersion}/scripts";
@ -76,9 +163,9 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "The GNU Image Manipulation Program";
homepage = https://www.gimp.org/;
homepage = "https://www.gimp.org/";
maintainers = with maintainers; [ jtojnar ];
license = licenses.gpl3Plus;
platforms = platforms.unix;