This repository has been archived on 2026-03-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nix-packages/CLAUDE.md
Torjus Håkestad 329e9341d9
Some checks failed
build / build (push) Has been cancelled
update CLAUDE.md with fmt/lint commands and Go pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 02:14:37 +01:00

1.8 KiB

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

# Build a specific package
nix build .#packages.x86_64-linux.<package-name>

# Build all packages (x86_64-linux)
./scripts/build-all.sh

# Validate flake
nix flake check

# Format nix files
nix fmt

# Lint nix files
statix 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/<name>/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/<name>/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 (see noita-entangled-worlds)
  • Go: buildGoModule (see forgejo-mcp)
  • Binary/.NET: fetchurl + makeWrapper with makeLibraryPath (see vintagestory)

Commit Style

Imperative, prefixed with package name when relevant: poe-sidekick: add package, Bump entangled worlds.