# SPDX-FileCopyrightText: 2026 Jeffrey C. Ollie # # SPDX-License-Identifier: MIT { lib, stdenvNoCC, callPackage, zig_0_16, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "zig65"; version = "0.0.0"; src = lib.fileset.toSource { root = ./.; # What goes into the build, and nothing else: the corpus runner is its own # project and the ROMs and images anyone has left lying about are not part # of this. fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./src ./examples ./completions # build.zig names this, so it has to be here even though the package # does not build it. ./tools ]; }; nativeBuildInputs = [ zig_0_16 zig_0_16.hook ]; # The dependencies, fetched by Nix rather than by Zig, since the build itself # has no network. The list is generated from build.zig.zon by zon2nix. zigBuildFlags = [ "--system" "${callPackage ./build.zig.zon.nix { }}" ]; meta = { description = "A cycle accurate 6502 and Apple II emulator"; homepage = "https://github.com/jcollie/zig65"; license = lib.licenses.mit; mainProgram = "zig65"; platforms = lib.platforms.unix; }; })