mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-26 18:34:56 +08:00
misc
This commit is contained in:
parent
d9cd5c6486
commit
ced09b9dcd
9 changed files with 579 additions and 2 deletions
46
templates/python-basic/flake.nix
Normal file
46
templates/python-basic/flake.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ ... }@inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
devShells = {
|
||||
default =
|
||||
let
|
||||
python = pkgs.python312;
|
||||
in
|
||||
pkgs.mkShellNoCC {
|
||||
buildInputs = [
|
||||
(python.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
pandas
|
||||
openpyxl
|
||||
scipy
|
||||
]
|
||||
))
|
||||
];
|
||||
shellHook = ''
|
||||
fish
|
||||
'';
|
||||
};
|
||||
};
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.ruff-format.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue