From 55ebe584622a40aae43b51eb1123178ddea2a090 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Thu, 19 Sep 2019 21:18:25 -0400 Subject: [PATCH] typora: allow pandoc to be in PATH --- pkgs/applications/editors/typora/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/typora/default.nix b/pkgs/applications/editors/typora/default.nix index 7273b7252ca..09baf383f97 100644 --- a/pkgs/applications/editors/typora/default.nix +++ b/pkgs/applications/editors/typora/default.nix @@ -1,4 +1,16 @@ -{ stdenv, fetchurl, makeWrapper, electron_5, dpkg, gtk3, glib, gsettings-desktop-schemas, wrapGAppsHook }: +{ stdenv +, lib +, fetchurl +, makeWrapper +, electron_5 +, dpkg +, gtk3 +, glib +, gsettings-desktop-schemas +, wrapGAppsHook +, withPandoc ? false +, pandoc +}: stdenv.mkDerivation rec { pname = "typora"; @@ -42,10 +54,11 @@ stdenv.mkDerivation rec { makeWrapper ${electron_5}/bin/electron $out/bin/typora \ --add-flags $out/share/typora \ "''${gappsWrapperArgs[@]}" \ - --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}" + ${lib.optionalString withPandoc ''--prefix PATH : "${lib.makeBinPath [ pandoc ]}"''} \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A minimal Markdown reading & writing app"; homepage = https://typora.io; license = licenses.unfree;