-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
53 lines (44 loc) · 1.12 KB
/
shell.nix
File metadata and controls
53 lines (44 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Legacy nix-shell support (for users not using flakes)
# This file provides compatibility with traditional nix-shell command
# For flakes users, use: nix develop
{ pkgs ? import <nixpkgs> {} }:
let
rustToolchain = pkgs.rustc;
pythonEnv = pkgs.python312.withPackages (ps: with ps; [
pdf2image
pytesseract
pillow
opencv4
numpy
]);
in pkgs.mkShell {
buildInputs = with pkgs; [
# Rust toolchain
rustToolchain
cargo
rustfmt
clippy
# Python environment
pythonEnv
# System dependencies
poppler-utils
tesseract5
# Build dependencies
pkg-config
openssl
gcc
git
];
shellHook = ''
echo "DocStruct development environment (nix-shell)"
echo "=============================================="
echo "Rust version: $(rustc --version)"
echo "Python version: $(python --version)"
echo "Tesseract version: $(tesseract --version | head -n1)"
echo ""
echo "Note: pix2tex needs to be installed separately:"
echo " pip install --user 'pix2tex[gui]>=0.1.2'"
echo ""
export PATH="$HOME/.local/bin:$PATH"
'';
}