From 61940b89a5646987e8b7a8fe7277ec7534c957b1 Mon Sep 17 00:00:00 2001 From: Bryan Gardiner Date: Fri, 31 May 2019 19:23:44 -0700 Subject: [PATCH] filezilla: add wrapper to set necessary FZ_DATADIR Filezilla fails to start currently, with the following message being shown in a lone dialog before the program exits: > Could not find the resource files for FileZilla, closing FileZilla. > You can set the data directory of FileZilla using the '--datadir > ' commandline option or by setting the FZ_DATADIR > environment variable. This commit adds a wrapper for the filezilla binary to set the environment variable to the package root, which fixes the issue. --- pkgs/applications/networking/ftp/filezilla/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/ftp/filezilla/default.nix b/pkgs/applications/networking/ftp/filezilla/default.nix index 49ac1d26dda..acddb31f19b 100644 --- a/pkgs/applications/networking/ftp/filezilla/default.nix +++ b/pkgs/applications/networking/ftp/filezilla/default.nix @@ -1,5 +1,7 @@ { stdenv, fetchurl, dbus, gnutls, wxGTK30, libidn, tinyxml, gettext -, pkgconfig, xdg_utils, gtk2, sqlite, pugixml, libfilezilla, nettle }: +, pkgconfig, xdg_utils, gtk2, sqlite, pugixml, libfilezilla, nettle +, makeWrapper +}: let version = "3.31.0"; in stdenv.mkDerivation { @@ -17,7 +19,11 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ dbus gnutls wxGTK30 libidn tinyxml gettext xdg_utils gtk2 sqlite - pugixml libfilezilla nettle ]; + pugixml libfilezilla nettle makeWrapper ]; + + postInstall = '' + wrapProgram $out/bin/filezilla --set FZ_DATADIR $out + ''; meta = with stdenv.lib; { homepage = https://filezilla-project.org/;