Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flake #164

Merged
merged 3 commits into from
Sep 2, 2021
Merged

Fix flake #164

merged 3 commits into from
Sep 2, 2021

Conversation

teto
Copy link
Contributor

@teto teto commented Sep 1, 2021

I've tried using the flake in my project referencing jupyterWith.overlay but it failed with error: attribute 'jupyter_contrib_core' missing.
I fixed that and made it pass nix flake check. There is a breaking change though.

Without this, it was possible to importer the jupyterWith attribute
without its python and haskell overlays, thus ending up with errors like

error: attribute 'jupyter_contrib_core' missing
jupyterWith is an attrset so let's not use it as a package
@guaraqe
Copy link
Contributor

guaraqe commented Sep 1, 2021

Thanks for the PR, I'm not very experienced with Flakes yet, this is useful. I launched tests.

I have the impression that the changes to the two overlay files are superficial, can you keep the original?

@GTrunSec Since you wrote the Flake, can you take a look at the PR?

@teto
Copy link
Contributor Author

teto commented Sep 1, 2021

I have the impression that the changes to the two overlay files are superficial, can you keep the original?

nix flake check requires the parameters to be called prev and final so I can't keep the original.

I will look into the CI failure. One cool tool though is https://github.com/edolstra/flake-compat/ that allows to run a legacy nix-shell while using the flake as a source of truth (mentioning this since I see the failing job comes from a devshell.nix).

@teto
Copy link
Contributor Author

teto commented Sep 2, 2021

I fixed the example flake, should be good now.

@guaraqe
Copy link
Contributor

guaraqe commented Sep 2, 2021

This is working now, thank you!

@guaraqe guaraqe merged commit 6024eb9 into tweag:master Sep 2, 2021
@teto teto deleted the fix-flake branch September 2, 2021 08:23
@rokroskar
Copy link

I'm running into this issue (an error about jupyter_contrib_core not being found) when trying to build a docker image - I'm trying to build this:

let
  pkgs = import <nixpkgs> { system = "x86_64-linux";};
  jupyter = import (builtins.fetchGit {
    url = https://github.com/tweag/jupyterWith;
    rev = "6024eb9329c5f47102adc26f541712121bba62d4";
  }) {inherit pkgs;};

  jupyterEnvironment = jupyter.jupyterlabWith {};
in
    pkgs.dockerTools.buildLayeredImage {
      name = "jupyter";
      tag = "latest";
      created = "now";
      contents = [ jupyterEnvironment ];
      config = {
          Env = [
              "LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive"
              "LANG=en_US.UTF-8"
              "LANGUAGE=en_US:en"
              "LC_ALL=en_US.UTF-8"
          ];
          CMD = [ "/bin/jupyter-lab" "--ip=0.0.0.0" "--no-browser" "--allow-root" ];
          WorkingDir = "/data";
          ExposedPorts = {
              "8888" = {};
          };
          Volumes = {
              "/data" = {};
          };
      };
  }

I'm not sure if the issue is in the way I import pkgs or whether there is an issue with jupyter_contrib_core?

@GTrunSec
Copy link
Collaborator

GTrunSec commented Sep 2, 2021

looks good, thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants