From 75669c90abd1713a1e570d2774b116e4c072b4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Gr=C3=A4fenstein?= Date: Sat, 5 Jun 2021 11:37:53 +0200 Subject: [PATCH] gimpPlugins.bimp: init at 2.6 Co-authored-by: Jan Tojnar --- .../graphics/gimp/plugins/default.nix | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index fe1afe5b07b6..6f4fdd689098 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -5,7 +5,7 @@ { config, lib, pkgs }: let - inherit (pkgs) stdenv fetchurl pkg-config intltool glib fetchFromGitHub; + inherit (pkgs) stdenv fetchurl fetchpatch pkg-config intltool glib fetchFromGitHub; in lib.makeScope pkgs.newScope (self: @@ -66,6 +66,45 @@ in # Allow overriding GIMP package in the scope. inherit (pkgs) gimp; + 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="; + }) + ]; + + nativeBuildInputs = with pkgs; [ which ]; + + installFlags = [ + "SYSTEM_INSTALL_DIR=${placeholder "out"}/${gimp.targetPluginDir}/bimp" + ]; + + installTargets = [ "install-admin" ]; + + meta = with lib; { + description = "Batch Image Manipulation Plugin for GIMP"; + homepage = "https://github.com/alessandrofrancesconi/gimp-plugin-bimp"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ samuelgrf ]; + }; + }; + gap = pluginDerivation { /* menu: Video