glimpse: init at 0.2.0

Co-authored-by: Louis Bettens <louis@bettens.info>
Co-authored-by: ash lea <example@thisismyactual.email>

+265 -1
+1 -1
pkgs/applications/graphics/gimp/plugins/default.nix
··· 35 } 36 // attrs 37 // { 38 - name = "gimp-plugin-${name}"; 39 buildInputs = [ 40 gimp 41 gimp.gtk
··· 35 } 36 // attrs 37 // { 38 + name = "${gimp.name}-plugin-${name}"; 39 buildInputs = [ 40 gimp 41 gimp.gtk
+197
pkgs/applications/graphics/glimpse/default.nix
···
··· 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , substituteAll 5 + , pkg-config 6 + , intltool 7 + , babl 8 + , gegl 9 + , gtk2 10 + , glib 11 + , gdk-pixbuf 12 + , isocodes 13 + , pango 14 + , cairo 15 + , freetype 16 + , fontconfig 17 + , lcms 18 + , libpng 19 + , libjpeg 20 + , poppler 21 + , poppler_data 22 + , libtiff 23 + , libmng 24 + , librsvg 25 + , libwmf 26 + , zlib 27 + , libzip 28 + , ghostscript 29 + , aalib 30 + , shared-mime-info 31 + , python2 32 + , libexif 33 + , gettext 34 + , xorg 35 + , glib-networking 36 + , libmypaint 37 + , gexiv2 38 + , harfbuzz 39 + , mypaint-brushes1 40 + , libwebp 41 + , libheif 42 + , libgudev 43 + , openexr 44 + , AppKit 45 + , Cocoa 46 + , gtk-mac-integration-gtk2 47 + , libxslt 48 + , automake 49 + , autoconf 50 + , libtool 51 + , makeWrapper 52 + , autoreconfHook 53 + , gtk-doc 54 + }: 55 + let 56 + python = python2.withPackages (pp: [ pp.pygtk ]); 57 + in 58 + stdenv.mkDerivation rec { 59 + pname = "glimpse"; 60 + version = "0.2.0"; 61 + 62 + outputs = [ "out" "dev" ]; 63 + 64 + src = fetchFromGitHub { 65 + owner = "glimpse-editor"; 66 + repo = "Glimpse"; 67 + rev = "v${version}"; 68 + sha256 = "sha256-qbZQmAo7fuJWWbn0QTyxAwAenZOdsGueUq5/3IV8Njc="; 69 + }; 70 + 71 + patches = [ 72 + # to remove compiler from the runtime closure, reference was retained via 73 + # gimp --version --verbose output 74 + (substituteAll { 75 + src = ./remove-cc-reference.patch; 76 + cc_version = stdenv.cc.cc.name; 77 + }) 78 + ../gimp/hardcode-plugin-interpreters.patch 79 + ]; 80 + 81 + postPatch = '' 82 + ln -s ${gtk-doc}/share/gtk-doc/data/gtk-doc.make . 83 + ''; 84 + 85 + nativeBuildInputs = [ 86 + autoreconfHook 87 + pkg-config 88 + intltool 89 + gettext 90 + automake 91 + autoconf 92 + makeWrapper 93 + gtk-doc 94 + libxslt 95 + libtool 96 + ]; 97 + 98 + buildInputs = [ 99 + babl 100 + gegl 101 + gtk2 102 + glib 103 + gdk-pixbuf 104 + pango 105 + cairo 106 + gexiv2 107 + harfbuzz 108 + isocodes 109 + freetype 110 + fontconfig 111 + lcms 112 + libpng 113 + libjpeg 114 + poppler 115 + poppler_data 116 + libtiff 117 + openexr 118 + libmng 119 + librsvg 120 + libwmf 121 + zlib 122 + libzip 123 + ghostscript 124 + aalib 125 + shared-mime-info 126 + libwebp 127 + libheif 128 + python 129 + libexif 130 + xorg.libXpm 131 + glib-networking 132 + libmypaint 133 + mypaint-brushes1 134 + ] ++ lib.optionals stdenv.isDarwin [ 135 + AppKit 136 + Cocoa 137 + gtk-mac-integration-gtk2 138 + ] ++ lib.optionals stdenv.isLinux [ 139 + libgudev 140 + ]; 141 + 142 + # needed by gimp-2.0.pc 143 + propagatedBuildInputs = [ 144 + gegl 145 + ]; 146 + 147 + # Check if librsvg was built with --disable-pixbuf-loader. 148 + PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; 149 + 150 + preAutoreconf = '' 151 + # The check runs before glib-networking is registered 152 + export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES" 153 + ''; 154 + 155 + postFixup = '' 156 + wrapProgram $out/bin/glimpse-${lib.versions.majorMinor version} \ 157 + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" 158 + ''; 159 + 160 + passthru = rec { 161 + # The declarations for `glimpse-with-plugins` wrapper, 162 + # used for determining plug-in installation paths 163 + majorVersion = "2.0"; 164 + targetPluginDir = "lib/glimpse/${majorVersion}/plug-ins"; 165 + targetScriptDir = "share/glimpse/${majorVersion}/scripts"; 166 + targetDataDir = "share/gimp/${majorVersion}"; 167 + targetLibDir = "lib/gimp/${majorVersion}"; 168 + 169 + # probably its a good idea to use the same gtk in plugins ? 170 + gtk = gtk2; 171 + }; 172 + 173 + configureFlags = [ 174 + "--without-webkit" # old version is required 175 + "--with-bug-report-url=https://github.com/NixOS/nixpkgs/issues/new" 176 + "--with-icc-directory=/run/current-system/sw/share/color/icc" 177 + # fix libdir in pc files (${exec_prefix} needs to be passed verbatim) 178 + "--libdir=\${exec_prefix}/lib" 179 + ]; 180 + 181 + # on Darwin, 182 + # test-eevl.c:64:36: error: initializer element is not a compile-time constant 183 + doCheck = !stdenv.isDarwin; 184 + 185 + enableParallelBuilding = true; 186 + 187 + meta = with lib; { 188 + description = "An open source image editor based on the GNU Image Manipulation Program"; 189 + longDescription = '' 190 + 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. 191 + ''; 192 + homepage = "https://glimpse-editor.org"; 193 + maintainers = with maintainers; [ ashkitten erictapen ]; 194 + license = licenses.gpl3Plus; 195 + platforms = platforms.unix; 196 + }; 197 + }
+11
pkgs/applications/graphics/glimpse/plugins/default.nix
···
··· 1 + # Use `glimpse-with-plugins` package for Glimpse with all plug-ins. 2 + # If you just want a subset of plug-ins, you can specify them explicitly: 3 + # `glimpse-with-plugins.override { plugins = with glimpsePlugins; [ gap ]; }`. 4 + 5 + { gimpPlugins, glimpse }: 6 + 7 + # This attrs can be extended in the future if there happen to be glimpse-only 8 + # plugins or some that need further modification in order to work with Glimpse. 9 + gimpPlugins.overrideScope' (self: super: { 10 + gimp = glimpse; 11 + })
+13
pkgs/applications/graphics/glimpse/remove-cc-reference.patch
···
··· 1 + diff --git a/app/gimp-version.c b/app/gimp-version.c 2 + index b584398231..1b40a1570f 100644 3 + --- a/app/gimp-version.c 4 + +++ b/app/gimp-version.c 5 + @@ -230,7 +230,7 @@ gimp_version (gboolean be_verbose, 6 + GIMP_BUILD_ID, 7 + gimp_version_get_revision (), 8 + GIMP_BUILD_PLATFORM_FAMILY, 9 + - CC_VERSION, 10 + + "@cc_version@", 11 + lib_versions); 12 + g_free (lib_versions); 13 +
+30
pkgs/applications/graphics/glimpse/wrapper.nix
···
··· 1 + { lib, symlinkJoin, glimpse, makeWrapper, glimpsePlugins, gnome3, plugins ? null }: 2 + 3 + let 4 + allPlugins = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (lib.attrValues glimpsePlugins); 5 + selectedPlugins = if plugins == null then allPlugins else plugins; 6 + extraArgs = map (x: x.wrapArgs or "") selectedPlugins; 7 + versionBranch = lib.versions.majorMinor glimpse.version; 8 + 9 + in 10 + symlinkJoin { 11 + name = "glimpse-with-plugins-${glimpse.version}"; 12 + 13 + paths = [ glimpse ] ++ selectedPlugins; 14 + 15 + buildInputs = [ makeWrapper ]; 16 + 17 + postBuild = '' 18 + for each in glimpse-${versionBranch} glimpse-console-${versionBranch}; do 19 + wrapProgram $out/bin/$each \ 20 + --set GIMP2_PLUGINDIR "$out/lib/glimpse/2.0" \ 21 + --set GIMP2_DATADIR "$out/share/glimpse/2.0" \ 22 + --prefix GTK_PATH : "${gnome3.gnome-themes-extra}/lib/gtk-2.0" \ 23 + ${toString extraArgs} 24 + done 25 + 26 + for each in glimpse glimpse-console; do 27 + ln -sf "$each-${versionBranch}" $out/bin/$each 28 + done 29 + ''; 30 + }
+13
pkgs/top-level/all-packages.nix
··· 22229 22230 gimpPlugins = recurseIntoAttrs (callPackage ../applications/graphics/gimp/plugins {}); 22231 22232 girara = callPackage ../applications/misc/girara { 22233 gtk = gtk3; 22234 };
··· 22229 22230 gimpPlugins = recurseIntoAttrs (callPackage ../applications/graphics/gimp/plugins {}); 22231 22232 + glimpse = callPackage ../applications/graphics/glimpse { 22233 + autoreconfHook = buildPackages.autoreconfHook269; 22234 + gegl = gegl_0_4; 22235 + lcms = lcms2; 22236 + inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; 22237 + }; 22238 + 22239 + glimpse-with-plugins = callPackage ../applications/graphics/glimpse/wrapper.nix { 22240 + plugins = null; # All packaged plugins enabled, if not explicit plugin list supplied 22241 + }; 22242 + 22243 + glimpsePlugins = recurseIntoAttrs (callPackage ../applications/graphics/glimpse/plugins {}); 22244 + 22245 girara = callPackage ../applications/misc/girara { 22246 gtk = gtk3; 22247 };