add python flake

This commit is contained in:
aditya 2023-06-28 10:13:51 +05:30
parent f3f7e075f6
commit 39c3c26455
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU

29
flake-python.nix Normal file
View file

@ -0,0 +1,29 @@
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in rec {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
(python3.withPackages(ps: with ps; [
ipython
jupyter
numpy
pandas
]))
];
shellHook = "jupyter notebook";
};
}
);
}