From 7bd020e6e862cf23a597f65d63ab4c5eebb5f44a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 20 Oct 2024 07:22:22 +0200 Subject: [PATCH] Update mgba to the development version --- config/games/default.nix | 2 +- flake.nix | 1 + overlays/default.nix | 1 + packages/emulator/mgba-dev/default.nix | 16 ++++++++++++++++ packages/emulator/mgba-dev/source.json | 12 ++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 packages/emulator/mgba-dev/default.nix create mode 100644 packages/emulator/mgba-dev/source.json diff --git a/config/games/default.nix b/config/games/default.nix index bd6466a8..2cc3f1ba 100644 --- a/config/games/default.nix +++ b/config/games/default.nix @@ -9,7 +9,7 @@ in { home.packages = [ pkgs.prismlauncher - pkgs.mgba + pkgs.mgba-dev ] ++ ( if system == "x86_64-linux" diff --git a/flake.nix b/flake.nix index 9d194a9c..82e2ba2c 100644 --- a/flake.nix +++ b/flake.nix @@ -280,6 +280,7 @@ rec { plover-plugin-modal-dictionary plover-plugin-stitching plover-plugin-lapwing-aio + mgba-dev ; }; perSystem = { diff --git a/overlays/default.nix b/overlays/default.nix index 52a250da..bde453ab 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -63,6 +63,7 @@ inputs: system: self: prev: let asar-asm = self.callPackage ../packages/compiler/asar {}; bsnes-plus = self.libsForQt5.callPackage ../packages/emulator/bsnes-plus {}; yiffstash = self.python3Packages.callPackage ../packages/python/yiffstash.nix {}; + mgba-dev = self.libsForQt5.callPackage ../packages/emulator/mgba-dev {}; }; perSystem = { aarch64-linux = { diff --git a/packages/emulator/mgba-dev/default.nix b/packages/emulator/mgba-dev/default.nix new file mode 100644 index 00000000..fbd0f532 --- /dev/null +++ b/packages/emulator/mgba-dev/default.nix @@ -0,0 +1,16 @@ +{ + mgba, + fetchFromGitHub, +}: let + source = builtins.fromJSON (builtins.readFile ./source.json); +in + mgba.overrideAttrs (super: { + version = source.date; + src = fetchFromGitHub { + owner = "mgba-emu"; + repo = "mgba"; + inherit (source) rev sha256; + }; + + passthru.updateScript = [../../scripts/update-git.sh "https://github.com/mgba-emu/mgba" "emulator/mgba-dev/source.json"]; + }) diff --git a/packages/emulator/mgba-dev/source.json b/packages/emulator/mgba-dev/source.json new file mode 100644 index 00000000..cc5a7ee8 --- /dev/null +++ b/packages/emulator/mgba-dev/source.json @@ -0,0 +1,12 @@ +{ + "url": "https://github.com/mgba-emu/mgba", + "rev": "afff68cfc0731c441ececa83bf43c3d8bebe5c5a", + "date": "2024-10-11T21:52:48-07:00", + "path": "/nix/store/07x809rwbmxsxbax2dbmsr0cwi8189sr-mgba", + "sha256": "1cyj4da8skk2pn9gxwc0lq0wk6pmxj3bgv4iay4b81mmgq5p84q0", + "hash": "sha256-ABN0C361BrSIV5Hst4bs9ZrJAaaA8f6SvWJOjVQj0rM=", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +}