diff --git a/default.nix b/default.nix index a9b1159..f19fc66 100644 --- a/default.nix +++ b/default.nix @@ -76,6 +76,7 @@ in plover-plugin-python-dictionary plover-plugin-stenotype-extended asar + bsnes-plus ; } // ( diff --git a/emulator/bsnes-plus/default.nix b/emulator/bsnes-plus/default.nix new file mode 100644 index 0000000..87f1b2e --- /dev/null +++ b/emulator/bsnes-plus/default.nix @@ -0,0 +1,31 @@ +{ + fetchFromGitHub, + stdenv, + qtbase, + wrapQtAppsHook, + pkg-config, + SDL, + libXv, + libao, + openal, +}: let + source = builtins.fromJSON (builtins.readFile ./source.json); +in + stdenv.mkDerivation { + pname = "bsnes-plus"; + version = source.date; + src = fetchFromGitHub { + owner = "devinacker"; + repo = "bsnes-plus"; + inherit (source) rev sha256; + }; + makeFlags = ["-C" "bsnes" "out=bsnes"]; + buildInputs = [qtbase SDL libXv libao openal]; + nativeBuildInputs = [wrapQtAppsHook pkg-config]; + passthru.updateScript = [../../scripts/update-git.sh "https://github.com/devinacker/bsnes-plus" "emulator/bsnes-plus/source.json"]; + preInstall = '' + export HOME=$(mktemp -d) + export prefix=$out + ''; + enableParallelBuilding = true; + } diff --git a/emulator/bsnes-plus/source.json b/emulator/bsnes-plus/source.json new file mode 100644 index 0000000..2c6bc1e --- /dev/null +++ b/emulator/bsnes-plus/source.json @@ -0,0 +1,11 @@ +{ + "url": "https://github.com/devinacker/bsnes-plus", + "rev": "14e00375ba15cd605bf716117cd66ddaf5d93914", + "date": "2023-06-05T20:56:09-04:00", + "path": "/nix/store/pn7q6xy2hpd57s2a29j4zp3lk06sf462-bsnes-plus", + "sha256": "0g7djccmshidqjcpgm0w8mvi4wy1w2v3zfvl1sv5caarch6kdswv", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +} diff --git a/flake.nix b/flake.nix index 0186a80..85c6ab5 100644 --- a/flake.nix +++ b/flake.nix @@ -120,6 +120,7 @@ plover-plugin-python-dictionary plover-plugin-stenotype-extended asar + bsnes-plus ; } // ( diff --git a/overlay.nix b/overlay.nix index 33e6cd0..e4bd5e9 100644 --- a/overlay.nix +++ b/overlay.nix @@ -128,6 +128,7 @@ system: self: super: let linux-bcachefs = self.callPackage ./linux/bcachefs {kernelPatches = [];}; bcachefs-tools = self.callPackage ./linux/bcachefs-tools {}; asar = self.callPackage ./compiler/asar {}; + bsnes-plus = self.libsForQt5.callPackage ./emulator/bsnes-plus {}; }) riscv-overlay ];