nixpkgs/pkgs/development/libraries/quarto/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
2.0 KiB
Nix
Raw Normal View History

quarto: init at 1.1.189 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 <sandro.jaeckel@gmail.com> Change structure to support fixed output derivations Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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 <sandro.jaeckel@gmail.com> Fix missusage of makeBinPath Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove python3Packages -> not used Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove punctuation from description Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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
2022-09-25 08:59:54 +00:00
{ stdenv
, lib
, pandoc
, esbuild
, deno
, fetchurl
, nodePackages
, rWrapper
, rPackages
, makeWrapper
, python3
}:
stdenv.mkDerivation rec {
pname = "quarto";
version = "1.2.269";
quarto: init at 1.1.189 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 <sandro.jaeckel@gmail.com> Change structure to support fixed output derivations Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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 <sandro.jaeckel@gmail.com> Fix missusage of makeBinPath Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove python3Packages -> not used Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove punctuation from description Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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
2022-09-25 08:59:54 +00:00
src = fetchurl {
url = "https://github.com/quarto-dev/quarto-cli/releases/download/v${version}/quarto-${version}-linux-amd64.tar.gz";
sha256 = "sha256-liZc7Ewo7HaIXdcXpdfQ3SW5JlOmZiZDawusjgJt8pE=";
quarto: init at 1.1.189 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 <sandro.jaeckel@gmail.com> Change structure to support fixed output derivations Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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 <sandro.jaeckel@gmail.com> Fix missusage of makeBinPath Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove python3Packages -> not used Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove punctuation from description Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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
2022-09-25 08:59:54 +00:00
};
nativeBuildInputs = [
makeWrapper
];
patches = [
2022-09-25 21:11:47 +00:00
./fix-deno-path.patch
quarto: init at 1.1.189 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 <sandro.jaeckel@gmail.com> Change structure to support fixed output derivations Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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 <sandro.jaeckel@gmail.com> Fix missusage of makeBinPath Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove python3Packages -> not used Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove punctuation from description Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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
2022-09-25 08:59:54 +00:00
];
postPatch = ''
# Compat for Deno >=1.26
substituteInPlace bin/quarto.js \
--replace 'Deno.setRaw(stdin.rid, ' 'Deno.stdin.setRaw(' \
--replace 'Deno.setRaw(Deno.stdin.rid, ' 'Deno.stdin.setRaw('
'';
quarto: init at 1.1.189 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 <sandro.jaeckel@gmail.com> Change structure to support fixed output derivations Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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 <sandro.jaeckel@gmail.com> Fix missusage of makeBinPath Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove python3Packages -> not used Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Remove punctuation from description Co-authored-by: Sandro <sandro.jaeckel@gmail.com> 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
2022-09-25 08:59:54 +00:00
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 ];
};
}