Flake for Python environment using micromamba

This is a thread for following up on my question asked in:

Hi @NobbZ thanks for the quick reply.
I used builtins.getEnv since it’s written in the Python wiki for setting up micromamba (the complete flake is basically the shell.nix from the wiki (Python - NixOS Wiki) just written as a flake).

So I would also have to change builtins.getEnv and if so with what should I replace it? I have only found some posts mentioning using it with --impure.

If I follow your suggestion to use

in {
  devShells.x86_64-linux.default = fhs.env;
};

and then execute nix-shell python-flake.nix it gives me:

error: nix-shell requires a single derivation

Is this related to builtins.getEnv ?

As mentioned in my previous post I’m new to NixOS so please bear with me.

As you are creating a flake you would use nix develop with that.

The builtins.getEnv wouldn’t have any effect in the last version of the flake I have seen, as that was dead code.

Thank you so much, it works now! :slight_smile: