{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; systems.url = "github:nix-systems/default"; }; outputs = {flake-parts, ...} @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { systems = import inputs.systems; perSystem = { pkgs, system, ... }: rec { devShells.default = pkgs.mkShell { packages = packages.notebooks.buildInputs; }; packages.notebooks = pkgs.stdenvNoCC.mkDerivation { name = "notebooks"; src = ./.; dontUnpack = true; buildInputs = [ (pkgs.julia.withPackages [ "Pluto" "Plots" "PlutoUI" "LinearAlgebra" "SparseArrays" "LaTeXStrings" ]) ]; buildPhase = '' # TODO: comment this shit cp $src/TP1/notebook.jl index.jl cp $src/TD/notebook.jl exos.jl chmod +w index.jl exos.jl cp $src/export_html.jl export_html.jl # https://github.com/NixOS/nix/issues/670#issuecomment-1211700127 export HOME=$(pwd) julia export_html.jl ''; installPhase = '' mkdir -p $out cp index.html $out cp exos.html $out ''; }; }; }; }