Skip to content

Instantly share code, notes, and snippets.

@MMesch
Created March 15, 2023 09:51
Show Gist options
  • Save MMesch/16fb1c2f80c775fb75af5618f945c1d4 to your computer and use it in GitHub Desktop.
Save MMesch/16fb1c2f80c775fb75af5618f945c1d4 to your computer and use it in GitHub Desktop.
a jupyenv configuration for a bug report
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1627913399,
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"flake": false,
"locked": {
"lastModified": 1611672876,
"narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "211907489e9f198594c0eb0ca9256a1949c9d412",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"jupyenv",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hls": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_3",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1637213318,
"narHash": "sha256-ZgxPwV7t4DyGYP7aXoetq+JHtd73XlOV2fYSflQmOXw=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "311107eabbf0537e0c192b2c377d282505b4eff1",
"type": "github"
},
"original": {
"owner": "haskell",
"repo": "haskell-language-server",
"type": "github"
}
},
"ihaskell": {
"inputs": {
"flake-compat": [
"jupyenv",
"flake-compat"
],
"flake-utils": [
"jupyenv",
"flake-utils"
],
"hls": "hls",
"nixpkgs": [
"jupyenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1671426600,
"narHash": "sha256-MahAFyp6AxY0H61U6zqJXM1NsckNNkK6iqONEtOPSK0=",
"owner": "ihaskell",
"repo": "ihaskell",
"rev": "1c22a874ac0c8ed019229f4a0cd5a0bfda017357",
"type": "github"
},
"original": {
"owner": "ihaskell",
"repo": "ihaskell",
"type": "github"
}
},
"jupyenv": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"ihaskell": "ihaskell",
"nix-dart": "nix-dart",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"npmlock2nix": "npmlock2nix",
"opam-nix": "opam-nix",
"poetry2nix": "poetry2nix",
"pre-commit-hooks": "pre-commit-hooks_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1676437744,
"narHash": "sha256-gYQF7PX4VY0u5lkdR2Yj/mExBjzP8otL8+pWJwn55dk=",
"owner": "tweag",
"repo": "jupyenv",
"rev": "83eafd0b78ee51d0b61b046ac79b1cc90a6226a6",
"type": "github"
},
"original": {
"owner": "tweag",
"repo": "jupyenv",
"type": "github"
}
},
"mirage-opam-overlays": {
"flake": false,
"locked": {
"lastModified": 1661959605,
"narHash": "sha256-CPTuhYML3F4J58flfp3ZbMNhkRkVFKmBEYBZY5tnQwA=",
"owner": "dune-universe",
"repo": "mirage-opam-overlays",
"rev": "05f1c1823d891ce4d8adab91f5db3ac51d86dc0b",
"type": "github"
},
"original": {
"owner": "dune-universe",
"repo": "mirage-opam-overlays",
"type": "github"
}
},
"nix-dart": {
"inputs": {
"flake-utils": [
"jupyenv",
"flake-utils"
],
"nixpkgs": [
"jupyenv",
"nixpkgs"
],
"pub2nix": "pub2nix"
},
"locked": {
"lastModified": 1673740150,
"narHash": "sha256-JiZrr75JILHW7IaNW3MwpYn+084Q6/gnXScPR7Pozhs=",
"owner": "djacu",
"repo": "nix-dart",
"rev": "8ee4e1a5ec0cc6c1e15860c4733f741485e8231e",
"type": "github"
},
"original": {
"owner": "djacu",
"repo": "nix-dart",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1630887066,
"narHash": "sha256-0ecIlrLsNIIa+zrNmzXXmbMBLZlmHU/aWFsa4bq99Hk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e47a07e9f2d7ed999f2c7943b0896f5f7321ca3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1672580127,
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0874168639713f547c05947c76124f78441ea46c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1673800717,
"narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1673796341,
"narHash": "sha256-1kZi9OkukpNmOaPY7S5/+SlCDOuYnP3HkXHvNDyLQcc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6dccdc458512abce8d19f74195bb20fdb067df50",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1648632716,
"narHash": "sha256-kCmnDeiaMsdhfnNKjxdOzwRh2H6eQb8yWAL+nNabC/Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "710fed5a2483f945b14f4a58af2cd3676b42d8c8",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "710fed5a2483f945b14f4a58af2cd3676b42d8c8",
"type": "github"
}
},
"npmlock2nix": {
"flake": false,
"locked": {
"lastModified": 1668989938,
"narHash": "sha256-/IxdS0AiqSN0/VEOLnnfHyi4nP17yPrkhGf6KlXVwrc=",
"owner": "nix-community",
"repo": "npmlock2nix",
"rev": "0ba0746d62974403daf717cded3f24c617622bc7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "npmlock2nix",
"rev": "0ba0746d62974403daf717cded3f24c617622bc7",
"type": "github"
}
},
"opam-nix": {
"inputs": {
"flake-compat": [
"jupyenv",
"flake-compat"
],
"flake-utils": [
"jupyenv",
"flake-utils"
],
"mirage-opam-overlays": "mirage-opam-overlays",
"nixpkgs": [
"jupyenv",
"nixpkgs"
],
"opam-overlays": "opam-overlays",
"opam-repository": "opam-repository",
"opam2json": "opam2json"
},
"locked": {
"lastModified": 1669990974,
"narHash": "sha256-wHhdlDUC/tBDVFBemeJPpqdIRdehKKbxbdMP0QjOhM4=",
"owner": "tweag",
"repo": "opam-nix",
"rev": "75199758e1954f78286e7e79c0e3916e28b732b0",
"type": "github"
},
"original": {
"owner": "tweag",
"repo": "opam-nix",
"rev": "75199758e1954f78286e7e79c0e3916e28b732b0",
"type": "github"
}
},
"opam-overlays": {
"flake": false,
"locked": {
"lastModified": 1654162756,
"narHash": "sha256-RV68fUK+O3zTx61iiHIoS0LvIk0E4voMp+0SwRg6G6c=",
"owner": "dune-universe",
"repo": "opam-overlays",
"rev": "c8f6ef0fc5272f254df4a971a47de7848cc1c8a4",
"type": "github"
},
"original": {
"owner": "dune-universe",
"repo": "opam-overlays",
"type": "github"
}
},
"opam-repository": {
"flake": false,
"locked": {
"lastModified": 1661161626,
"narHash": "sha256-J3P+mXLwE2oEKTlMnx8sYRxwD/uNGSKM0AkAB7BNTxA=",
"owner": "ocaml",
"repo": "opam-repository",
"rev": "54e69ff0949a3aaec0d5e3d67898bb7f279ab09f",
"type": "github"
},
"original": {
"owner": "ocaml",
"repo": "opam-repository",
"type": "github"
}
},
"opam2json": {
"inputs": {
"nixpkgs": [
"jupyenv",
"opam-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1665671715,
"narHash": "sha256-7f75C6fIkiLzfkwLpJxlQIKf+YORGsXGV8Dr2LDDi+A=",
"owner": "tweag",
"repo": "opam2json",
"rev": "32fa2dcd993a27f9e75ee46fb8b78a7cd5d05113",
"type": "github"
},
"original": {
"owner": "tweag",
"repo": "opam2json",
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": [
"jupyenv",
"flake-utils"
],
"nixpkgs": [
"jupyenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673926875,
"narHash": "sha256-QOsT76Al0Igpo0u5vtQJuDSOxrocX3sTD523pLPEklc=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "a5c454a834cd290dd4d33102ab8b4aa37d850e65",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-utils": [
"jupyenv",
"ihaskell",
"hls",
"flake-utils"
],
"nixpkgs": [
"jupyenv",
"ihaskell",
"hls",
"nixpkgs"
]
},
"locked": {
"lastModified": 1624971177,
"narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": [
"jupyenv",
"flake-utils"
],
"gitignore": "gitignore_2",
"nixpkgs": [
"jupyenv",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1674075316,
"narHash": "sha256-0uZuAcYBpNJLxr7n5O0vhwn3rSLpUTm9M5WGgmNQ+wM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "3e42a77571cc0463efa470dbcffa063977a521ab",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pub2nix": {
"flake": false,
"locked": {
"lastModified": 1594192744,
"narHash": "sha256-pDvcXSG1Mh2BpwkqAcNDJzcupV3pIAAtZJLfkiHMAz4=",
"owner": "paulyoung",
"repo": "pub2nix",
"rev": "0c7ecca590fcd1616db8c6468f799ffef36c85e9",
"type": "github"
},
"original": {
"owner": "paulyoung",
"repo": "pub2nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"jupyenv": "jupyenv",
"nixpkgs": "nixpkgs_3"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"jupyenv",
"flake-utils"
],
"nixpkgs": [
"jupyenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1674008920,
"narHash": "sha256-ugwPxKjvmJ5GpzN/MHg8tuhe8nYi3SbJm5nWNy7CB0Q=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "eecc44934a0f6c02c02856b38bd3b6af3bec0870",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
{
description = "Your jupyenv project";
nixConfig.extra-substituters = [
"https://tweag-jupyter.cachix.org"
];
nixConfig.extra-trusted-public-keys = [
"tweag-jupyter.cachix.org-1:UtNH4Zs6hVUFpFBTLaA4ejYavPo5EFFqgd7G7FxGW9g="
];
inputs.flake-compat.url = "github:edolstra/flake-compat";
inputs.flake-compat.flake = false;
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8";
inputs.jupyenv.url = "github:tweag/jupyenv";
outputs = {
self,
flake-compat,
flake-utils,
nixpkgs,
jupyenv,
...
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
]
(
system: let
inherit (jupyenv.lib.${system}) mkJupyterlabNew;
jupyterlab = mkJupyterlabNew ({...}: {
nixpkgs = nixpkgs;
imports = [({pkgs, ...}: {
kernel.python.minimal = {
enable = true;
extraPackages = ps: with ps; [scipy numpy umap-learn seaborn pandas matplotlib];
};})
({pkgs, ...}: {
kernel.haskell.minimal = {
nixpkgs = nixpkgs;
enable = true;
extraHaskellPackages = ps: with ps; [hvega Frames];
};})];
});
in rec {
packages = {inherit jupyterlab;};
packages.default = jupyterlab;
apps.default.program = "${jupyterlab}/bin/jupyter-lab";
apps.default.type = "app";
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment