Native buildRustPackage for PhotoCraft, the open-source clean-room Photoshop reimplementation in pure Rust (https://github.com/storytold/photocraft). - builds desktop app + photocraft-cli (convert/batch/MCP) from the v0.7.0 release tag - heif feature enabled for parity with official release builds (pure-Rust heic-rs, no native C deps) - zero buildInputs: the workspace has no native *-sys crates; all windowing/graphics/D-Bus access is dlopen'd at runtime and provided via LD_LIBRARY_PATH (neovide pattern), incl. dbus.lib so rfd's xdg-desktop-portal file dialogs work instead of the zenity fallback - installs upstream .desktop, hicolor icons (16-512 + svg), AppStream metainfo (version/date substituted) and MIME registrations - passthru.updateScript = nix-update-script; verified with 'nix-update -F photocraft' (handles version + src hash + cargoHash) GPU verified on RX 7900 XTX / Wayland after the flake input update.
35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# pkgs/ AGENTS.md
|
|
|
|
## OVERVIEW
|
|
Custom package registry using `callPackage` pattern for flake-wide availability.
|
|
|
|
## STRUCTURE
|
|
- `default.nix`: Central registry (entry point for overlays)
|
|
- `code2prompt/`: Rust package
|
|
- `hyprpaper-random/`: Bash script
|
|
- `launch-webapp/`: Webapp wrapper
|
|
- `mem0/`: Python package + custom `server.py`
|
|
- `msty-studio/`: AppImage wrapper
|
|
- `photocraft/`: Rust package (Photoshop reimplementation, built from source)
|
|
- `pomodoro-timer/`: Timer utility
|
|
- `tuxedo-backlight/`: Hardware control
|
|
- `zellij-ps/`: Gitea-hosted package
|
|
|
|
## WHERE TO LOOK
|
|
- **Register new pkg**: Add entry to `pkgs/default.nix` attribute set
|
|
- **Modify pkg**: Edit `pkgs/<name>/default.nix` (version, hash, deps)
|
|
- **Check visibility**: `nix flake show` (uses `pkgs/default.nix` via `overlays/default.nix`)
|
|
- **Add scripts**: Place alongside `default.nix` in package folder (e.g., `mem0/server.py`)
|
|
|
|
## CONVENTIONS
|
|
- **CallPackage**: Always use `pkgs.callPackage ./dir {}` in registry
|
|
- **Dir == Attr**: Package directory name MUST match its registry attribute
|
|
- **Path literals**: Reference local assets using `./file` within derivations
|
|
- **Self-contained**: Keep all package-specific files in their own directory
|
|
|
|
## ANTI-PATTERNS
|
|
- **Orphaned dirs**: Creating `pkgs/new-pkg/` without updating `pkgs/default.nix`
|
|
- **Direct flake imports**: Importing packages in `flake.nix` instead of through the registry
|
|
- **Implicit deps**: Not declaring dependencies in the package function arguments
|
|
- **Non-derivations**: Placing NixOS/HM modules here (use `modules/` instead)
|