gimp: format with nixpkgs-format
This commit is contained in:
parent
c75c6b588a
commit
43c3f471b8
1 changed files with 107 additions and 20 deletions
|
@ -1,9 +1,50 @@
|
||||||
{ stdenv, fetchurl, substituteAll, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk-pixbuf, isocodes
|
{ stdenv
|
||||||
, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, poppler_data, libtiff
|
, lib
|
||||||
, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info
|
, fetchurl
|
||||||
, python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2
|
, substituteAll
|
||||||
, harfbuzz, mypaint-brushes, libwebp, libheif, libgudev, openexr
|
, pkgconfig
|
||||||
, AppKit, Cocoa, gtk-mac-integration-gtk2 }:
|
, 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
|
let
|
||||||
inherit (python2Packages) pygtk wrapPython python;
|
inherit (python2Packages) pygtk wrapPython python;
|
||||||
|
@ -12,20 +53,66 @@ in stdenv.mkDerivation rec {
|
||||||
version = "2.10.14";
|
version = "2.10.14";
|
||||||
|
|
||||||
src = fetchurl {
|
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";
|
sha256 = "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig intltool gettext wrapPython ];
|
nativeBuildInputs = [
|
||||||
propagatedBuildInputs = [ gegl ]; # needed by gimp-2.0.pc
|
pkgconfig
|
||||||
|
intltool
|
||||||
|
gettext
|
||||||
|
wrapPython
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
babl gegl gtk2 glib gdk-pixbuf pango cairo gexiv2 harfbuzz isocodes
|
babl
|
||||||
freetype fontconfig lcms libpng libjpeg poppler poppler_data libtiff openexr
|
gegl
|
||||||
libmng librsvg libwmf zlib libzip ghostscript aalib shared-mime-info libwebp libheif
|
gtk2
|
||||||
python pygtk libexif xorg.libXpm glib-networking libmypaint mypaint-brushes
|
glib
|
||||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
gdk-pixbuf
|
||||||
AppKit Cocoa gtk-mac-integration-gtk2
|
pango
|
||||||
] ++ stdenv.lib.optionals stdenv.isLinux [ libgudev ];
|
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 ];
|
pythonPath = [ pygtk ];
|
||||||
|
|
||||||
|
@ -48,7 +135,7 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/
|
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" \
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
||||||
'';
|
'';
|
||||||
|
@ -56,7 +143,7 @@ in stdenv.mkDerivation rec {
|
||||||
passthru = rec {
|
passthru = rec {
|
||||||
# The declarations for `gimp-with-plugins` wrapper,
|
# The declarations for `gimp-with-plugins` wrapper,
|
||||||
# used for determining plug-in installation paths
|
# 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";
|
targetPluginDir = "lib/gimp/${majorVersion}/plug-ins";
|
||||||
targetScriptDir = "lib/gimp/${majorVersion}/scripts";
|
targetScriptDir = "lib/gimp/${majorVersion}/scripts";
|
||||||
|
|
||||||
|
@ -76,9 +163,9 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "The GNU Image Manipulation Program";
|
description = "The GNU Image Manipulation Program";
|
||||||
homepage = https://www.gimp.org/;
|
homepage = "https://www.gimp.org/";
|
||||||
maintainers = with maintainers; [ jtojnar ];
|
maintainers = with maintainers; [ jtojnar ];
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
Loading…
Reference in a new issue