Skip to content

Instantly share code, notes, and snippets.

@WolfangAukang
Created August 9, 2023 18:16
Show Gist options
  • Save WolfangAukang/7b79f35619ebee4bd18fc3ad5bbb49a6 to your computer and use it in GitHub Desktop.
Save WolfangAukang/7b79f35619ebee4bd18fc3ad5bbb49a6 to your computer and use it in GitHub Desktop.
Devshell flake importing a Python environment (based on https://github.com/numtide/devshell/issues/136)
{
description = "virtual environments";
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let
pkgs = import nixpkgs {
inherit system;
overlays = [ devshell.overlays.default ];
};
in pkgs.devshell.mkShell {
# Follow https://numtide.github.io/devshell/modules_schema.html for some directives
#imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
devshell.packages = with pkgs; [
(python311.withPackages(p: with p; [ pandas ]))
];
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment