diff --git a/extensions/gimp/README.md b/extensions/gimp/README.md index d3dbae0..2aa18f0 100644 --- a/extensions/gimp/README.md +++ b/extensions/gimp/README.md @@ -16,6 +16,7 @@ You need GIMP 3 with its development files (`gimptool`). | Arch / Manjaro | `sudo pacman -S gimp` (includes them) | | Debian / Ubuntu | `sudo apt install libgimp-3.0-dev` (GIMP 3 packages) | | Fedora | `sudo dnf install gimp-devel` | +| NixOS | `nix-shell gimp-shell.nix` (in this folder), then build inside that shell | | Windows | MSYS2: `pacman -S mingw-w64-ucrt-x86_64-gimp` | | macOS | build GIMP 3 from source or use MacPorts/Homebrew | @@ -28,6 +29,11 @@ gimptool --install yapf-gimp.c That compiles the plugin (it pulls in `../../yapf.c` itself) and installs it into your personal GIMP plug-ins folder. Restart GIMP. +On NixOS, build with the same nixpkgs channel your GIMP comes from (the +plugin links against that GIMP's libraries), and build it again after a +GIMP update. Your GIMP must be GIMP 3: `environment.systemPackages = [ +pkgs.gimp3 ];`, or `nix-shell -p gimp3 --run gimp` to try it. + ### Manual build ```sh diff --git a/extensions/gimp/gimp-shell.nix b/extensions/gimp/gimp-shell.nix new file mode 100644 index 0000000..7a8fadf --- /dev/null +++ b/extensions/gimp/gimp-shell.nix @@ -0,0 +1,7 @@ +# Development shell for building the plugin on NixOS: nix-shell gimp-shell.nix +# `gimp3` is GIMP 3 on every channel (on unstable it is an alias of `gimp`). +with import {}; +mkShell { + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ gimp3 gimp3.dev gtk3 glib gdk-pixbuf gegl babl cairo pango ]; +}