mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 20:50:15 +00:00
add template for python requirements.txt projects
This commit is contained in:
20
templates/python/flake.nix
Normal file
20
templates/python/flake.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
description = "Python pip flake";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
pythonEnv = pkgs.python310.withPackages (pypi:
|
||||
with pypi;
|
||||
[
|
||||
# Add requirements here
|
||||
requests
|
||||
]);
|
||||
in {
|
||||
devShells.default = pkgs.mkShell { buildInputs = [ pythonEnv ]; };
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user