add templates.python-data
for more info, see <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-init.html>
This commit is contained in:
parent
2f45c57310
commit
0253774622
10
flake.nix
10
flake.nix
|
@ -116,6 +116,16 @@
|
|||
x86_64-linux = allPkgsFor "x86_64-linux";
|
||||
aarch64-linux = allPkgsFor "aarch64-linux";
|
||||
};
|
||||
templates = {
|
||||
python-data = {
|
||||
# initialize with:
|
||||
# - `nix flake init -t '/home/colin/dev/nixos/#python-data'`
|
||||
# then enter with:
|
||||
# - `nix develop`
|
||||
path = ./templates/python-data;
|
||||
description = "python environment for data processing";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
23
templates/python-data/flake.nix
Normal file
23
templates/python-data/flake.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = github:numtide/flake-utils;
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
with flake-utils.lib;
|
||||
eachSystem allSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
python-packages = pypkg: with pypkg; [
|
||||
natsort
|
||||
pandas
|
||||
plotly
|
||||
scipy
|
||||
];
|
||||
python3 = pkgs.python3.withPackages python-packages;
|
||||
in {
|
||||
devShells.default = with pkgs; mkShell {
|
||||
packages = [ python3 ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user