From f530038c1c5701b6afa516c73d84e62942e69fed Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sun, 26 Apr 2026 15:31:09 +0200 Subject: [PATCH] Added a 3DS homebrew flake --- dev-flakes/3DS/.envrc | 3 ++ dev-flakes/3DS/flake.lock | 61 +++++++++++++++++++++++++++++++++++++++ dev-flakes/3DS/flake.nix | 41 ++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 dev-flakes/3DS/.envrc create mode 100644 dev-flakes/3DS/flake.lock create mode 100644 dev-flakes/3DS/flake.nix diff --git a/dev-flakes/3DS/.envrc b/dev-flakes/3DS/.envrc new file mode 100644 index 0000000..1e067b4 --- /dev/null +++ b/dev-flakes/3DS/.envrc @@ -0,0 +1,3 @@ +FLAKEDIR=~/Developer/nix/NixOSDots/dev-flakes + +use flake ${FLAKEDIR}/3DS diff --git a/dev-flakes/3DS/flake.lock b/dev-flakes/3DS/flake.lock new file mode 100644 index 0000000..20db77f --- /dev/null +++ b/dev-flakes/3DS/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1776877367, + "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0726a0ecb6d4e08f6adced58726b95db924cef57", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/dev-flakes/3DS/flake.nix b/dev-flakes/3DS/flake.nix new file mode 100644 index 0000000..6014a0a --- /dev/null +++ b/dev-flakes/3DS/flake.nix @@ -0,0 +1,41 @@ +{ + description = "3DS Homebrew dev environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + + dkp = pkgs.devkitpro; + in { + devShells.default = pkgs.mkShell { + nativeBuildInputs = [ + dkp.devkitARM + dkp.libctru + dkp.citro3d + dkp.citro2d + + pkgs.gnumake + pkgs.python3 + + pkgs.azahar # 3DS emulator + ]; + + shellHook = '' + export DEVKITPRO=${dkp} + export DEVKITARM=${dkp.devkitARM} + export PATH=$DEVKITARM/bin:$PATH + echo "devkitARM ready: $(arm-none-eabi-gcc --version | head -1)" + ''; + }; + } + ); +}