Got cashu running on my nix laptop. This is a basic FHS environment that lets python build secp256k1:

```

{ pkgs ? import {} }:

(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"

```

Reply to this note

Please Login to reply.