|
2 | 2 | description = "py-shiny-site";
|
3 | 3 |
|
4 | 4 | inputs = {
|
5 |
| - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; |
6 |
| - # Use unstable channel for recent version of Quarto |
7 |
| - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; |
| 5 | + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; |
| 6 | + # Pin to this release of nixpkgs to use Quarto 1.3. (This is currently the same as |
| 7 | + # nixpkgs above but they may change independently in the future.) |
| 8 | + nixpkgs-quarto.url = "github:NixOS/nixpkgs/nixos-23.11"; |
8 | 9 | };
|
9 | 10 |
|
10 |
| - outputs = { self, nixpkgs, nixpkgs-unstable }: |
| 11 | + outputs = { self, nixpkgs, nixpkgs-quarto }: |
11 | 12 | let
|
12 | 13 | allSystems =
|
13 | 14 | [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
64 | 65 |
|
65 | 66 | pkgs = import nixpkgs { inherit system; };
|
66 | 67 |
|
67 |
| - pkgs-unstable = import nixpkgs-unstable { |
| 68 | + pkgs-quarto = import nixpkgs-quarto { |
68 | 69 | inherit system;
|
69 | 70 | overlays = [ quartoOverlay ];
|
70 | 71 | };
|
|
74 | 75 |
|
75 | 76 | in {
|
76 | 77 | # Development environment output
|
77 |
| - devShells = forAllSystems ({ pkgs, pkgs-unstable, system, ... }: { |
| 78 | + devShells = forAllSystems ({ pkgs, pkgs-quarto, system, ... }: { |
78 | 79 | default = pkgs.mkShell {
|
79 | 80 | packages = with pkgs; [
|
80 | 81 | git
|
81 | 82 | which
|
82 | 83 | rsync
|
83 | 84 | (with rPackages; [ R rmarkdown reticulate ])
|
84 | 85 | python311
|
85 |
| - pkgs-unstable.quarto |
| 86 | + pkgs-quarto.quarto |
86 | 87 | # Quarto uses `rmarkdown::pandoc_available()` when running rmd files, which
|
87 | 88 | # in turn calls `find_pandoc()` -> `find_program("pandoc")`, and on Linux,
|
88 | 89 | # this calls `Sys.which("pandoc")` (it does something a bit different on
|
89 | 90 | # Mac). This means that pandoc needs to be in the PATH. So we'll explicitly
|
90 |
| - # add it here, making sure that that it comes from pkgs-unstable, so it's |
| 91 | + # add it here, making sure that that it comes from pkgs-quarto, so it's |
91 | 92 | # the same copy that quarto would find anyway.
|
92 | 93 | # https://github.com/quarto-dev/quarto-cli/blob/fee994d5/src/resources/rmd/rmd.R#L219C12-L228
|
93 |
| - pkgs-unstable.pandoc |
| 94 | + pkgs-quarto.pandoc |
94 | 95 | sysctl # Needed by Quarto to detect system
|
95 | 96 | ];
|
96 | 97 | # Need to set LD_LIBRARY_PATH to load some Python packages on Linux (like zmq,
|
|
0 commit comments