From 2bc8cde50872937b3e2629bf13ad2835f25d2004 Mon Sep 17 00:00:00 2001 From: Goetz Date: Sun, 18 Sep 2022 19:33:04 +0200 Subject: [PATCH 1/3] Add me as a maintainer of the package Fix: Sort mrtarantoga alphabetical --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dfe49de5e371..95218eb8347e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8920,6 +8920,12 @@ githubId = 15896005; name = "Vladyslav Burzakovskyy"; }; + mrtarantoga = { + email = "goetz-dev@web.de"; + name = "Götz Grimmer"; + github = "MrTarantoga"; + githubId = 53876219; + }; mrVanDalo = { email = "contact@ingolf-wagner.de"; github = "mrVanDalo"; From 3be64031269cd1b384bcf0afca8151805ab8b497 Mon Sep 17 00:00:00 2001 From: Goetz Date: Sun, 25 Sep 2022 10:59:54 +0200 Subject: [PATCH 2/3] quarto: init at 1.1.189 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quarto is a library/support package for several pandoc projects. Fix: Remove trailing whitespace Add final newline to default.nix Fix indention and newline errors Fix: Missed unpackPhase resolved Add: sourceProvenance Suggestion of: https://github.com/NixOS/nixpkgs/pull/186697#discussion_r945336064 Fix: reduce imports Fix: use version attribute in download string Fix: reduce path expression Fix: add runHook {pre/post}Install as common practice Fix: replace gpl2 with gpl2Plus Fix: change maintainers description Fix: do not use symlinks, use the PATH instead Fix wrong platforms ++ means concatenation and is not correct in this context. Co-authored-by: Sandro Change structure to support fixed output derivations Co-authored-by: Sandro Fix Fix Apply suggestion Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> Fix suggestion Bundle makeProgram function call Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> Update library version from 1.0.38 to 1.1.189 Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> Add missing dependencies Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> pandoc, deno, esbuild can be hooked into QUARTO_* environment variables, so they are not needed in buildInputs. Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> Fix deno-path patch Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> Remove wrong spaces Add python3 jupyter host support Fix spacing Co-authored-by: Suwon Park <35622998+sepiabrown@users.noreply.github.com> Sort quarto in all-packages.nix alphabetical Remove lib prefix from maintainers Co-authored-by: Sebastián Mancilla <238528+smancill@users.noreply.github.com> Simplify mkdir command Co-authored-by: Sandro Fix missusage of makeBinPath Co-authored-by: Sandro Remove python3Packages -> not used Co-authored-by: Sandro Remove punctuation from description Co-authored-by: Sandro Fix review Error in https://github.com/NixOS/nixpkgs/pull/186697#discussion_r975107345 Fix wrong path for import_map.json Do not strip downloaded binary --- pkgs/development/libraries/quarto/default.nix | 68 +++++++++++++++++++ .../libraries/quarto/fix-deno-path.patch | 8 +++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 78 insertions(+) create mode 100644 pkgs/development/libraries/quarto/default.nix create mode 100644 pkgs/development/libraries/quarto/fix-deno-path.patch diff --git a/pkgs/development/libraries/quarto/default.nix b/pkgs/development/libraries/quarto/default.nix new file mode 100644 index 000000000000..d78432f734f4 --- /dev/null +++ b/pkgs/development/libraries/quarto/default.nix @@ -0,0 +1,68 @@ +{ stdenv +, lib +, pandoc +, esbuild +, deno +, fetchurl +, nodePackages +, rWrapper +, rPackages +, makeWrapper +, python3 +}: + +stdenv.mkDerivation rec { + pname = "quarto"; + version = "1.1.189"; + src = fetchurl { + url = "https://github.com/quarto-dev/quarto-cli/releases/download/v${version}/quarto-${version}-linux-amd64.tar.gz"; + sha256 = "1a3xsgqdccm4ky1xjnin1idpp8gsansskq37c00mrxz1raxn1mi7"; + }; + + nativeBuildInputs = [ + makeWrapper + ]; + + patches = [ + ./fix-deno-path.patch + ]; + + dontStrip = true; + + preFixup = '' + wrapProgram $out/bin/quarto \ + --prefix PATH : ${lib.makeBinPath [ deno ]} \ + --prefix QUARTO_PANDOC : ${pandoc}/bin/pandoc \ + --prefix QUARTO_ESBUILD : ${esbuild}/bin/esbuild \ + --prefix QUARTO_DART_SASS : ${nodePackages.sass}/bin/sass \ + --prefix QUARTO_R : ${rWrapper.override { packages = [ rPackages.rmarkdown]; }}/bin/R \ + --prefix QUARTO_PYTHON : ${python3.withPackages (ps: with ps; [ jupyter ipython ])}/bin/python3 + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share + + rm -r bin/tools + + mv bin/* $out/bin + mv share/* $out/share + + runHook preInstall + ''; + + meta = with lib; { + description = "Open-source scientific and technical publishing system built on Pandoc"; + longDescription = '' + Quarto is an open-source scientific and technical publishing system built on Pandoc. + Quarto documents are authored using markdown, an easy to write plain text format. + ''; + homepage = "https://quarto.org/"; + changelog = "https://github.com/quarto-dev/quarto-cli/releases/tag/v${version}"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ mrtarantoga ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode binaryBytecode ]; + }; +} diff --git a/pkgs/development/libraries/quarto/fix-deno-path.patch b/pkgs/development/libraries/quarto/fix-deno-path.patch new file mode 100644 index 000000000000..895419712ad8 --- /dev/null +++ b/pkgs/development/libraries/quarto/fix-deno-path.patch @@ -0,0 +1,8 @@ +--- a/bin/quarto ++++ b/bin/quarto +@@ -125,4 +125,4 @@ fi + # Be sure to include any already defined QUARTO_DENO_OPTIONS + QUARTO_DENO_OPTIONS="--unstable --no-config --cached-only --allow-read --allow-write --allow-run --allow-env --allow-net --allow-ffi ${QUARTO_DENO_OPTIONS}" + +-"${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_ARGMAP}" "${QUARTO_TARGET}" "$@" ++deno ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_ARGMAP}" "${QUARTO_TARGET}" "$@" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ac6af8eda63..5b0ea3d1fd57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20790,6 +20790,8 @@ with pkgs; qolibri = libsForQt5.callPackage ../applications/misc/qolibri { }; + quarto = callPackage ../development/libraries/quarto { }; + qt4 = qt48; qt48 = callPackage ../development/libraries/qt-4.x/4.8 { From e7a66a4a2200ee37703f90c104c716f8b1b18e70 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 25 Sep 2022 23:11:47 +0200 Subject: [PATCH 3/3] quarto: fix formatting --- pkgs/development/libraries/quarto/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/quarto/default.nix b/pkgs/development/libraries/quarto/default.nix index d78432f734f4..38eea0a70f56 100644 --- a/pkgs/development/libraries/quarto/default.nix +++ b/pkgs/development/libraries/quarto/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ]; patches = [ - ./fix-deno-path.patch + ./fix-deno-path.patch ]; dontStrip = true;