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": { "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -18,7 +37,41 @@
"type": "github" "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": { "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": { "locked": {
"lastModified": 1776877367, "lastModified": 1776877367,
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
@ -36,8 +89,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "devkitNix": "devkitNix",
"nixpkgs": "nixpkgs" "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
} }
}, },
"systems": { "systems": {
@ -54,6 +108,21 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View File

@ -4,36 +4,31 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; 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: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; 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; packages.default = pkgs.stdenv.mkDerivation {
in { name = "3DS-app";
devShells.default = pkgs.mkShell { src = ./.;
nativeBuildInputs = [ makeFlags = [ "TARGET=3DS-app" ];
dkp.devkitARM installPhase = ''
dkp.libctru mkdir $out
dkp.citro3d cp 3DS-app.3dsx $out/
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)"
''; '';
}; };
} }