SNES emulator
at main 53 lines 1.6 kB view raw
1{ 2 description = "CK's attempt at a SNES emulator"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; 6 flake-utils.url = "github:numtide/flake-utils"; 7 }; 8 9 outputs = { self, nixpkgs, flake-utils }: 10 flake-utils.lib.eachDefaultSystem (system: 11 let 12 pkgs = import nixpkgs { inherit system; }; 13 14 python = pkgs.python3.withPackages (pkgs': with pkgs'; [ 15 # Python testing framework for HDL simulation. 16 cocotb 17 # Needed as well. 18 pytest 19 # Not entirely sure if this is needed, but Nix being weird might require this? 20 find-libpython 21 ]); 22 in 23 { 24 devShells.default = pkgs.mkShell { 25 packages = with pkgs; [ 26 # Command runner. 27 just 28 # Tooling for VHDL. 29 ghdl 30 # VHDL language server (rust_hdl). 31 vhdl-ls 32 # HDL synthesis and simulation with yosys. 33 # 34 # We also wrap it to include the necessary plugins for VHDL. 35 (pkgs.writeShellScriptBin "yosys" '' 36 exec ${pkgs.yosys}/bin/yosys \ 37 -m ${pkgs.yosys-ghdl}/share/yosys/plugins/ghdl.so \ 38 "$@" 39 '') 40 # ECP5 place-and-route + bitstream tools. 41 nextpnr 42 (pkgs.ecppack or pkgs.trellis) 43 # FPGA programmer. 44 openfpgaloader 45 # Python tooling, for testing HDL. 46 python 47 # Python linter/formatter. 48 ruff 49 ]; 50 }; 51 } 52 ); 53}