push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,226 @@
{
stdenv,
lib,
fetchurl,
replaceVars,
autoreconfHook,
pkg-config,
intltool,
babl,
gegl,
gtk2,
glib,
gdk-pixbuf,
isocodes,
pango,
cairo,
freetype,
fontconfig,
lcms,
libpng,
libjpeg,
libjxl,
poppler,
poppler_data,
libtiff,
libmng,
librsvg,
libwmf,
zlib,
libzip,
xz,
ghostscript,
aalib,
shared-mime-info,
libexif,
gettext,
makeWrapper,
gtk-doc,
xorg,
glib-networking,
libmypaint,
gexiv2,
harfbuzz,
mypaint-brushes1,
libwebp,
libheif,
libxslt,
libgudev,
openexr,
desktopToDarwinBundle,
gtk-mac-integration-gtk2,
withPython ? false,
python2,
}:
let
python = python2.withPackages (pp: [ pp.pygtk ]);
in
stdenv.mkDerivation (finalAttrs: {
pname = "gimp";
version = "2.10.38";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.bz2";
sha256 = "sha256-UKhF7sEciDH+hmFweVD1uERuNfMO37ms+Y+FwRM/hW4=";
};
patches = [
# to remove compiler from the runtime closure, reference was retained via
# gimp --version --verbose output
(replaceVars ./remove-cc-reference.patch {
cc_version = stdenv.cc.cc.name;
})
# Use absolute paths instead of relying on PATH
# to make sure plug-ins are loaded by the correct interpreter.
./hardcode-plugin-interpreters.patch
# GIMP queries libheif.pc for builtin encoder/decoder support to determine if AVIF/HEIC files are supported
# (see https://gitlab.gnome.org/GNOME/gimp/-/blob/a8b1173ca441283971ee48f4778e2ffd1cca7284/configure.ac?page=2#L1846-1852)
# These variables have been removed since libheif 1.18.0
# (see https://github.com/strukturag/libheif/commit/cf0d89c6e0809427427583290547a7757428cf5a)
# This has already been fixed for the upcoming GIMP 3, but the fix has not been backported to 2.x yet
# (see https://gitlab.gnome.org/GNOME/gimp/-/issues/9080)
./force-enable-libheif.patch
];
# error: possibly undefined macro: AM_NLS
preAutoreconf = ''
cp ${gettext}/share/gettext/m4/nls.m4 m4macros
'';
nativeBuildInputs = [
autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am
pkg-config
intltool
gettext
makeWrapper
gtk-doc
libxslt
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = [
babl
gegl
gtk2
glib
gdk-pixbuf
pango
cairo
gexiv2
harfbuzz
isocodes
freetype
fontconfig
lcms
libpng
libjpeg
libjxl
poppler
poppler_data
libtiff
openexr
libmng
librsvg
libwmf
zlib
libzip
xz
ghostscript
aalib
shared-mime-info
libwebp
libheif
libexif
xorg.libXpm
glib-networking
libmypaint
mypaint-brushes1
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
gtk-mac-integration-gtk2
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libgudev
]
++ lib.optionals withPython [
python
# Duplicated here because python.withPackages does not expose the dev output with pkg-config files
python2.pkgs.pygtk
];
# needed by gimp-2.0.pc
propagatedBuildInputs = [
gegl
];
configureFlags = [
"--without-webkit" # old version is required
"--disable-check-update"
"--with-bug-report-url=https://github.com/NixOS/nixpkgs/issues/new"
"--with-icc-directory=/run/current-system/sw/share/color/icc"
# fix libdir in pc files (${exec_prefix} needs to be passed verbatim)
"--libdir=\${exec_prefix}/lib"
]
++ lib.optionals (!withPython) [
"--disable-python" # depends on Python2 which was EOLed on 2020-01-01
];
enableParallelBuilding = true;
doCheck = true;
env = {
NIX_CFLAGS_COMPILE = toString (
[ ]
++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ]
);
# Check if librsvg was built with --disable-pixbuf-loader.
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
};
preConfigure = ''
# The check runs before glib-networking is registered
export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES"
'';
postFixup = ''
wrapProgram $out/bin/gimp-${lib.versions.majorMinor finalAttrs.version} \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
'';
passthru = {
# The declarations for `gimp-with-plugins` wrapper,
# used for determining plug-in installation paths
majorVersion = "${lib.versions.major finalAttrs.version}.0";
targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}";
targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}";
targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins";
targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts";
# probably its a good idea to use the same gtk in plugins ?
gtk = gtk2;
python2Support = withPython;
};
meta = with lib; {
description = "GNU Image Manipulation Program";
homepage = "https://www.gimp.org/";
maintainers = [ ];
license = licenses.gpl3Plus;
platforms = platforms.unix;
mainProgram = "gimp";
};
})

View File

@@ -0,0 +1,22 @@
diff --git a/configure.ac b/configure.ac
index 48c3c77892..3189781817 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1843,13 +1843,13 @@ can_export_heic=no
can_import_avif=no
can_export_avif=no
if test "x$have_libheif" = xyes; then
- can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif`
- can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif`
+ can_import_heic=yes
+ can_export_heic=yes
if test "x$can_import_heic" = xyes; then
MIME_TYPES="$MIME_TYPES;image/heif;image/heic"
fi
- can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif`
- can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif`
+ can_import_avif=yes
+ can_export_avif=yes
if test "x$can_import_avif" = xyes; then
MIME_TYPES="$MIME_TYPES;image/avif"
fi

View File

@@ -0,0 +1,11 @@
--- a/plug-ins/pygimp/Makefile.am
+++ b/plug-ins/pygimp/Makefile.am
@@ -157,7 +157,7 @@ install-interp-file:
echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)'
echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)'
+ echo ":Python:E::py::$(PYTHON):" >> '$(DESTDIR)$(pyinterpfile)'
install-data-local: install-env-file install-interp-file

View File

@@ -0,0 +1,13 @@
diff --git a/app/gimp-version.c b/app/gimp-version.c
index 3d1894a036..48bb670b64 100644
--- a/app/gimp-version.c
+++ b/app/gimp-version.c
@@ -230,7 +230,7 @@ gimp_version (gboolean be_verbose,
GIMP_BUILD_ID,
gimp_version_get_revision (),
GIMP_BUILD_PLATFORM_FAMILY,
- CC_VERSION,
+ "@cc_version@",
lib_versions);
g_free (lib_versions);

View File

@@ -0,0 +1,333 @@
{
stdenv,
lib,
fetchurl,
replaceVars,
meson,
ninja,
pkg-config,
babl,
cfitsio,
gegl,
gtk3,
glib,
gdk-pixbuf,
graphviz,
isocodes,
pango,
cairo,
libarchive,
luajit,
freetype,
fontconfig,
lcms,
libpng,
libiff,
libilbm,
libjpeg,
libjxl,
poppler,
poppler_data,
libtiff,
libmng,
librsvg,
libwmf,
zlib,
xz,
libzip,
ghostscript,
aalib,
shared-mime-info,
python3,
libexif,
gettext,
wrapGAppsHook3,
libxslt,
gobject-introspection,
vala,
gi-docgen,
perl,
appstream-glib,
desktop-file-utils,
xorg,
glib-networking,
json-glib,
libmypaint,
llvmPackages,
gexiv2,
harfbuzz,
mypaint-brushes1,
libwebp,
libheif,
gjs,
libgudev,
openexr,
xvfb-run,
dbus,
adwaita-icon-theme,
alsa-lib,
desktopToDarwinBundle,
fetchpatch,
}:
let
python = python3.withPackages (
pp: with pp; [
pygobject3
]
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "gimp";
version = "3.0.4";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchurl {
url = "https://download.gimp.org/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.xz";
hash = "sha256-jKouwnW/CTJldWVKwnavwIP4SR58ykXRnPKeaWrsqyU=";
};
patches = [
# to remove compiler from the runtime closure, reference was retained via
# gimp --version --verbose output
(replaceVars ./remove-cc-reference.patch {
cc_version = stdenv.cc.cc.name;
})
# Use absolute paths instead of relying on PATH
# to make sure plug-ins are loaded by the correct interpreter.
# TODO: This now only appears to be used on Windows.
(replaceVars ./hardcode-plugin-interpreters.patch {
python_interpreter = python.interpreter;
PYTHON_EXE = null;
})
# D-Bus configuration is not available in the build sandbox
# so we need to pick up the one from the package.
(replaceVars ./tests-dbus-conf.patch {
session_conf = "${dbus.out}/share/dbus-1/session.conf";
})
# Fix a crash that occurs when trying to pick a color for text outline
# TODO: remove after GIMP 3.2 is released, per https://gitlab.gnome.org/GNOME/gimp/-/issues/14047#note_2491655
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/1685c86af5d6253151d0056a9677ba469ea10164.diff";
hash = "sha256-Rb3ANXWki21thByEIWkBgWEml4x9Qq2HAIB9ho1bygw=";
})
];
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
wrapGAppsHook3
libxslt # for xsltproc
gobject-introspection
perl
vala
# for docs
gi-docgen
# for tests
desktop-file-utils
]
++ lib.optionals stdenv.hostPlatform.isLinux [
dbus
xvfb-run
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = [
appstream-glib # for library
babl
cfitsio
gegl
gtk3
glib
gdk-pixbuf
pango
cairo
libarchive
gexiv2
harfbuzz
isocodes
freetype
fontconfig
lcms
libpng
libiff
libilbm
libjpeg
libjxl
poppler
poppler_data
libtiff
openexr
libmng
librsvg
libwmf
zlib
xz
libzip
ghostscript
aalib
shared-mime-info
json-glib
libwebp
libheif
python
libexif
xorg.libXpm
xorg.libXmu
glib-networking
libmypaint
mypaint-brushes1
# New file dialogue crashes with “Icon 'image-missing' not present in theme Symbolic” without an icon theme.
adwaita-icon-theme
# for Lua plug-ins
(luajit.withPackages (pp: [
pp.lgi
]))
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
# for JavaScript plug-ins
gjs
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.openmp
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libgudev
];
propagatedBuildInputs = [
# needed by gimp-3.0.pc
gegl
cairo
pango
gexiv2
];
mesonFlags = [
"-Dbug-report-url=https://github.com/NixOS/nixpkgs/issues/new"
"-Dicc-directory=/run/current-system/sw/share/color/icc"
"-Dcheck-update=no"
(lib.mesonEnable "gudev" stdenv.hostPlatform.isLinux)
(lib.mesonEnable "headless-tests" stdenv.hostPlatform.isLinux)
(lib.mesonEnable "linux-input" stdenv.hostPlatform.isLinux)
# Not very important to do downstream, save a dependency.
"-Dappdata-test=disabled"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-Dalsa=disabled"
"-Djavascript=disabled"
];
doCheck = true;
env = {
# The check runs before glib-networking is registered
GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules";
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DGDK_OSX_BIG_SUR=16";
# Check if librsvg was built with --disable-pixbuf-loader.
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
};
postPatch = ''
patchShebangs tools/gimp-mkenums
# GIMP is executed at build time so we need to fix this.
# TODO: Look into if we can fix the interp thing.
chmod +x plug-ins/python/{colorxhtml,file-openraster,foggify,gradients-save-as-css,histogram-export,palette-offset,palette-sort,palette-to-gradient,python-eval,spyro-plus}.py
patchShebangs \
plug-ins/python/{colorxhtml,file-openraster,foggify,gradients-save-as-css,histogram-export,palette-offset,palette-sort,palette-to-gradient,python-eval,spyro-plus}.py
'';
preBuild =
let
librarySuffix =
if stdenv.hostPlatform.extensions.library == ".so" then
"3.0.so.0"
else if stdenv.hostPlatform.extensions.library == ".dylib" then
"3.0.0.dylib"
else
throw "Unsupported library extension ${stdenv.hostPlatform.extensions.library}";
in
''
# Our gobject-introspection patches make the shared library paths absolute
# in the GIR files. When running GIMP in build or check phase, it will try
# to use plug-ins, which import GIMP introspection files which will try
# to load the GIMP libraries which will not be installed yet.
# So we need to replace the absolute path with a local one.
# We are using a symlink that will be overridden during installation.
mkdir -p "$out/lib"
ln -s "$PWD/libgimp/libgimp-${librarySuffix}" \
"$PWD/libgimpbase/libgimpbase-${librarySuffix}" \
"$PWD/libgimpcolor/libgimpcolor-${librarySuffix}" \
"$PWD/libgimpconfig/libgimpconfig-${librarySuffix}" \
"$PWD/libgimpmath/libgimpmath-${librarySuffix}" \
"$PWD/libgimpmodule/libgimpmodule-${librarySuffix}" \
"$out/lib/"
'';
preCheck = ''
# Avoid Error retrieving accessibility bus address
export NO_AT_BRIDGE=1
# Fix storing recent file list in tests
export HOME="$TMPDIR"
export XDG_DATA_DIRS="${glib.getSchemaDataDirPath gtk3}:${adwaita-icon-theme}/share:$XDG_DATA_DIRS"
'';
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${
lib.makeBinPath [
# for dot for gegl:introspect (Debug » Show Image Graph, hidden by default on stable release)
graphviz
# for gimp-script-fu-interpreter-3.0 invoked by shebang of some plug-ins
"$out"
]
}")
'';
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
# The declarations for `gimp-with-plugins` wrapper,
# used for determining plug-in installation paths
majorVersion = "${lib.versions.major finalAttrs.version}.0";
targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}";
targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}";
targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins";
targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts";
# probably its a good idea to use the same gtk in plugins ?
gtk = gtk3;
};
meta = with lib; {
description = "GNU Image Manipulation Program";
homepage = "https://www.gimp.org/";
maintainers = with maintainers; [ jtojnar ];
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = "gimp";
};
})

View File

@@ -0,0 +1,8 @@
--- a/plug-ins/python/pygimp.interp.in
+++ b/plug-ins/python/pygimp.interp.in
@@ -2,4 +2,4 @@ python=@PYTHON_EXE@
python3=@PYTHON_EXE@
/usr/bin/python=@PYTHON_EXE@
/usr/bin/python3=@PYTHON_EXE@
-:Python:E::py::python3:
+:Python:E::py::@python_interpreter@:

View File

@@ -0,0 +1,383 @@
# Use `gimp-with-plugins` package for GIMP with all plug-ins.
# If you just want a subset of plug-ins, you can specify them explicitly:
# `gimp-with-plugins.override { plugins = with gimpPlugins; [ gap ]; }`.
{
lib,
pkgs,
gimp,
}:
let
inherit (pkgs)
stdenv
fetchurl
fetchpatch
fetchpatch2
pkg-config
intltool
glib
fetchFromGitHub
fetchFromGitLab
;
# We cannot use gimp from the arguments directly, or it would be shadowed by the one
# from scope when initializing the scope with it, leading to infinite recursion.
gimpArg = gimp;
in
lib.makeScope pkgs.newScope (
self:
let
# Use GIMP from the scope.
inherit (self) gimp;
pluginDerivation =
attrs:
let
name = attrs.name or "${attrs.pname}-${attrs.version}";
pkgConfigMajorVersion = lib.versions.major gimp.version;
in
stdenv.mkDerivation (
{
prePhases = [ "extraLib" ];
extraLib = ''
installScripts(){
mkdir -p $out/${gimp.targetScriptDir}/${name};
for p in "$@"; do cp "$p" -r $out/${gimp.targetScriptDir}/${name}; done
}
installPlugin() {
# The base name of the first argument is the plug-in name and the main executable.
# GIMP only allows a single plug-in per directory:
# https://gitlab.gnome.org/GNOME/gimp/-/commit/efae55a73e98389e38fa0e59ebebcda0abe3ee96
pluginDir=$out/${gimp.targetPluginDir}/$(basename "$1")
install -Dt "$pluginDir" "$@"
}
'';
}
// attrs
// {
name = "${gimp.pname}-plugin-${name}";
buildInputs = [
gimp
gimp.gtk
glib
]
++ (attrs.buildInputs or [ ]);
nativeBuildInputs = [
pkg-config
intltool
]
++ (attrs.nativeBuildInputs or [ ]);
# Override installation paths.
env = {
"PKG_CONFIG_GIMP_${pkgConfigMajorVersion}_0_GIMPLIBDIR" =
"${placeholder "out"}/${gimp.targetLibDir}";
"PKG_CONFIG_GIMP_${pkgConfigMajorVersion}_0_GIMPDATADIR" =
"${placeholder "out"}/${gimp.targetDataDir}";
}
// attrs.env or { };
}
);
scriptDerivation =
{ src, ... }@attrs:
pluginDerivation (
{
prePhases = [ "extraLib" ];
dontUnpack = true;
installPhase = ''
runHook preInstall
installScripts ${src}
runHook postInstall
'';
}
// attrs
);
in
{
# Allow overriding GIMP package in the scope.
gimp = gimpArg;
bimp = pluginDerivation rec {
/*
menu:
File/Batch Image Manipulation...
*/
pname = "bimp";
version = "2.6";
src = fetchFromGitHub {
owner = "alessandrofrancesconi";
repo = "gimp-plugin-bimp";
rev = "v${version}";
hash = "sha256-IJ3+/9UwxJTRo0hUdzlOndOHwso1wGv7Q4UuhbsFkco=";
};
patches = [
# Allow overriding installation path
# https://github.com/alessandrofrancesconi/gimp-plugin-bimp/pull/311
(fetchpatch {
url = "https://github.com/alessandrofrancesconi/gimp-plugin-bimp/commit/098edb5f70a151a3f377478fd6e0d08ed56b8ef7.patch";
sha256 = "2Afx9fmdn6ztbsll2f2j7mfffMWYWyr4BuBy9ySV6vM=";
})
];
postPatch = ''
substituteInPlace Makefile \
--replace-fail "gcc" "${stdenv.cc.targetPrefix}cc"
'';
nativeBuildInputs = with pkgs; [ which ];
# workaround for issue:
# https://github.com/alessandrofrancesconi/gimp-plugin-bimp/issues/411
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
installFlags = [
"SYSTEM_INSTALL_DIR=${placeholder "out"}/${gimp.targetPluginDir}/bimp"
];
installTargets = [ "install-admin" ];
meta = with lib; {
broken = gimp.majorVersion != "2.0";
description = "Batch Image Manipulation Plugin for GIMP";
homepage = "https://github.com/alessandrofrancesconi/gimp-plugin-bimp";
license = licenses.gpl2Plus;
maintainers = [ ];
};
};
farbfeld = pluginDerivation {
pname = "farbfeld";
version = "unstable-2019-08-12";
src = fetchFromGitHub {
owner = "ids1024";
repo = "gimp-farbfeld";
rev = "5feacebf61448bd3c550dda03cd08130fddc5af4";
sha256 = "1vmw7k773vrndmfffj0m503digdjmkpcqy2r3p3i5x0qw9vkkkc6";
};
installPhase = ''
installPlugin farbfeld
'';
meta = {
broken = gimp.majorVersion != "2.0";
description = "Gimp plug-in for the farbfeld image format";
homepage = "https://github.com/ids1024/gimp-farbfeld";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sikmir ];
};
};
fourier = pluginDerivation rec {
/*
menu:
Filters/Generic/FFT Forward
Filters/Generic/FFT Inverse
*/
pname = "fourier";
version = "0.4.3";
src = fetchurl {
url = "https://www.lprp.fr/files/old-web/soft/gimp/${pname}-${version}.tar.gz";
sha256 = "0mf7f8vaqs2madx832x3kcxw3hv3w3wampvzvaps1mkf2kvrjbsn";
};
buildInputs = with pkgs; [ fftw ];
postPatch = ''
substituteInPlace Makefile --replace '$(GCC)' '$(CC)'
# The tarball contains a prebuilt binary.
make clean
'';
installPhase = ''
runHook preInstall
installPlugin fourier
runHook postInstall
'';
meta = with lib; {
broken = gimp.majorVersion != "2.0";
description = "GIMP plug-in to do the fourier transform";
homepage = "https://people.via.ecp.fr/~remi/soft/gimp/gimp_plugin_en.php3#fourier";
license = with licenses; [ gpl3Plus ];
};
};
resynthesizer = pluginDerivation rec {
/*
menu:
Edit/Fill with pattern seamless...
Filters/Enhance/Heal selection...
Filters/Enhance/Heal transparency...
Filters/Enhance/Sharpen by synthesis...
Filters/Enhance/Uncrop...
Filters/Map/Style...
Filters/Render/Texture...
*/
pname = "resynthesizer";
version = "2.0.3";
buildInputs = with pkgs; [ fftw ];
nativeBuildInputs = with pkgs; [ autoreconfHook ];
makeFlags = [ "GIMP_LIBDIR=${placeholder "out"}/${gimp.targetLibDir}" ];
src = fetchFromGitHub {
owner = "bootchk";
repo = "resynthesizer";
rev = "v${version}";
sha256 = "1jwc8bhhm21xhrgw56nzbma6fwg59gc8anlmyns7jdiw83y0zx3j";
};
meta = {
broken = gimp.majorVersion != "2.0";
};
};
texturize = pluginDerivation {
pname = "texturize";
version = "2.2+unstable=2021-12-03";
src = fetchFromGitHub {
owner = "lmanul";
repo = "gimp-texturize";
rev = "9ceff0d411cda018108e5477320669b8d00d811e";
sha256 = "haYS0K3oAPlHtHB8phOCX5/gtWq9uiVQhG5ZhAFX0t0=";
};
nativeBuildInputs = with pkgs; [
meson
ninja
gettext
];
meta = {
broken = gimp.majorVersion != "2.0";
};
};
waveletSharpen = pluginDerivation {
/*
menu:
Filters/Enhance/Wavelet sharpen
*/
pname = "wavelet-sharpen";
version = "0.1.2";
src = fetchurl {
url = "https://github.com/pixlsus/registry.gimp.org_static/raw/master/registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz";
sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw";
};
env = {
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: interface.o:(.bss+0xe0): multiple definition of `fimg'; plugin.o:(.bss+0x40): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = "-lm";
};
installPhase = "installPlugin src/wavelet-sharpen"; # TODO translations are not copied .. How to do this on nix?
meta = {
broken = gimp.majorVersion != "2.0";
};
};
lqrPlugin = pluginDerivation rec {
/*
menu:
Layer/Liquid Rescale
*/
pname = "lqr-plugin";
version = "0.7.2";
buildInputs = with pkgs; [ liblqr1 ];
src = fetchFromGitHub {
owner = "carlobaldassi";
repo = "gimp-lqr-plugin";
rev = "v${version}";
sha256 = "81ajdZ2zQi/THxnBlSeT36tVTEzrS1YqLGpHMhFTKAo=";
};
patches = [
# Pull upstream fix for -fno-common toolchain support:
# https://github.com/carlobaldassi/gimp-lqr-plugin/pull/6
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/carlobaldassi/gimp-lqr-plugin/commit/ae3464a82e1395fc577cc94999bdc7c4a7bb35f1.patch";
sha256 = "EdjZWM6U1bhUmsOnLA8iJ4SFKuAXHIfNPzxZqel+JrY=";
})
];
meta = {
broken = gimp.majorVersion != "2.0";
};
};
gmic = pkgs.gmic-qt.override {
variant = "gimp";
inherit (self) gimp;
};
gimplensfun = pluginDerivation {
version = "unstable-2018-10-21";
pname = "gimplensfun";
src = fetchFromGitHub {
owner = "seebk";
repo = "GIMP-Lensfun";
rev = "1c5a5c1534b5faf098b7441f8840d22835592f17";
sha256 = "1jj3n7spkjc63aipwdqsvq9gi07w13bb1v8iqzvxwzld2kxa3c8w";
};
buildInputs = (
with pkgs;
[
lensfun
gexiv2
]
++ lib.optional stdenv.cc.isClang llvmPackages.openmp
);
installPhase = "
installPlugin gimp-lensfun
";
meta = {
broken = gimp.majorVersion != "2.0";
description = "GIMP plugin to correct lens distortion using the lensfun library and database";
homepage = "http://lensfun.sebastiankraft.net/";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
};
};
# =============== simple script files ====================
# also have a look at enblend-enfuse in all-packages.nix
exposureBlend = scriptDerivation {
name = "exposure-blend";
src = fetchurl {
url = "http://tir.astro.utoledo.edu/jdsmith/code/eb/exposure-blend.scm";
sha256 = "1b6c9wzpklqras4wwsyw3y3jp6fjmhnnskqiwm5sabs8djknfxla";
};
meta.broken = true;
};
lightning = scriptDerivation {
name = "Lightning";
src = fetchurl {
url = "https://github.com/pixlsus/registry.gimp.org_static/raw/master/registry.gimp.org/files/Lightning.scm";
sha256 = "c14a8f4f709695ede3f77348728a25b3f3ded420da60f3f8de3944b7eae98a49";
};
};
}
)

View File

@@ -0,0 +1,13 @@
diff --git a/app/gimp-version.c b/app/gimp-version.c
index 6e311c8252..e6fd9d1d78 100644
--- a/app/gimp-version.c
+++ b/app/gimp-version.c
@@ -90,7 +90,7 @@ gimp_version (gboolean be_verbose,
GIMP_BUILD_ID,
gimp_version_get_revision (),
GIMP_BUILD_PLATFORM_FAMILY,
- CC_VERSION,
+ "@cc_version@",
lib_versions);
g_free (lib_versions);

View File

@@ -0,0 +1,11 @@
--- a/build/meson/run_test_env.sh
+++ b/build/meson/run_test_env.sh
@@ -33,7 +33,7 @@ if [ -n "${UI_TEST}" ]; then
OPT="--auto-servernum"
fi
xvfb-run $OPT --server-args="-screen 0 1280x1024x24" \
- dbus-run-session -- "$@"
+ dbus-run-session --config-file="@session_conf@" -- "$@"
else
# Run the executable directly,

View File

@@ -0,0 +1,47 @@
{
lib,
symlinkJoin,
makeWrapper,
gimpPlugins,
gnome-themes-extra,
plugins ? null,
}:
let
inherit (gimpPlugins) gimp;
allPlugins = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (
lib.attrValues gimpPlugins
);
selectedPlugins = lib.filter (pkg: pkg != gimp) (if plugins == null then allPlugins else plugins);
extraArgs =
map (x: x.wrapArgs or "") selectedPlugins
++ lib.optionals (gimp.majorVersion == "2.0") [
''--prefix GTK_PATH : "${gnome-themes-extra}/lib/gtk-2.0"''
];
exeVersion =
if gimp.majorVersion == "2.0" then lib.versions.majorMinor gimp.version else gimp.majorVersion;
majorVersion = lib.versions.major gimp.version;
in
symlinkJoin {
name = "gimp-with-plugins-${gimp.version}";
paths = [ gimp ] ++ selectedPlugins;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
for each in gimp-${exeVersion} gimp-console-${exeVersion}; do
wrapProgram $out/bin/$each \
--set GIMP${majorVersion}_PLUGINDIR "$out/${gimp.targetLibDir}" \
--set GIMP${majorVersion}_DATADIR "$out/${gimp.targetDataDir}" \
${toString extraArgs}
done
set +x
for each in gimp gimp-console; do
ln -sf "$each-${exeVersion}" $out/bin/$each
done
'';
inherit (gimp) meta;
}