add some big N resources
master
Daniel Lovbrotte Olsen 2023-10-23 22:37:48 +02:00
commit 8bffb0b8df
5 changed files with 42 additions and 0 deletions

7
flake.nix Normal file
View File

@ -0,0 +1,7 @@
{
description = "A very basic flake";
outputs = { self, nixpkgs }: {
overlays.default = import ./overlay.nix;
};
}

8
overlay.nix Normal file
View File

@ -0,0 +1,8 @@
final: prev:
let
table = final.callPackage ./table.nix { };
in {
requireFile = { ... }@args: let
hash = args.hash or args.sha256 or args.sha1;
in table.${hash} or (prev.requireFile args);
}

View File

@ -0,0 +1,11 @@
{ lib, runCommand, fetchFromBittorrent, p7zip}:
let
torrent = fetchFromBittorrent {
url = "https://archive.org/download/ZELOOTD/ZELOOTD_archive.torrent";
hash = "sha256-4CaZ2nv/vnweYwKd/qjfO8se71D1vfH9qhyDH9Aj21E=";
};
in
runCommand "oot-debug.z64" { nativeBuildInputs = [ p7zip ]; } ''
7z x "${torrent}/ZELOOTD.zip"
cp "ZELOOTD.z64" "$out"
''

10
pkgs/sm64-us/default.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, runCommand, fetchFromBittorrent }:
let
torrent = fetchFromBittorrent {
url = "https://archive.org/download/super-mario-64-usa/super-mario-64-usa_archive.torrent";
hash = "sha256-6tkCKQD2modogcTo0ESookWJDm7rjA79t5ZOVz3luYM=";
};
in
runCommand "baserom.us.z64" { } ''
cp "${torrent}/Super Mario 64 (U) [!].z64" "$out"
''

6
table.nix Normal file
View File

@ -0,0 +1,6 @@
{ callPackage }:
{
"17ce077343c6133f8c9f2d6d6d9a4ab62c8cd2aa57c40aea1f490b4c8bb21d91" = callPackage ./pkgs/sm64-us { };
"cee6bc3c2a634b41728f2af8da54d9bf8cc14099" = callPackage ./pkgs/oot-debug { };
}