Fixed the 3DS flake

This commit is contained in:
Alexandre 2026-04-26 19:12:55 +02:00
parent f530038c1c
commit 993398b011
2 changed files with 88 additions and 24 deletions

View File

@ -1,5 +1,24 @@
{
"nodes": {
"devkitNix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1774111408,
"narHash": "sha256-eOKab4WYpdI+vsugJCwSSOKIpD/p4WkHRyHPhctWJbY=",
"owner": "bandithedoge",
"repo": "devkitNix",
"rev": "91653112a6b31870abf4394a3f7a6cd7d5d22fd9",
"type": "github"
},
"original": {
"owner": "bandithedoge",
"repo": "devkitNix",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -18,7 +37,41 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"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": 1769740369,
"narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6308c3b21396534d8aaeac46179c14c439a89b8a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1776877367,
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
@ -36,8 +89,9 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"devkitNix": "devkitNix",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
@ -54,6 +108,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"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",

View File

@ -4,36 +4,31 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
devkitNix.url = "github:bandithedoge/devkitNix";
};
outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, devkitNix, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ devkitNix.overlays.default ];
};
in {
devShells.default = pkgs.mkShell.override { stdenv = pkgs.devkitNix.stdenvARM; } {
nativeBuildInputs = [ pkgs.gnumake ];
shellHook = ''
export PATH="${pkgs.azahar}/bin:$PATH"
'';
};
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)"
packages.default = pkgs.stdenv.mkDerivation {
name = "3DS-app";
src = ./.;
makeFlags = [ "TARGET=3DS-app" ];
installPhase = ''
mkdir $out
cp 3DS-app.3dsx $out/
'';
};
}