From 208f79220368c6353149f132fbc5421ad2f76bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Tue, 10 Mar 2026 02:11:53 +0100 Subject: [PATCH] add CLAUDE.md Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..becbce1 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,47 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +Nix flake providing custom packages not available in nixpkgs. Tracks `nixos-unstable`. Uses `config.allowUnfree = true`. + +## Build Commands + +```bash +# Build a specific package +nix build .#packages.x86_64-linux. + +# Build all packages (x86_64-linux) +./scripts/build-all.sh + +# Validate flake +nix flake check + +# Update flake inputs +nix flake update +``` + +## Structure + +- `flake.nix` — Defines all packages and per-package overlays. Packages are registered in `packages` and exposed via `overlays`. +- `pkgs//default.nix` — Individual package definitions, called via `pkgs.callPackage` (or `pkgs.qt6Packages.callPackage` for Qt packages). +- `scripts/` — Helper scripts (`build-all.sh`, `update-pob.sh`). + +## Adding a New Package + +1. Create `pkgs//default.nix` with the package derivation. +2. Add the package to `packages` in `flake.nix` via `callPackage`. +3. Add a per-package overlay in `flake.nix` `overlays` and include it in the `default` overlay if appropriate. + +## Packaging Patterns Used + +- **AppImage**: `appimageTools.wrapType2` (see `poe-sidekick`) +- **Electron/Yarn**: `yarnConfigHook` + `yarnBuildHook` + `fetchYarnDeps` (see `awakened-poe-trade`) +- **Qt6/Meson**: `qt6Packages.callPackage` + `wrapQtAppsHook` (see `path-of-building-*`) +- **Rust/Cargo**: `rustPlatform.buildRustPackage` + `useFetchCargoVendor` (see `noita-entangled-worlds`) +- **Binary/.NET**: `fetchurl` + `makeWrapper` with `makeLibraryPath` (see `vintagestory`) + +## Commit Style + +Imperative, prefixed with package name when relevant: `poe-sidekick: add package`, `Bump entangled worlds`.