diff --git a/pkgs/applications/misc/netsurf/browser/default.nix b/pkgs/applications/misc/netsurf/browser/default.nix index e9178c3796e5..db39e97018af 100644 --- a/pkgs/applications/misc/netsurf/browser/default.nix +++ b/pkgs/applications/misc/netsurf/browser/default.nix @@ -86,10 +86,17 @@ stdenv.mkDerivation rec { mkdir -p $out/bin $out/share/Netsurf/${uilib} cmd=$(case "${uilib}" in framebuffer) echo nsfb;; gtk) echo nsgtk;; esac) cp $cmd $out/bin/netsurf - wrapProgram $out/bin/netsurf --set NETSURFRES $out/share/Netsurf/${uilib}/res tar -hcf - frontends/${uilib}/res | (cd $out/share/Netsurf/ && tar -xvpf -) ''; + preFixup = '' + gappsWrapperArgs+=( + --set NETSURFRES $out/share/Netsurf/${uilib}/res + ) + '' + stdenv.lib.optionalString (uilib != "gtk") '' + wrapProgram $out/bin/netsurf "''${gappsWrapperArgs[@]}" + ''; + meta = with stdenv.lib; { homepage = http://www.netsurf-browser.org/; description = "Free opensource web browser";