From 36c7da7d5a44be4fa6327a8f32e3c884fbab8320 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sat, 7 Dec 2024 11:29:09 -0500 Subject: [PATCH] add shell environment --- .envrc | 1 + shell.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..a960ebf --- /dev/null +++ b/shell.nix @@ -0,0 +1,30 @@ +let + pkgs = import { + overlays = [ + (final: prev: { + python3 = prev.python3.override { + packageOverrides = pythonFinal: pythonPrev: { + python-escpos = pythonPrev.python-escpos.overrideAttrs (oldAttrs: { + version = "0.0.0+unstable-2024-10-10"; + src = oldAttrs.src.override { + rev = "7d42f117161362e99c56431ebeb2ef1e9c91c495"; + hash = "sha256-Wl7naHbsYfN+VYASQXyWrLNF953nwoM0ugiutE2jYNI="; + }; + }); + }; + }; + }) + ]; + }; + devshell = import { }; +in + +# alias print="lp -d EPSON-TM-m30 -o lpi=10 -o cpi=15" +devshell.mkShell { + packages = with pkgs; [ + (python3.withPackages (p: with p; [ + python-escpos + pycups + ])) + ]; +}