test naive templates

This commit is contained in:
jsz4n
2023-10-24 17:36:04 +02:00
parent 594c311117
commit 9aada69d8f
7 changed files with 131 additions and 0 deletions

17
python/flake.nix Normal file
View File

@@ -0,0 +1,17 @@
{
description = "A small file sorter using tkinter and python";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (system: {
default = pkgs.${system}.callPackage ./shell.nix {} ;
});
};
}

19
python/shell.nix Normal file
View File

@@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:
let
my-python = pkgs.python310;
python-with-packages = my-python.withPackages ( p: with p; [
pip
jedi-language-server
]);
in
pkgs.mkShell {
buildInputs = [
python-with-packages
];
shellHook=''
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
'';
}