pleblee @pleblee - 2mo
Got cashu running on my nix laptop. This is a basic FHS environment that lets python build secp256k1: ``` { pkgs ? import <nixpkgs> {} }: (pkgs.buildFHSEnv { name = "nutshell-fhs-env"; targetPkgs = pkgs: with pkgs; [ autoconf automake gcc libtool pkg-config tmux ]; runScript = "./run-cashu.sh"; }).env ``` `run-cashu.sh`: ``` #!/usr/bin/env bash set -e # Default values (can be overridden by command-line arguments) SESSION_NAME="${1:-cashu}" if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then echo "Session '$SESSION_NAME' already exists. No action taken." exit 0 fi # Create new detached session, specifying fish as the default shell #tmux new-session -d -s "$SESSION_NAME" -x "$(tput cols)" -y "$(tput lines)" "fish" tmux new-session -d -s "$SESSION_NAME" "fish" # Activate virtual environment inside the tmux session tmux send-keys -t "$SESSION_NAME" "source .venv/bin/activate.fish" C-m # Source the configuration for cashu #tmux send-keys -t "$SESSION_NAME" "source .env" C-m # Start the open-webui server in the new fish shell tmux send-keys -t "$SESSION_NAME" "cashu --help" C-m # Attach to the session tmux attach-session -t "$SESSION_NAME" ```
pleblee @pleblee - 1mo
Big thanks to nostr:nprofile1qqsd846pynwlkk7uvxu0rrghcve4hw6033c3s234acnnzjjf5n4hk8gppemhxue69uhkummn9ekx7mp0qy08wumn8ghj7mn0wd68yttsw43zuam9d3kx7unyv4ezumn9wshsz8thwden5te0dehhxarj9e3xjarrda5kuetj9eek7cmfv9kz7msfzzy for pointing me in the right directions on this