From fd159af54c447a6e9b211169640a258bbeae125c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 16 Nov 2023 15:12:39 +0100 Subject: [PATCH] feat: update python template --- templates/python/.envrc | 2 +- templates/python/flake.nix | 15 --------------- templates/python/shell.nix | 5 +++++ 3 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 templates/python/flake.nix create mode 100644 templates/python/shell.nix diff --git a/templates/python/.envrc b/templates/python/.envrc index 8c7c1c9..8fa86e1 100644 --- a/templates/python/.envrc +++ b/templates/python/.envrc @@ -1,4 +1,4 @@ -use flake +use nix export PYTHONPATH="$(pwd)/src:$PYTHONPATH" if [ ! -z $NIX_LD ]; then export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH diff --git a/templates/python/flake.nix b/templates/python/flake.nix deleted file mode 100644 index 8a0943a..0000000 --- a/templates/python/flake.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - description = "Simple python flake"; - - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - - outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; - perSystem = { config, self', inputs', pkgs, system, ... }: { - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ python3 poetry ]; - }; - }; - }; -} diff --git a/templates/python/shell.nix b/templates/python/shell.nix new file mode 100644 index 0000000..6196009 --- /dev/null +++ b/templates/python/shell.nix @@ -0,0 +1,5 @@ +{ pkgs ? import { } }: + +pkgs.mkShell { + buildInputs = with pkgs; [ python3 poetry ]; +}