Parcourir la source

Add shell.nix file

Joeri Exelmans il y a 5 ans
Parent
commit
29062d730c
2 fichiers modifiés avec 18 ajouts et 0 suppressions
  1. 3 0
      README.md
  2. 15 0
      shell.nix

+ 3 - 0
README.md

@@ -2,6 +2,8 @@
 
 ## Dependencies
 
+Tip: Users of the Nix package manager can get a usable development environment through the supplied `shell.nix` file instead of manually installing all dependencies.
+
 ### Mandatory
 
 * CPython >= 3.6 or PyPy >= 7.3.0 (Compatible with Python 3.6)
@@ -11,6 +13,7 @@
   * [termcolor](https://pypi.org/project/termcolor/) for colored terminal output
   * [dataclasses](https://pypi.org/project/dataclasses/) standard library backport, not needed for Python >= 3.7.
 
+
 ### Optional
 
 * [state-machine-cat](https://github.com/sverweij/state-machine-cat) to render statecharts as SVG images. Runs on NodeJS, installable from NPM.

+ 15 - 0
shell.nix

@@ -0,0 +1,15 @@
+# This file is for users of the Nix package manager (https://nixos.org)
+
+{ pkgs ? import <nixpkgs> {} }:
+
+pkgs.mkShell {
+  buildInputs = [
+    pkgs.python38
+    pkgs.python38Packages.tkinter
+    pkgs.python38Packages.lark-parser
+    pkgs.python38Packages.lxml
+    pkgs.python38Packages.termcolor
+  ];
+
+  PYTHONPATH = ./. + "/src";
+}