feat(templates): use poetry2nix for template

stylix
Moritz Böhme 2023-11-30 14:48:17 +01:00
parent 70e95a1ea4
commit 118fe7ba67
2 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1 @@
use nix
export PYTHONPATH="$(pwd)/src:$PYTHONPATH"
if [ ! -z $NIX_LD ]; then
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
fi
layout poetry

View File

@ -1,5 +1,14 @@
{ pkgs ? import <nixpkgs> { } }:
let
poetry2nix = import (fetchTarball "https://github.com/nix-community/poetry2nix/archive/master.tar.gz") { };
project =
poetry2nix.mkPoetryApplication {
projectDir = ./.;
preferWheels = true;
};
in
pkgs.mkShell {
buildInputs = with pkgs; [ python3 poetry ];
inputsFrom = [ project ];
packages = [ pkgs.poetry ];
}