32 lines
702 B
Nix
32 lines
702 B
Nix
{
|
|
description = "My python development shell";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
};
|
|
outputs = {nixpkgs, ...}: let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
};
|
|
pythonEnv = pkgs.python3.withPackages (python-pkgs: [
|
|
python-pkgs.numpy
|
|
python-pkgs.pandas
|
|
]);
|
|
in {
|
|
packages."${system}" = {
|
|
default = pkgs.writeShellApplication {
|
|
name = "my-app";
|
|
runtimeInputs = [pythonEnv];
|
|
text = ''
|
|
python ${./main.py} "$@"
|
|
'';
|
|
};
|
|
};
|
|
|
|
devShells."${system}" = {
|
|
default = pkgs.mkShell {
|
|
packages = [pythonEnv];
|
|
};
|
|
};
|
|
};
|
|
}
|