feat(templates): use poetry2nix for template
This commit is contained in:
parent
70e95a1ea4
commit
118fe7ba67
2 changed files with 10 additions and 6 deletions
|
@ -1,6 +1 @@
|
||||||
use nix
|
use nix
|
||||||
export PYTHONPATH="$(pwd)/src:$PYTHONPATH"
|
|
||||||
if [ ! -z $NIX_LD ]; then
|
|
||||||
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
|
||||||
fi
|
|
||||||
layout poetry
|
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ 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 {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [ python3 poetry ];
|
inputsFrom = [ project ];
|
||||||
|
packages = [ pkgs.poetry ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue