From aae58e15fe2d3834122b1d92b06c3fd8a76a8228 Mon Sep 17 00:00:00 2001 From: Robert Kovacsics Date: Sun, 22 Aug 2021 15:46:48 +0100 Subject: [PATCH] nip2: Fix location of builtins by setting VIPSHOME The program `nip2` didn't really work without this, as it didn't know where to find the bundled scripts. Though VIPSHOME should really be called NIP2HOME. I suppose I should open an issue upstream to also consider `datarootdir` from autotools? --- pkgs/tools/graphics/nip2/default.nix | 39 ++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/graphics/nip2/default.nix b/pkgs/tools/graphics/nip2/default.nix index 5fa2d2639625..9a281e7dcecf 100644 --- a/pkgs/tools/graphics/nip2/default.nix +++ b/pkgs/tools/graphics/nip2/default.nix @@ -1,5 +1,19 @@ -{ lib, stdenv, fetchurl, pkg-config, glib, libxml2, flex, bison, vips, gtk2 -, fftw, gsl, goffice, libgsf }: +{ lib +, stdenv +, fetchurl +, pkg-config +, glib +, libxml2 +, flex +, bison +, vips +, gtk2 +, fftw +, gsl +, goffice +, libgsf +, makeWrapper +}: stdenv.mkDerivation rec { pname = "nip2"; @@ -11,9 +25,24 @@ stdenv.mkDerivation rec { }; buildInputs = - [ pkg-config glib libxml2 flex bison vips - gtk2 fftw gsl goffice libgsf - ]; + [ + pkg-config + glib + libxml2 + flex + bison + vips + gtk2 + fftw + gsl + goffice + libgsf + makeWrapper + ]; + + postFixup = '' + wrapProgram $out/bin/nip2 --set VIPSHOME "$out" + ''; meta = with lib; { homepage = "https://github.com/libvips/nip2";