Files
clan-master-thesis/flake.nix
2024-11-25 14:48:21 +01:00

60 lines
1.5 KiB
Nix

{
description = "Your jupyenv project";
nixConfig.extra-substituters = [
"https://tweag-jupyter.cachix.org"
];
nixConfig.extra-trusted-public-keys = [
"tweag-jupyter.cachix.org-1:UtNH4Zs6hVUFpFBTLaA4ejYavPo5EFFqgd7G7FxGW9g="
];
inputs = {
#treefmt-nix.url = "github:Qubasa/treefmt-nix";
treefmt-nix.url = "github:qubasa/treefmt-nix";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
jupyenv.url = "github:tweag/jupyenv";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ./treefmt.nix ];
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem =
{
lib,
system,
pkgs,
...
}:
let
inherit (inputs.jupyenv.lib.${system}) mkJupyterlabNew;
jupyterlab = mkJupyterlabNew (
{ ... }:
{
# nixpkgs = nixpkgs;
imports = [ (import ./kernels.nix) ];
}
);
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
python3
];
};
packages = {
inherit jupyterlab;
};
packages.default = jupyterlab;
apps.default.program = "${jupyterlab}/bin/jupyter-lab";
apps.default.type = "app";
};
};
}