File: shell.nix

package info (click to toggle)
aiocomelit 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 420 kB
  • sloc: python: 888; sh: 6; makefile: 3
file content (35 lines) | stat: -rw-r--r-- 705 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ pkgs ? import <nixpkgs> { } }:

let
  pythonEnv = pkgs.python312.withPackages (ps: with ps; [
    ps.pip
    ps.numpy
    ps.uv

    # Include any additional Python packages here
  ]);
in
pkgs.mkShell {
  buildInputs = [
    pythonEnv
    pkgs.poetry
    pkgs.commitlint-rs
    pkgs.nodejs  # Add Node.js here

  ];

  shellHook = ''
    export POETRY_HOME=$(pwd)/.poetry
    export PATH=$POETRY_HOME/bin:$PATH

    # Optional: install Poetry if not already installed
    if [ ! -d "$POETRY_HOME" ]; then
      poetry config virtualenvs.in-project true
      poetry install
    fi
    # Activate the Poetry environment
    python -m venv .venv
    source .venv/bin/activate
    scripts/setup.sh
  '';
}