glimpse: Drop package and plugins

This commit is contained in:
Jonas Heinrich 2022-07-07 16:54:25 +02:00 committed by Kerstin
parent 5b39c6bed9
commit 63d729665c
5 changed files with 0 additions and 268 deletions

View File

@ -1,200 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, substituteAll
, pkg-config
, 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
, python2
, libexif
, gettext
, xorg
, glib-networking
, libmypaint
, gexiv2
, harfbuzz
, mypaint-brushes1
, libwebp
, libheif
, libgudev
, openexr
, AppKit
, Cocoa
, gtk-mac-integration-gtk2
, libxslt
, automake
, autoconf
, libtool
, makeWrapper
, autoreconfHook
, gtk-doc
, graphviz
}:
let
python = python2.withPackages (pp: [ pp.pygtk ]);
in
stdenv.mkDerivation rec {
pname = "glimpse";
version = "0.2.0";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "glimpse-editor";
repo = "Glimpse";
rev = "v${version}";
sha256 = "sha256-qbZQmAo7fuJWWbn0QTyxAwAenZOdsGueUq5/3IV8Njc=";
};
patches = [
# to remove compiler from the runtime closure, reference was retained via
# gimp --version --verbose output
(substituteAll {
src = ./remove-cc-reference.patch;
cc_version = stdenv.cc.cc.name;
})
../gimp/hardcode-plugin-interpreters.patch
];
postPatch = ''
ln -s ${gtk-doc}/share/gtk-doc/data/gtk-doc.make .
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
intltool
gettext
automake
autoconf
makeWrapper
gtk-doc
libxslt
libtool
];
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
libexif
xorg.libXpm
glib-networking
libmypaint
mypaint-brushes1
] ++ lib.optionals stdenv.isDarwin [
AppKit
Cocoa
gtk-mac-integration-gtk2
] ++ lib.optionals stdenv.isLinux [
libgudev
];
# needed by gimp-2.0.pc
propagatedBuildInputs = [
gegl
];
# Check if librsvg was built with --disable-pixbuf-loader.
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
preAutoreconf = ''
# The check runs before glib-networking is registered
export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES"
'';
postFixup = ''
wrapProgram $out/bin/glimpse-${lib.versions.majorMinor version} \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix PATH ":" ${ lib.makeBinPath [ graphviz ] }
'';
passthru = rec {
# The declarations for `glimpse-with-plugins` wrapper,
# used for determining plug-in installation paths
majorVersion = "2.0";
targetPluginDir = "lib/glimpse/${majorVersion}/plug-ins";
targetScriptDir = "share/glimpse/${majorVersion}/scripts";
targetDataDir = "share/gimp/${majorVersion}";
targetLibDir = "lib/gimp/${majorVersion}";
# probably its a good idea to use the same gtk in plugins ?
gtk = gtk2;
};
configureFlags = [
"--without-webkit" # old version is required
"--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"
];
# on Darwin,
# test-eevl.c:64:36: error: initializer element is not a compile-time constant
doCheck = !stdenv.isDarwin;
enableParallelBuilding = true;
meta = with lib; {
description = "An open source image editor based on the GNU Image Manipulation Program";
longDescription = ''
Glimpse is an open source image editor based on the GNU Image Manipulation Program (GIMP). The goal is to experiment with new ideas and expand the use of free software.
'';
homepage = "https://glimpse-editor.org";
maintainers = with maintainers; [ ashkitten erictapen ];
license = licenses.gpl3Plus;
platforms = platforms.unix;
mainProgram = "glimpse";
};
}

View File

@ -1,11 +0,0 @@
# Use `glimpse-with-plugins` package for Glimpse with all plug-ins.
# If you just want a subset of plug-ins, you can specify them explicitly:
# `glimpse-with-plugins.override { plugins = with glimpsePlugins; [ gap ]; }`.
{ gimpPlugins, glimpse }:
# This attrs can be extended in the future if there happen to be glimpse-only
# plugins or some that need further modification in order to work with Glimpse.
gimpPlugins.overrideScope' (self: super: {
gimp = glimpse;
})

View File

@ -1,13 +0,0 @@
diff --git a/app/gimp-version.c b/app/gimp-version.c
index b584398231..1b40a1570f 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

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

View File

@ -27122,18 +27122,6 @@ with pkgs;
gimpPlugins = recurseIntoAttrs (callPackage ../applications/graphics/gimp/plugins {});
glimpse = callPackage ../applications/graphics/glimpse {
autoreconfHook = buildPackages.autoreconfHook269;
lcms = lcms2;
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
};
glimpse-with-plugins = callPackage ../applications/graphics/glimpse/wrapper.nix {
plugins = null; # All packaged plugins enabled, if not explicit plugin list supplied
};
glimpsePlugins = recurseIntoAttrs (callPackage ../applications/graphics/glimpse/plugins {});
girara = callPackage ../applications/misc/girara {
gtk = gtk3;
};